Fix more errors

This commit is contained in:
DrSmugleaf
2021-12-06 00:52:58 +01:00
parent 2b1fecbe02
commit 215cae5655
55 changed files with 262 additions and 297 deletions

View File

@@ -3,9 +3,7 @@ using Content.Shared.Pulling;
using Content.Shared.Pulling.Components;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Input.Binding;
using Robust.Shared.IoC;
using Robust.Shared.Players;
namespace Content.Server.Pulling
@@ -29,9 +27,7 @@ namespace Content.Server.Pulling
private void HandleReleasePulledObject(ICommonSession? session)
{
var player = session?.AttachedEntity;
if (player == null)
if (session?.AttachedEntity is not {Valid: true} player)
{
return;
}
@@ -41,7 +37,7 @@ namespace Content.Server.Pulling
return;
}
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(pulled, out SharedPullableComponent? pullable))
if (!EntityManager.TryGetComponent(pulled.Value, out SharedPullableComponent? pullable))
{
return;
}