(633f44200) Emptying the "required items" field of an item in the sub editor now removes the item requirements (instead of using the default ones)
This commit is contained in:
@@ -1104,20 +1104,6 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
else if (targetCharacter.AIController is EnemyAIController enemy)
|
||||
{
|
||||
targetingTag = "dead";
|
||||
if (targetCharacter.Submarine != Character.Submarine)
|
||||
{
|
||||
// In a different sub or the target is outside when we are inside or vice versa -> Ignore the target
|
||||
continue;
|
||||
}
|
||||
else if (targetCharacter.CurrentHull != Character.CurrentHull)
|
||||
{
|
||||
// In the same sub, halve the priority, if not in the same hull.
|
||||
valueModifier = 0.5f;
|
||||
}
|
||||
}
|
||||
else if (targetCharacter.AIController is EnemyAIController enemy)
|
||||
{
|
||||
if (enemy.combatStrength > combatStrength)
|
||||
{
|
||||
@@ -1230,7 +1216,7 @@ namespace Barotrauma
|
||||
valueModifier = isOutdoor ? 1 : 0;
|
||||
valueModifier *= isOpen ? 5 : 1;
|
||||
}
|
||||
for (int i = 0; i < s.Sections.Length; i++)
|
||||
else if (targetCharacter.CurrentHull != Character.CurrentHull)
|
||||
{
|
||||
valueModifier = isOutdoor ? 0 : 1;
|
||||
valueModifier *= isOpen ? 0 : 1;
|
||||
@@ -1252,6 +1238,11 @@ namespace Barotrauma
|
||||
|
||||
valueModifier *= targetingPriorities[targetingTag].Priority;
|
||||
|
||||
if (targetingTag == null) continue;
|
||||
if (!targetingPriorities.ContainsKey(targetingTag)) continue;
|
||||
|
||||
valueModifier *= targetingPriorities[targetingTag].Priority;
|
||||
|
||||
if (valueModifier == 0.0f) continue;
|
||||
|
||||
Vector2 toTarget = target.WorldPosition - character.WorldPosition;
|
||||
|
||||
Reference in New Issue
Block a user