Methods
assignShipsToPlans()
assigns free ships to plans that need some
- Source:
canFishSafely()
check if we can safely fish at the fish position
- Source:
createTransportIfNeeded()
create a transport from a garrisoned ship to a land location
needed at start game when starting with a garrisoned ship
- Source:
getBestShip()
goal can be either attack (choose ship with best arrowCount) or transport (choose ship with best capacity)
- Source:
getFishSea()
Get the sea, cache it if not yet done and check if in opensea
- Source:
getUnconnectedSeas()
get the list of seas (or lands) around this region not connected by a dock
- Source:
init()
More initialisation for stuff that needs the gameState
- Source:
isShipBoarding()
Return true if this ship is likeky (un)garrisoning units
- Source:
moveApart()
let blocking ships move apart from active ships (waiting for a better pathfinder)
TODO Ships entity collections are currently in two parts as the trader ships are dealt with
in the tradeManager. That should be modified to avoid dupplicating all the code here.
- Source:
requireTransport()
complete already existing plan or create a new one for this requirement
(many units can then call this separately and end up in the same plan)
TODO check garrison classes
- Source:
splitTransport()
split a transport plan in two, moving all entities not yet affected to a ship in the new plan
- Source: