2020-06-25 01:43:58 +10:00
|
|
|
using Content.Server.AI.WorldState;
|
|
|
|
|
using Content.Server.AI.WorldState.States;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Server.Weapon.Melee.Components;
|
2020-06-25 01:43:58 +10:00
|
|
|
|
|
|
|
|
namespace Content.Server.AI.Utility.Considerations.Combat.Melee
|
|
|
|
|
{
|
|
|
|
|
public sealed class CanUnarmedCombatCon : Consideration
|
|
|
|
|
{
|
2020-07-08 09:37:35 +10:00
|
|
|
protected override float GetScore(Blackboard context)
|
2020-06-25 01:43:58 +10:00
|
|
|
{
|
2021-12-05 18:09:01 +01:00
|
|
|
var entityManager = IoCManager.Resolve<IEntityManager>();
|
|
|
|
|
var entity = context.GetState<SelfState>().GetValue();
|
|
|
|
|
return entityManager.HasComponent<UnarmedCombatComponent>(entity) ? 1.0f : 0.0f;
|
2020-06-25 01:43:58 +10:00
|
|
|
}
|
|
|
|
|
}
|
2021-03-16 15:50:20 +01:00
|
|
|
}
|