Content side for removing IMap / IMapGrid comps (#12357)
This commit is contained in:
@@ -242,7 +242,7 @@ public sealed class StationSystem : EntitySystem
|
||||
|
||||
foreach (var gridUid in component.Grids)
|
||||
{
|
||||
if (!TryComp<IMapGridComponent>(gridUid, out var grid) ||
|
||||
if (!TryComp<MapGridComponent>(gridUid, out var grid) ||
|
||||
grid.Grid.LocalAABB.Size.LengthSquared < largestBounds.Size.LengthSquared)
|
||||
continue;
|
||||
|
||||
@@ -385,7 +385,7 @@ public sealed class StationSystem : EntitySystem
|
||||
/// <param name="stationData">Resolve pattern, station data component of station.</param>
|
||||
/// <param name="name">The name to assign to the grid if any.</param>
|
||||
/// <exception cref="ArgumentException">Thrown when mapGrid or station are not a grid or station, respectively.</exception>
|
||||
public void AddGridToStation(EntityUid station, EntityUid mapGrid, IMapGridComponent? gridComponent = null, StationDataComponent? stationData = null, string? name = null)
|
||||
public void AddGridToStation(EntityUid station, EntityUid mapGrid, MapGridComponent? gridComponent = null, StationDataComponent? stationData = null, string? name = null)
|
||||
{
|
||||
if (!Resolve(mapGrid, ref gridComponent))
|
||||
throw new ArgumentException("Tried to initialize a station on a non-grid entity!", nameof(mapGrid));
|
||||
@@ -412,7 +412,7 @@ public sealed class StationSystem : EntitySystem
|
||||
/// <param name="gridComponent">Resolve pattern, grid component of mapGrid.</param>
|
||||
/// <param name="stationData">Resolve pattern, station data component of station.</param>
|
||||
/// <exception cref="ArgumentException">Thrown when mapGrid or station are not a grid or station, respectively.</exception>
|
||||
public void RemoveGridFromStation(EntityUid station, EntityUid mapGrid, IMapGridComponent? gridComponent = null, StationDataComponent? stationData = null)
|
||||
public void RemoveGridFromStation(EntityUid station, EntityUid mapGrid, MapGridComponent? gridComponent = null, StationDataComponent? stationData = null)
|
||||
{
|
||||
if (!Resolve(mapGrid, ref gridComponent))
|
||||
throw new ArgumentException("Tried to initialize a station on a non-grid entity!", nameof(mapGrid));
|
||||
@@ -487,7 +487,7 @@ public sealed class StationSystem : EntitySystem
|
||||
return entity;
|
||||
}
|
||||
|
||||
if (TryComp<IMapGridComponent>(entity, out _))
|
||||
if (TryComp<MapGridComponent>(entity, out _))
|
||||
{
|
||||
// We are the station, just check ourselves.
|
||||
return CompOrNull<StationMemberComponent>(entity)?.Station;
|
||||
|
||||
Reference in New Issue
Block a user