Skip to content

Commit 70533b4

Browse files
committed
disable scenario/save save again, still broken
1 parent ac34a32 commit 70533b4

File tree

1 file changed

+23
-25
lines changed

1 file changed

+23
-25
lines changed

Gui/ViewModels/DatTypes/SCV5ViewModel.cs

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
using System.Collections.Generic;
1111
using System.ComponentModel;
1212
using System.ComponentModel.DataAnnotations;
13-
using System.IO;
1413
using System.Linq;
15-
using System.Threading.Tasks;
1614

1715
namespace OpenLoco.Gui.ViewModels
1816
{
@@ -174,35 +172,35 @@ void DrawMap()
174172
}
175173
}
176174

177-
//public override void Save() => logger?.Warning("Save is not currently implemented");
175+
public override void Save() => logger?.Warning("Save is not currently implemented");
178176

179-
//public override void SaveAs() => logger?.Warning("SaveAs is not currently implemented");
177+
public override void SaveAs() => logger?.Warning("SaveAs is not currently implemented");
180178

181-
public override void Save()
182-
=> Save(CurrentFile.Filename);
179+
//public override void Save()
180+
// => Save(CurrentFile.Filename);
183181

184-
public override void SaveAs()
185-
{
186-
var saveFile = Task.Run(async () => await PlatformSpecific.SaveFilePicker(PlatformSpecific.SCV5FileTypes)).Result;
187-
if (saveFile == null)
188-
{
189-
return;
190-
}
182+
//public override void SaveAs()
183+
//{
184+
// var saveFile = Task.Run(async () => await PlatformSpecific.SaveFilePicker(PlatformSpecific.SCV5FileTypes)).Result;
185+
// if (saveFile == null)
186+
// {
187+
// return;
188+
// }
191189

192-
Save(saveFile.Path.LocalPath);
193-
}
190+
// Save(saveFile.Path.LocalPath);
191+
//}
194192

195-
void Save(string filename)
196-
{
197-
logger?.Info($"Saving scenario/save/landscape to {filename}");
193+
//void Save(string filename)
194+
//{
195+
// logger?.Info($"Saving scenario/save/landscape to {filename}");
198196

199-
var newFile = CurrentS5File with
200-
{
201-
RequiredObjects = [.. RequiredObjects.Select(x => x.GetAsUnderlyingType())],
202-
};
197+
// var newFile = CurrentS5File with
198+
// {
199+
// RequiredObjects = [.. RequiredObjects.Select(x => x.GetAsUnderlyingType())],
200+
// };
203201

204-
var bytes = newFile.Write();
205-
File.WriteAllBytes(filename, bytes);
206-
}
202+
// var bytes = newFile.Write();
203+
// File.WriteAllBytes(filename, bytes);
204+
//}
207205
}
208206
}

0 commit comments

Comments
 (0)