Remove transform methods from mapgrid (#12233)
This commit is contained in:
@@ -227,9 +227,10 @@ namespace Content.Server.Salvage
|
||||
angle = Angle.Zero;
|
||||
var tsc = Transform(component.Owner);
|
||||
coords = new EntityCoordinates(component.Owner, component.Offset).ToMap(EntityManager);
|
||||
if (_mapManager.TryGetGrid(tsc.GridUid, out var magnetGrid))
|
||||
|
||||
if (_mapManager.TryGetGrid(tsc.GridUid, out var magnetGrid) && TryComp<TransformComponent>(magnetGrid.GridEntityId, out var gridXform))
|
||||
{
|
||||
angle = magnetGrid.WorldRotation;
|
||||
angle = gridXform.WorldRotation;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -372,7 +373,7 @@ namespace Content.Server.Salvage
|
||||
var gridId = gridIdAndState.Key;
|
||||
// Not handling the case where the salvage we spawned got paused
|
||||
// They both need to be paused, or it doesn't make sense
|
||||
if (_mapManager.IsGridPaused(gridId)) continue;
|
||||
if (MetaData(gridId).EntityPaused) continue;
|
||||
state.CurrentTime += secondsPassed;
|
||||
|
||||
var deleteQueue = new RemQueue<SalvageMagnetComponent>();
|
||||
|
||||
Reference in New Issue
Block a user