(d34fb2097) Major refactoring: - Replace custom logic regarding subobjectives with generic logic. - Ensure that all the objectives follow the same logic, reduce duplicate code where possible.
This commit is contained in:
@@ -133,9 +133,10 @@ namespace Barotrauma
|
||||
{
|
||||
foreach (T target in GetList())
|
||||
{
|
||||
// The bots always find targets when the objective is an order.
|
||||
if (objectiveManager.CurrentOrder != this)
|
||||
{
|
||||
// Battery or pump states cannot be reported and therefore we must ignore them -> the bots always know if they require attention.
|
||||
// Battery or pump states cannot currently be reported (not implemented) and therefore we must ignore them -> the bots always know if they require attention.
|
||||
bool ignore = this is AIObjectiveChargeBatteries || this is AIObjectivePumpWater;
|
||||
if (!ignore && !ReportedTargets.Contains(target)) { continue; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user