Enable nullability in Content.Server (#3685)
This commit is contained in:
@@ -5,9 +5,8 @@ using Content.Shared.Atmos;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.GameObjects.Components.Damage;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Temperature
|
||||
@@ -68,9 +67,9 @@ namespace Content.Server.GameObjects.Components.Temperature
|
||||
damageType = DamageType.Cold;
|
||||
}
|
||||
|
||||
if (Owner.TryGetComponent(out ServerAlertsComponent status))
|
||||
if (Owner.TryGetComponent(out ServerAlertsComponent? status))
|
||||
{
|
||||
switch(CurrentTemperature)
|
||||
switch (CurrentTemperature)
|
||||
{
|
||||
// Cold strong.
|
||||
case var t when t <= 260:
|
||||
@@ -111,7 +110,7 @@ namespace Content.Server.GameObjects.Components.Temperature
|
||||
|
||||
if (!damageType.HasValue) return;
|
||||
|
||||
if (!Owner.TryGetComponent(out IDamageableComponent component)) return;
|
||||
if (!Owner.TryGetComponent(out IDamageableComponent? component)) return;
|
||||
component.ChangeDamage(damageType.Value, tempDamage, false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user