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

@@ -2,9 +2,8 @@
using Content.Shared.Construction;
using JetBrains.Annotations;
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.Utility;
namespace Content.Server.Construction.Conditions
@@ -17,14 +16,14 @@ namespace Content.Server.Construction.Conditions
public async Task<bool> Condition(IEntity entity)
{
if (!entity.TryGetComponent(out IPhysBody physics)) return false;
if (!entity.TryGetComponent(out IPhysBody? physics)) return false;
return (physics.BodyType == BodyType.Static && Anchored) || (physics.BodyType != BodyType.Static && !Anchored);
}
public bool DoExamine(IEntity entity, FormattedMessage message, bool inDetailsRange)
{
if (!entity.TryGetComponent(out IPhysBody physics)) return false;
if (!entity.TryGetComponent(out IPhysBody? physics)) return false;
switch (Anchored)
{