Skip to main content

Module boat

Module boat 

Source
Expand description

The trader boat. See docs/TRADE.md, “The boat”.

The boat comes in along the map’s first river from off the map, takes a water path past its trading post’s “boat” point (where it docks), and leaves along the river’s tail.

One state step of the original measures the route point against itself: a length of 0 that is never below 0, so its jump ahead never happens and it always returns true. There is nothing to port for it.

Original: BoatComponent: FUN_140047160, FUN_140047200, FUN_1400ac590; the step that does nothing is FUN_140045af0.

Structs§

Boat
A trader boat: its state (0 sailing in, 1 approaching, 2 docked, 3 casting off, 4 sailing out), its trading post, the dock and its heading, the point it heads for, its route, and its place on the route.
BoatKind
The boat’s character kind (TraderBoat’s CharacterDescription).

Constants§

DOCKED_MESSAGE
The trading post’s state messages: 9 the boat docked, 0xb it went before docking.
GONE_MESSAGE
The message a boat sends when it has left the map.

Functions§

route
The river’s points before it enters the map, a water path (mode 3, types 7..9) from where it enters to the dock and on to where it leaves, then the river’s points after the first one off the map again. Also the dock heading, turned with the river’s flow at the route point nearest the dock.