Enable nullability in Content.Shared (#3626)

* Enable nullability in Content.Shared

* Fix null errors in server

* aye github i swear on me mom
This commit is contained in:
DrSmugleaf
2021-03-15 21:55:49 +01:00
committed by GitHub
parent 04201e944c
commit 6f012cb9ad
31 changed files with 167 additions and 117 deletions

View File

@@ -13,7 +13,6 @@ using Content.Shared.GameObjects.Components.Strap;
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
using Content.Shared.GameObjects.Verbs;
using Content.Shared.Interfaces;
using Content.Shared.Interfaces.GameObjects.Components;
using Content.Shared.Utility;
using Robust.Server.GameObjects;
using Robust.Shared.Containers;
@@ -237,7 +236,7 @@ namespace Content.Server.GameObjects.Components.Buckle
public override bool TryBuckle(IEntity? user, IEntity to)
{
if (!CanBuckle(user, to, out var strap))
if (user == null || !CanBuckle(user, to, out var strap))
{
return false;
}
@@ -410,7 +409,7 @@ namespace Content.Server.GameObjects.Components.Buckle
return new BuckleComponentState(Buckled, drawDepth, LastEntityBuckledTo, DontCollide);
}
public void Update()
{
if (!DontCollide || Physics == null)