Missing nullables (#8634)

This commit is contained in:
Leon Friedrich
2022-06-04 19:17:48 +12:00
committed by GitHub
parent 31090b9c25
commit ca7960382b
59 changed files with 109 additions and 109 deletions

View File

@@ -18,7 +18,7 @@ public sealed class VendingMachineEjectItemWireAction : BaseWireAction
var lightState = StatusLightState.Off;
if (IsPowered(wire.Owner)
&& EntityManager.TryGetComponent(wire.Owner, out VendingMachineComponent vending))
&& EntityManager.TryGetComponent(wire.Owner, out VendingMachineComponent? vending))
{
lightState = vending.CanShoot
? StatusLightState.BlinkingFast
@@ -40,7 +40,7 @@ public sealed class VendingMachineEjectItemWireAction : BaseWireAction
public override bool Cut(EntityUid user, Wire wire)
{
if (EntityManager.TryGetComponent(wire.Owner, out VendingMachineComponent vending))
if (EntityManager.TryGetComponent(wire.Owner, out VendingMachineComponent? vending))
{
vending.CanShoot = true;
}
@@ -50,7 +50,7 @@ public sealed class VendingMachineEjectItemWireAction : BaseWireAction
public override bool Mend(EntityUid user, Wire wire)
{
if (EntityManager.TryGetComponent(wire.Owner, out VendingMachineComponent vending))
if (EntityManager.TryGetComponent(wire.Owner, out VendingMachineComponent? vending))
{
vending.CanShoot = false;
}