Fix 3000 errors

This commit is contained in:
DrSmugleaf
2021-12-05 18:09:01 +01:00
parent 2bfec7ec62
commit 2a3b7d809d
569 changed files with 2979 additions and 3280 deletions

View File

@@ -6,19 +6,18 @@ using Content.Shared.GameTicking;
using Content.Shared.Input;
using Content.Shared.Physics.Pull;
using Content.Shared.Pulling.Components;
using Content.Shared.Pulling.Events;
using Content.Shared.Rotatable;
using Content.Shared.Verbs;
using JetBrains.Annotations;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.Input.Binding;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Physics;
using Robust.Shared.Players;
using Robust.Shared.IoC;
using Content.Shared.Verbs;
using Robust.Shared.Localization;
namespace Content.Shared.Pulling
{
@@ -203,11 +202,10 @@ namespace Content.Shared.Pulling
private bool HandleMovePulledObject(ICommonSession? session, EntityCoordinates coords, EntityUid uid)
{
if (session?.AttachedEntityUid == null)
if (session?.AttachedEntity is not { } player ||
!player.IsValid())
return false;
var player = session.AttachedEntityUid.Value;
if (!TryGetPulled(player, out var pulled))
{
return false;
@@ -233,7 +231,7 @@ namespace Content.Shared.Pulling
return _pullers.Remove(puller);
}
public EntityUid? GetPulled(EntityUid by)
public EntityUid GetPulled(EntityUid by)
{
return _pullers.GetValueOrDefault(by);
}