Inline TryGetComponent completely, for real
This commit is contained in:
@@ -4,6 +4,7 @@ using Content.Shared.Pulling.Components;
|
||||
using Content.Shared.Pulling;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
namespace Content.Server.Alert.Click
|
||||
@@ -20,7 +21,7 @@ namespace Content.Server.Alert.Click
|
||||
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(args.Player.Uid))
|
||||
return;
|
||||
|
||||
if (args.Player.TryGetComponent<SharedPullableComponent>(out var playerPullable))
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent<SharedPullableComponent?>(args.Player.Uid, out var playerPullable))
|
||||
{
|
||||
EntitySystem.Get<SharedPullingSystem>().TryStopPull(playerPullable);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user