diff --git a/Content.IntegrationTests/SaveLoadSaveTest.cs b/Content.IntegrationTests/SaveLoadSaveTest.cs index c6bc8adede..8ed57f07e3 100644 --- a/Content.IntegrationTests/SaveLoadSaveTest.cs +++ b/Content.IntegrationTests/SaveLoadSaveTest.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using System.Threading.Tasks; using NUnit.Framework; using Robust.Server.Interfaces.Maps; @@ -26,8 +26,8 @@ namespace Content.IntegrationTests server.Post(() => { mapLoader.SaveBlueprint(new GridId(2), "save load save 1.yml"); - var map = mapManager.CreateMap(); - var grid = mapLoader.LoadBlueprint(map, "save load save 1.yml"); + var mapId = mapManager.CreateMap(); + var grid = mapLoader.LoadBlueprint(mapId, "save load save 1.yml"); mapLoader.SaveBlueprint(grid.Index, "save load save 2.yml"); }); @@ -69,9 +69,9 @@ namespace Content.IntegrationTests // Load stationstation.yml as uninitialized map, and save it to ensure it's up to date. server.Post(() => { - var map = mapManager.CreateMap(); - pauseMgr.AddUninitializedMap(map); - grid = mapLoader.LoadBlueprint(map, "Maps/stationstation.yml"); + var mapId = mapManager.CreateMap(); + pauseMgr.AddUninitializedMap(mapId); + grid = mapLoader.LoadBlueprint(mapId, "Maps/stationstation.yml"); mapLoader.SaveBlueprint(grid.Index, "load save ticks save 1.yml"); }); diff --git a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs index f469d65164..bb27fbe24e 100644 --- a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs @@ -347,7 +347,7 @@ namespace Content.Server.GameObjects.EntitySystems } // Verify player is on the same map as the entity he clicked on - if (_mapManager.GetGrid(coordinates.GridID).ParentMap.Index != playerTransform.MapID) + if (_mapManager.GetGrid(coordinates.GridID).ParentMapId != playerTransform.MapID) { Logger.WarningS("system.interaction", $"Player named {player.Name} clicked on a map he isn't located on"); @@ -750,7 +750,7 @@ namespace Content.Server.GameObjects.EntitySystems private void DoAttack(IEntity player, GridCoordinates coordinates, EntityUid uid) { // Verify player is on the same map as the entity he clicked on - if (_mapManager.GetGrid(coordinates.GridID).ParentMap.Index != player.Transform.MapID) + if (_mapManager.GetGrid(coordinates.GridID).ParentMapId != player.Transform.MapID) { Logger.WarningS("system.interaction", $"Player named {player.Name} clicked on a map he isn't located on"); diff --git a/Content.Server/GameTicking/GameTicker.cs b/Content.Server/GameTicking/GameTicker.cs index eb3cb9a3a2..811281cdb5 100644 --- a/Content.Server/GameTicking/GameTicker.cs +++ b/Content.Server/GameTicking/GameTicker.cs @@ -328,12 +328,12 @@ namespace Content.Server.GameTicking } // Delete all maps outside of nullspace. - foreach (var map in _mapManager.GetAllMaps().ToList()) + foreach (var mapId in _mapManager.GetAllMapIds().ToList()) { // TODO: Maybe something less naive here? - if (map.Index != MapId.Nullspace) + if (mapId != MapId.Nullspace) { - _mapManager.DeleteMap(map.Index); + _mapManager.DeleteMap(mapId); } } @@ -366,9 +366,9 @@ namespace Content.Server.GameTicking private void _preRoundSetup() { - var newMap = _mapManager.CreateMap(); + var newMapId = _mapManager.CreateMap(); var startTime = _gameTiming.RealTime; - var grid = _mapLoader.LoadBlueprint(newMap, MapFile); + var grid = _mapLoader.LoadBlueprint(newMapId, MapFile); _spawnPoint = new GridCoordinates(Vector2.Zero, grid); diff --git a/RobustToolbox b/RobustToolbox index e82f969589..d9a411b260 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit e82f9695899b1ebe445a8e14a95b1e4e633b0e07 +Subproject commit d9a411b260640be93fb4e40805c7bdc3ee7dc53b