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 System.Threading.Tasks;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using Robust.Server.Interfaces.Maps;
|
using Robust.Server.Interfaces.Maps;
|
||||||
@@ -26,8 +26,8 @@ namespace Content.IntegrationTests
|
|||||||
server.Post(() =>
|
server.Post(() =>
|
||||||
{
|
{
|
||||||
mapLoader.SaveBlueprint(new GridId(2), "save load save 1.yml");
|
mapLoader.SaveBlueprint(new GridId(2), "save load save 1.yml");
|
||||||
var map = mapManager.CreateMap();
|
var mapId = mapManager.CreateMap();
|
||||||
var grid = mapLoader.LoadBlueprint(map, "save load save 1.yml");
|
var grid = mapLoader.LoadBlueprint(mapId, "save load save 1.yml");
|
||||||
mapLoader.SaveBlueprint(grid.Index, "save load save 2.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.
|
// Load stationstation.yml as uninitialized map, and save it to ensure it's up to date.
|
||||||
server.Post(() =>
|
server.Post(() =>
|
||||||
{
|
{
|
||||||
var map = mapManager.CreateMap();
|
var mapId = mapManager.CreateMap();
|
||||||
pauseMgr.AddUninitializedMap(map);
|
pauseMgr.AddUninitializedMap(mapId);
|
||||||
grid = mapLoader.LoadBlueprint(map, "Maps/stationstation.yml");
|
grid = mapLoader.LoadBlueprint(mapId, "Maps/stationstation.yml");
|
||||||
mapLoader.SaveBlueprint(grid.Index, "load save ticks save 1.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
|
// 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",
|
Logger.WarningS("system.interaction",
|
||||||
$"Player named {player.Name} clicked on a map he isn't located on");
|
$"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)
|
private void DoAttack(IEntity player, GridCoordinates coordinates, EntityUid uid)
|
||||||
{
|
{
|
||||||
// Verify player is on the same map as the entity he clicked on
|
// 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",
|
Logger.WarningS("system.interaction",
|
||||||
$"Player named {player.Name} clicked on a map he isn't located on");
|
$"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.
|
// 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?
|
// 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()
|
private void _preRoundSetup()
|
||||||
{
|
{
|
||||||
var newMap = _mapManager.CreateMap();
|
var newMapId = _mapManager.CreateMap();
|
||||||
var startTime = _gameTiming.RealTime;
|
var startTime = _gameTiming.RealTime;
|
||||||
var grid = _mapLoader.LoadBlueprint(newMap, MapFile);
|
var grid = _mapLoader.LoadBlueprint(newMapId, MapFile);
|
||||||
|
|
||||||
_spawnPoint = new GridCoordinates(Vector2.Zero, grid);
|
_spawnPoint = new GridCoordinates(Vector2.Zero, grid);
|
||||||
|
|
||||||
|
|||||||
Submodule RobustToolbox updated: e82f969589...d9a411b260
Reference in New Issue
Block a user