Convert atmos device events to ref events (#22843)

This commit is contained in:
Kara
2023-12-21 18:48:18 -07:00
committed by GitHub
parent ee0c3c4a69
commit bc1f8b0e40
25 changed files with 111 additions and 93 deletions

View File

@@ -134,7 +134,7 @@ public sealed class GasCanisterSystem : EntitySystem
private void OnCanisterChangeReleaseValve(EntityUid uid, GasCanisterComponent canister, GasCanisterChangeReleaseValveMessage args)
{
var impact = LogImpact.High;
var impact = LogImpact.High;
// filling a jetpack with plasma is less important than filling a room with it
impact = canister.GasTankSlot.HasItem ? LogImpact.Medium : LogImpact.High;
@@ -152,7 +152,7 @@ public sealed class GasCanisterSystem : EntitySystem
DirtyUI(uid, canister);
}
private void OnCanisterUpdated(EntityUid uid, GasCanisterComponent canister, AtmosDeviceUpdateEvent args)
private void OnCanisterUpdated(EntityUid uid, GasCanisterComponent canister, ref AtmosDeviceUpdateEvent args)
{
_atmos.React(canister.Air, canister);
@@ -167,7 +167,7 @@ public sealed class GasCanisterSystem : EntitySystem
{
MixContainerWithPipeNet(canister.Air, net.Air);
}
// Release valve is open, release gas.
if (canister.ReleaseValve)
{
@@ -250,9 +250,9 @@ public sealed class GasCanisterSystem : EntitySystem
}
// Preventing inserting a tank since if its locked you cant remove it.
if (!CheckLocked(uid, component, args.User.Value))
if (!CheckLocked(uid, component, args.User.Value))
return;
args.Cancelled = true;
}