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

@@ -19,8 +19,8 @@ namespace Content.Shared.Pulling.Systems
private void OnRelayMoveInput(EntityUid uid, SharedPullableComponent component, RelayMoveInputEvent args)
{
var entity = args.Session.AttachedEntityUid;
if (entity == null || !_blocker.CanMove(entity.Value)) return;
var entity = args.Session.AttachedEntity;
if (!entity.IsValid() || !_blocker.CanMove(entity)) return;
_pullSystem.TryStopPull(component);
}
}

View File

@@ -1,6 +1,5 @@
using Content.Shared.Alert;
using Content.Shared.Hands;
using Content.Shared.Movement.Components;
using Content.Shared.Movement.EntitySystems;
using Content.Shared.Physics.Pull;
using Content.Shared.Pulling.Components;
@@ -31,11 +30,11 @@ namespace Content.Shared.Pulling.Systems
if (component.Pulling == null)
return;
if (component.Pulling == EntityManager.GetEntity(args.BlockingEntity))
if (component.Pulling == args.BlockingEntity)
{
if (EntityManager.TryGetComponent<SharedPullableComponent>(args.BlockingEntity, out var comp))
{
_pullSystem.TryStopPull(comp, EntityManager.GetEntity(uid));
_pullSystem.TryStopPull(comp, uid);
}
}
}

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