Voyage

Group
player
Methods
6
Fields
None

Getting one

player:sailing():voyage()

Methods

MethodReturnsDescription
start(VoyageOptions)(boolean, string?)Start a voyage. Returns at once; the voyage goes on by itself. One already under way is dropped. Raises for options it cannot read.
done()()Tell the voyage the game showed its click done (the game's word): it arrives as its arrival says. Nothing with no voyage started.
missed()()Tell the voyage the game refused its click ("I can't reach that!"): its goal is a tile tighter and the boat comes round for it, three times…
isSailing()booleanWhether it wants the ticks the host gives it: under way, awaiting the game's word, or un-setting the sails after a stop or a failure.
status()VoyageStatusHow the voyage stands, without advancing it. Its notes are handed over once.
stop()()End the voyage and un-set the sails: the boat is not left sailing with nobody steering. The button is pressed at once where it can be, and…

Returned by

MethodReturnsDescription
Sailing.voyageVoyageThis plugin's voyage, which sails the boat the player is on through areas to a goal area, its click there made for you. There is one per pl…

Method details

start

start: (Voyage, VoyageOptions) -> (boolean, string?)

Start a voyage. Returns at once; the voyage goes on by itself. One already under way is dropped. Raises for options it cannot read.

options
What to sail.
Returns
true once the voyage is started.

done

done: (Voyage) -> ()

Tell the voyage the game showed its click done (the game's word): it arrives as its arrival says. Nothing with no voyage started.

missed

missed: (Voyage) -> ()

Tell the voyage the game refused its click ("I can't reach that!"): its goal is a tile tighter and the boat comes round for it, three times at the most, then it fails "UNREACHABLE".

isSailing

isSailing: (Voyage) -> boolean

Whether it wants the ticks the host gives it: under way, awaiting the game's word, or un-setting the sails after a stop or a failure.

stop

stop: (Voyage) -> ()

End the voyage and un-set the sails: the boat is not left sailing with nobody steering. The button is pressed at once where it can be, and again over the next ticks until the boat reads stopped. The status reads "idle".