Refactor map loading & saving
This commit is contained in:
@@ -3,12 +3,13 @@ using Content.Server.Administration;
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.CCVar;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.Maps;
|
||||
using Robust.Shared.Configuration;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.ContentPack;
|
||||
using Robust.Shared.EntitySerialization;
|
||||
using Robust.Shared.EntitySerialization.Systems;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Server.Mapping
|
||||
{
|
||||
@@ -91,8 +92,9 @@ namespace Content.Server.Mapping
|
||||
}
|
||||
else
|
||||
{
|
||||
var loadOptions = new MapLoadOptions {StoreMapUids = true};
|
||||
_entities.System<MapLoaderSystem>().TryLoad(mapId, args[1], out _, loadOptions);
|
||||
var path = new ResPath(args[1]);
|
||||
var opts = new DeserializationOptions {StoreYamlUids = true};
|
||||
_entities.System<MapLoaderSystem>().TryLoadMapWithId(mapId, path, out _, out _, opts);
|
||||
}
|
||||
|
||||
// was the map actually created or did it fail somehow?
|
||||
|
||||
Reference in New Issue
Block a user