Adds stuns
This commit is contained in:
@@ -22,6 +22,8 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
bool CanEmote() => true;
|
||||
|
||||
bool CanAttack() => true;
|
||||
bool CanEquip() => true;
|
||||
bool CanUnequip() => true;
|
||||
}
|
||||
|
||||
public class ActionBlockerSystem : EntitySystem
|
||||
@@ -119,5 +121,29 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
|
||||
return canattack;
|
||||
}
|
||||
|
||||
public static bool CanEquip(IEntity entity)
|
||||
{
|
||||
bool canequip = true;
|
||||
|
||||
foreach (var actionblockercomponents in entity.GetAllComponents<IActionBlocker>())
|
||||
{
|
||||
canequip &= actionblockercomponents.CanEquip();
|
||||
}
|
||||
|
||||
return canequip;
|
||||
}
|
||||
|
||||
public static bool CanUnequip(IEntity entity)
|
||||
{
|
||||
bool canunequip = true;
|
||||
|
||||
foreach (var actionblockercomponents in entity.GetAllComponents<IActionBlocker>())
|
||||
{
|
||||
canunequip &= actionblockercomponents.CanUnequip();
|
||||
}
|
||||
|
||||
return canunequip;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user