Refactor map loading & saving
This commit is contained in:
@@ -4,10 +4,12 @@ using System.Numerics;
|
||||
using Content.Server.Shuttles.Systems;
|
||||
using Content.Tests;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.EntitySerialization.Systems;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.IntegrationTests.Tests.Shuttle;
|
||||
|
||||
@@ -106,8 +108,9 @@ public sealed class DockTest : ContentUnitTest
|
||||
{
|
||||
mapGrid = entManager.AddComponent<MapGridComponent>(map.MapUid);
|
||||
entManager.DeleteEntity(map.Grid);
|
||||
Assert.That(entManager.System<MapLoaderSystem>().TryLoad(otherMap.MapId, "/Maps/Shuttles/emergency.yml", out var rootUids));
|
||||
shuttle = rootUids[0];
|
||||
var path = new ResPath("/Maps/Shuttles/emergency.yml");
|
||||
Assert.That(entManager.System<MapLoaderSystem>().TryLoadGrid(otherMap.MapId, path, out var grid));
|
||||
shuttle = grid!.Value.Owner;
|
||||
|
||||
var dockingConfig = dockingSystem.GetDockingConfig(shuttle, map.MapUid);
|
||||
Assert.That(dockingConfig, Is.EqualTo(null));
|
||||
|
||||
Reference in New Issue
Block a user