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:
metalgearsloth
2022-10-17 02:49:22 +11:00
committed by GitHub
parent 214d0c1774
commit 1782eb6ad7
22 changed files with 86 additions and 58 deletions

View File

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