Fix issues with system ID 0 in trader AIs
This commit is contained in:
parent
9153f5b968
commit
408f8ce19d
@ -2501,14 +2501,14 @@ PriorityAIController.prototype.conditionCargoIsProfitableHere = function()
|
||||
{
|
||||
// cargo is always considered profitable in the designated
|
||||
// destination system (assume they have a prepared buyer)
|
||||
if (this.ship.destinationSystem && this.ship.destinationSystem == system.ID)
|
||||
if (this.ship.destinationSystem > -1 && this.ship.destinationSystem == system.ID)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// cargo is never considered profitable in the designated source
|
||||
// system (or you could get ships launching and immediately
|
||||
// redocking)
|
||||
if (this.ship.homeSystem && this.ship.homeSystem == system.ID)
|
||||
if (this.ship.homeSystem > -1 && this.ship.homeSystem == system.ID)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user