SeaCost

A value shape that methods take or return.

Methods
None
Fields
8

Fields

FieldTypeDescription
reachedbooleanThe boat sails there.
ticksnumber?Sailing ticks at the boat's pace: from rest, without boosts, boarding, the helm or landing.
costnumber?The route's cost as PathQuery:cost() counts it (a tick a straight tile, more in danger).
straightnumber?The route's sail moves along an axis.
diagonalnumber?The route's diagonal sail moves.
stopsAtWorldPoint?Where the boat stops: a dock's berth, or the sea tile near the one asked.
landablebooleanA dock the player may disembark at now: its Sailing level, quest and gates. false for a tile.
problemstring?Why it is not reached: "NO_BOAT", "BOAT_UNREACHABLE" or "CUTOFF_REACHED".

Returned by

MethodReturnsDescription
SeaCostQuery.costs{ SeaCost }?One row a target, in the order asked (the docks, then the tiles), or nil until answered. ticks is the sailing time at the boat's pace (…

Field details

ticks

ticks: number?

Sailing ticks at the boat's pace: from rest, without boosts, boarding, the helm or landing.

Returns
nil when not reached.

cost

cost: number?

The route's cost as PathQuery:cost() counts it (a tick a straight tile, more in danger).

Returns
nil when not reached.

straight

straight: number?

The route's sail moves along an axis.

Returns
nil when not reached.

diagonal

diagonal: number?

The route's diagonal sail moves.

Returns
nil when not reached.

stopsAt

stopsAt: WorldPoint?

Where the boat stops: a dock's berth, or the sea tile near the one asked.

Returns
nil when not reached.

problem

problem: string?

Why it is not reached: "NO_BOAT", "BOAT_UNREACHABLE" or "CUTOFF_REACHED".

Returns
nil when reached.