Cuffable/Handcuff ECS (#14382)

This commit is contained in:
Nemanja
2023-03-13 19:34:26 -04:00
committed by GitHub
parent 59bf67ec8c
commit 49f7575298
25 changed files with 947 additions and 933 deletions

View File

@@ -1,4 +1,4 @@
using Content.Server.Cuffs.Components;
using Content.Server.Cuffs;
using Content.Shared.Alert;
using JetBrains.Annotations;
@@ -13,10 +13,9 @@ namespace Content.Server.Alert.Click
{
public void AlertClicked(EntityUid player)
{
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(player, out CuffableComponent? cuffableComponent))
{
cuffableComponent.TryUncuff(player);
}
var entityManager = IoCManager.Resolve<IEntityManager>();
var cuffableSys = entityManager.System<CuffableSystem>();
cuffableSys.TryUncuff(player, player);
}
}
}