Skip to content

Commit

Permalink
Add AI support for knowing it can trade with interstellar trade beaco…
Browse files Browse the repository at this point in the history
…ns in case it ever acquires any
  • Loading branch information
Skeletonxf committed Jan 26, 2021
1 parent 7797b90 commit 41bd02b
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,15 @@ final class Resources : AIComponent {
}

bool canTradeBetween(Object& fromObj, Object& toObj) {
// [[ MODIFY BASE GAME START ]]
// Interstellar trade beacons permit trade in deep space
if (toObj.isPlanet) {
Planet@ planet = cast<Planet>(toObj);
if (planet.allowPathlessImport > 0) {
return true;
}
}
// [[ MODIFY BASE GAME END ]]
Region@ fromRegion = fromObj.region;
if(fromRegion is null)
return false;
Expand Down

0 comments on commit 41bd02b

Please sign in to comment.