Fix firelock danger indicators (#12327)

* Fix firelock danger indicators

* remove unused arg
This commit is contained in:
Leon Friedrich
2022-11-09 08:55:45 +13:00
committed by GitHub
parent 5f71fc1ea1
commit 8620899a4a
5 changed files with 243 additions and 53 deletions

View File

@@ -8,6 +8,7 @@ public partial class AtmosphereSystem
{
SubscribeLocalEvent<MapAtmosphereComponent, IsTileSpaceMethodEvent>(MapIsTileSpace);
SubscribeLocalEvent<MapAtmosphereComponent, GetTileMixtureMethodEvent>(MapGetTileMixture);
SubscribeLocalEvent<MapAtmosphereComponent, GetTileMixturesMethodEvent>(MapGetTileMixtures);
}
private void MapIsTileSpace(EntityUid uid, MapAtmosphereComponent component, ref IsTileSpaceMethodEvent args)
@@ -28,4 +29,20 @@ public partial class AtmosphereSystem
args.Mixture = component.Mixture?.Clone();
args.Handled = true;
}
private void MapGetTileMixtures(EntityUid uid, MapAtmosphereComponent component, ref GetTileMixturesMethodEvent args)
{
if (args.Handled)
return;
args.Handled = true;
args.Mixtures = new GasMixture?[args.Tiles.Count];
if (component.Mixture == null)
return;
for (var i = 0; i < args.Tiles.Count; i++)
{
args.Mixtures[i] = component.Mixture.Clone();
}
}
}