Shared IMap/Map class removal (#467)
* Fully removed the Map and IMap class. * Submodule update to sibling engine commit.
This commit is contained in:
committed by
Pieter-Jan Briers
parent
9cfa0d447a
commit
d549c44f95
@@ -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");
|
||||
});
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Submodule RobustToolbox updated: e82f969589...d9a411b260
Reference in New Issue
Block a user