Add readonly where it is missing and fix those field names according to their modifiers (#2589)
This commit is contained in:
@@ -15,7 +15,7 @@ namespace Content.Server.AI.Utility.Actions.Combat.Melee
|
||||
{
|
||||
public sealed class EquipMelee : UtilityAction
|
||||
{
|
||||
private IEntity _entity;
|
||||
private readonly IEntity _entity;
|
||||
|
||||
public EquipMelee(IEntity owner, IEntity entity, float weight) : base(owner)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Content.Server.AI.Utility.Actions.Combat.Melee
|
||||
{
|
||||
public sealed class MeleeWeaponAttackEntity : UtilityAction
|
||||
{
|
||||
private IEntity _entity;
|
||||
private readonly IEntity _entity;
|
||||
|
||||
public MeleeWeaponAttackEntity(IEntity owner, IEntity entity, float weight) : base(owner)
|
||||
{
|
||||
@@ -58,7 +58,7 @@ namespace Content.Server.AI.Utility.Actions.Combat.Melee
|
||||
var equipped = context.GetState<EquippedEntityState>().GetValue();
|
||||
context.GetState<WeaponEntityState>().SetValue(equipped);
|
||||
}
|
||||
|
||||
|
||||
protected override IReadOnlyCollection<Func<float>> GetConsiderations(Blackboard context)
|
||||
{
|
||||
var considerationsManager = IoCManager.Resolve<ConsiderationsManager>();
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Content.Server.AI.Utility.Actions.Combat.Melee
|
||||
{
|
||||
public sealed class PickUpMeleeWeapon : UtilityAction
|
||||
{
|
||||
private IEntity _entity;
|
||||
private readonly IEntity _entity;
|
||||
|
||||
public PickUpMeleeWeapon(IEntity owner, IEntity entity, float weight) : base(owner)
|
||||
{
|
||||
@@ -34,7 +34,7 @@ namespace Content.Server.AI.Utility.Actions.Combat.Melee
|
||||
context.GetState<TargetEntityState>().SetValue(_entity);
|
||||
context.GetState<WeaponEntityState>().SetValue(_entity);
|
||||
}
|
||||
|
||||
|
||||
protected override IReadOnlyCollection<Func<float>> GetConsiderations(Blackboard context)
|
||||
{
|
||||
var considerationsManager = IoCManager.Resolve<ConsiderationsManager>();
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Content.Server.AI.Utility.Actions.Combat.Melee
|
||||
{
|
||||
public sealed class UnarmedAttackEntity : UtilityAction
|
||||
{
|
||||
private IEntity _entity;
|
||||
private readonly IEntity _entity;
|
||||
|
||||
public UnarmedAttackEntity(IEntity owner, IEntity entity, float weight) : base(owner)
|
||||
{
|
||||
@@ -44,7 +44,7 @@ namespace Content.Server.AI.Utility.Actions.Combat.Melee
|
||||
ActionOperators = new Queue<AiOperator>(new AiOperator[]
|
||||
{
|
||||
moveOperator,
|
||||
new UnarmedCombatOperator(Owner, _entity),
|
||||
new UnarmedCombatOperator(Owner, _entity),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace Content.Server.AI.Utility.Actions.Combat.Melee
|
||||
protected override IReadOnlyCollection<Func<float>> GetConsiderations(Blackboard context)
|
||||
{
|
||||
var considerationsManager = IoCManager.Resolve<ConsiderationsManager>();
|
||||
|
||||
|
||||
return new[]
|
||||
{
|
||||
considerationsManager.Get<TargetIsDeadCon>()
|
||||
|
||||
Reference in New Issue
Block a user