Cuffable/Handcuff ECS (#14382)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user