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

@@ -15,7 +15,7 @@ public sealed class VendingMachineContrabandWireAction : BaseToggleWireAction
public override StatusLightData? GetStatusLightData(Wire wire)
{
var lightState = StatusLightState.Off;
if (IsPowered(wire.Owner) && EntityManager.TryGetComponent(wire.Owner, out VendingMachineComponent vending))
if (IsPowered(wire.Owner) && EntityManager.TryGetComponent(wire.Owner, out VendingMachineComponent? vending))
{
lightState = vending.Contraband
? StatusLightState.BlinkingSlow
@@ -30,7 +30,7 @@ public sealed class VendingMachineContrabandWireAction : BaseToggleWireAction
public override void ToggleValue(EntityUid owner, bool setting)
{
if (EntityManager.TryGetComponent(owner, out VendingMachineComponent vending))
if (EntityManager.TryGetComponent(owner, out VendingMachineComponent? vending))
{
vending.Contraband = !setting;
}
@@ -38,6 +38,6 @@ public sealed class VendingMachineContrabandWireAction : BaseToggleWireAction
public override bool GetValue(EntityUid owner)
{
return EntityManager.TryGetComponent(owner, out VendingMachineComponent vending) && !vending.Contraband;
return EntityManager.TryGetComponent(owner, out VendingMachineComponent? vending) && !vending.Contraband;
}
}