Remove Explicit GridId References (#8315)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -48,7 +48,7 @@ namespace Content.Server.Power.EntitySystems
|
||||
var xform = Transform(uid);
|
||||
|
||||
// If grid deleting no need to update power.
|
||||
if (_mapManager.TryGetGrid(xform.GridID, out var grid))
|
||||
if (_mapManager.TryGetGrid(xform.GridEntityId, out var grid))
|
||||
{
|
||||
if (MetaData(grid.GridEntityId).EntityLifeStage > EntityLifeStage.MapInitialized) return;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ namespace Content.Server.Power.EntitySystems
|
||||
var xform = Transform(owner);
|
||||
var coordinates = xform.Coordinates;
|
||||
|
||||
if (!_mapManager.TryGetGrid(xform.GridID, out var grid))
|
||||
if (!_mapManager.TryGetGrid(xform.GridEntityId, out var grid))
|
||||
yield break;
|
||||
|
||||
var nearbyEntities = grid.GetCellsInSquareArea(coordinates, (int) Math.Ceiling(range / grid.TileSize));
|
||||
@@ -238,7 +238,7 @@ namespace Content.Server.Power.EntitySystems
|
||||
|
||||
private bool TryFindAvailableProvider(EntityUid owner, float range, [NotNullWhen(true)] out ExtensionCableProviderComponent? foundProvider, TransformComponent? xform = null)
|
||||
{
|
||||
if (!Resolve(owner, ref xform) || !_mapManager.TryGetGrid(xform.GridID, out var grid))
|
||||
if (!Resolve(owner, ref xform) || !_mapManager.TryGetGrid(xform.GridEntityId, out var grid))
|
||||
{
|
||||
foundProvider = null;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user