Remove implicit GridId conversions (#8975)

This commit is contained in:
Leon Friedrich
2022-06-29 00:56:02 +12:00
committed by GitHub
parent 7a14c6f331
commit c13c0b8b0b
13 changed files with 33 additions and 35 deletions

View File

@@ -48,9 +48,9 @@ namespace Content.Client.Atmos.EntitySystems
private void OnGridRemoved(GridRemovalEvent ev)
{
if (_tileData.ContainsKey(ev.GridId))
if (_tileData.ContainsKey(ev.EntityUid))
{
_tileData.Remove(ev.GridId);
_tileData.Remove(ev.EntityUid);
}
}

View File

@@ -123,10 +123,7 @@ namespace Content.Client.Atmos.EntitySystems
private void OnGridRemoved(GridRemovalEvent ev)
{
if (_tileData.ContainsKey(ev.GridId))
{
_tileData.Remove(ev.GridId);
}
_tileData.Remove(ev.EntityUid);
}
public bool HasData(EntityUid gridId)

View File

@@ -40,14 +40,14 @@ namespace Content.Client.Decals
private void OnGridRemoval(GridRemovalEvent ev)
{
DecalRenderIndex.Remove(ev.GridId);
DecalZIndexIndex.Remove(ev.GridId);
DecalRenderIndex.Remove(ev.EntityUid);
DecalZIndexIndex.Remove(ev.EntityUid);
}
private void OnGridInitialize(GridInitializeEvent ev)
{
DecalRenderIndex[ev.GridId] = new();
DecalZIndexIndex[ev.GridId] = new();
DecalRenderIndex[ev.EntityUid] = new();
DecalZIndexIndex[ev.EntityUid] = new();
}
public override void Shutdown()

View File

@@ -187,7 +187,7 @@ public sealed class RadarControl : Control
foreach (var grid in _mapManager.FindGridsIntersecting(mapPosition.MapId,
new Box2(mapPosition.Position - RadarRange, mapPosition.Position + RadarRange)))
{
if (grid.Index == ourGridId) continue;
if (grid.GridEntityId == ourGridId) continue;
var gridBody = bodyQuery.GetComponent(grid.GridEntityId);
if (gridBody.Mass < 10f)