Remove Explicit GridId References (#8315)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Acruid
2022-06-11 18:54:41 -07:00
committed by GitHub
parent 846321cebb
commit 4f9be42f40
131 changed files with 531 additions and 588 deletions

View File

@@ -112,7 +112,7 @@ namespace Content.Server.GameTicking
/// <param name="loadOptions">Map loading options, includes offset.</param>
/// <param name="stationName">Name to assign to the loaded station.</param>
/// <returns>All loaded entities and grids.</returns>
public (IReadOnlyList<EntityUid>, IReadOnlyList<GridId>) LoadGameMap(GameMapPrototype map, MapId targetMapId, MapLoadOptions? loadOptions, string? stationName = null)
public (IReadOnlyList<EntityUid>, IReadOnlyList<EntityUid>) LoadGameMap(GameMapPrototype map, MapId targetMapId, MapLoadOptions? loadOptions, string? stationName = null)
{
var loadOpts = loadOptions ?? new MapLoadOptions();
@@ -121,10 +121,11 @@ namespace Content.Server.GameTicking
var (entities, gridIds) = _mapLoader.LoadMap(targetMapId, ev.GameMap.MapPath.ToString(), ev.Options);
RaiseLocalEvent(new PostGameMapLoad(map, targetMapId, entities, gridIds, stationName));
var gridUids = gridIds.Select(g => (EntityUid)g).ToList();
RaiseLocalEvent(new PostGameMapLoad(map, targetMapId, entities, gridUids, stationName));
_spawnPoint = _mapManager.GetGrid(gridIds[0]).ToCoordinates();
return (entities, gridIds);
return (entities, gridUids);
}
public void StartRound(bool force = false)
@@ -557,10 +558,10 @@ namespace Content.Server.GameTicking
public readonly GameMapPrototype GameMap;
public readonly MapId Map;
public readonly IReadOnlyList<EntityUid> Entities;
public readonly IReadOnlyList<GridId> Grids;
public readonly IReadOnlyList<EntityUid> Grids;
public readonly string? StationName;
public PostGameMapLoad(GameMapPrototype gameMap, MapId map, IReadOnlyList<EntityUid> entities, IReadOnlyList<GridId> grids, string? stationName)
public PostGameMapLoad(GameMapPrototype gameMap, MapId map, IReadOnlyList<EntityUid> entities, IReadOnlyList<EntityUid> grids, string? stationName)
{
GameMap = gameMap;
Map = map;