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
|
// cargo is always considered profitable in the designated
|
||||||
// destination system (assume they have a prepared buyer)
|
// 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;
|
return true;
|
||||||
}
|
}
|
||||||
// cargo is never considered profitable in the designated source
|
// cargo is never considered profitable in the designated source
|
||||||
// system (or you could get ships launching and immediately
|
// system (or you could get ships launching and immediately
|
||||||
// redocking)
|
// redocking)
|
||||||
if (this.ship.homeSystem && this.ship.homeSystem == system.ID)
|
if (this.ship.homeSystem > -1 && this.ship.homeSystem == system.ID)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user