|
26 | 26 | using VRage.Game; |
27 | 27 | using VRage.Game.ObjectBuilder; |
28 | 28 | using VRage.ObjectBuilders; |
| 29 | +using VRage.ObjectBuilders.Private; |
29 | 30 | using VRage.Plugins; |
30 | 31 |
|
31 | 32 | namespace Torch.Server.Managers |
@@ -288,22 +289,20 @@ public WorldViewModel(string worldPath) |
288 | 289 |
|
289 | 290 | public void SaveSandbox() |
290 | 291 | { |
291 | | - using (var f = File.Open(_checkpointPath, FileMode.Create)) |
292 | | - MyObjectBuilderSerializer.SerializeXML(f, Checkpoint); |
293 | | - |
294 | | - using (var f = File.Open(_worldConfigPath, FileMode.Create)) |
295 | | - MyObjectBuilderSerializer.SerializeXML(f, WorldConfiguration); |
| 292 | + MyObjectBuilderSerializerKeen.SerializeXML(_checkpointPath, false,Checkpoint); |
| 293 | + |
| 294 | + MyObjectBuilderSerializerKeen.SerializeXML(_worldConfigPath,false, WorldConfiguration); |
296 | 295 | } |
297 | 296 |
|
298 | 297 | private void LoadSandbox() |
299 | 298 | { |
300 | | - MyObjectBuilderSerializer.DeserializeXML(_checkpointPath, out MyObjectBuilder_Checkpoint checkpoint); |
| 299 | + MyObjectBuilderSerializerKeen.DeserializeXML(_checkpointPath, out MyObjectBuilder_Checkpoint checkpoint); |
301 | 300 | Checkpoint = new CheckpointViewModel(checkpoint); |
302 | 301 |
|
303 | 302 | // migrate old saves |
304 | 303 | if (File.Exists(_worldConfigPath)) |
305 | 304 | { |
306 | | - MyObjectBuilderSerializer.DeserializeXML(_worldConfigPath, out MyObjectBuilder_WorldConfiguration worldConfig); |
| 305 | + MyObjectBuilderSerializerKeen.DeserializeXML(_worldConfigPath, out MyObjectBuilder_WorldConfiguration worldConfig); |
307 | 306 | WorldConfiguration = new WorldConfigurationViewModel(worldConfig); |
308 | 307 | } |
309 | 308 | else |
|
0 commit comments