17 lines
578 B
C#
17 lines
578 B
C#
using Content.Server.AI.WorldState;
|
|
using Content.Server.AI.WorldState.States;
|
|
using Content.Server.Weapon.Melee.Components;
|
|
|
|
namespace Content.Server.AI.Utility.Considerations.Combat.Melee
|
|
{
|
|
public sealed class CanUnarmedCombatCon : Consideration
|
|
{
|
|
protected override float GetScore(Blackboard context)
|
|
{
|
|
var entityManager = IoCManager.Resolve<IEntityManager>();
|
|
var entity = context.GetState<SelfState>().GetValue();
|
|
return entityManager.HasComponent<UnarmedCombatComponent>(entity) ? 1.0f : 0.0f;
|
|
}
|
|
}
|
|
}
|