Enable nullability in Content.Server (#3685)

This commit is contained in:
DrSmugleaf
2021-03-16 15:50:20 +01:00
committed by GitHub
parent 90fec0ed24
commit a5ade526b7
306 changed files with 1616 additions and 1441 deletions

View File

@@ -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);
}