Fix even more warnings (#11968)
Also more instances of someone using TryComp instead of HasComp Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -15,12 +15,14 @@ namespace Content.Server.Alert.Click
|
||||
{
|
||||
public void AlertClicked(EntityUid player)
|
||||
{
|
||||
if (!EntitySystem.Get<ActionBlockerSystem>().CanInteract(player, null))
|
||||
var entityManager = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
if (!entityManager.System<ActionBlockerSystem>().CanInteract(player, null))
|
||||
return;
|
||||
|
||||
if (IoCManager.Resolve<IEntityManager>().TryGetComponent<SharedPullableComponent?>(player, out var playerPullable))
|
||||
if (entityManager.TryGetComponent<SharedPullableComponent?>(player, out var playerPullable))
|
||||
{
|
||||
EntitySystem.Get<SharedPullingSystem>().TryStopPull(playerPullable);
|
||||
entityManager.System<SharedPullingSystem>().TryStopPull(playerPullable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user