Getting one
player:sailing():voyage()
Methods
| Method | Returns | Description |
|---|
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() | 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. |
|---|
status() | VoyageStatus | How 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
| Method | Returns | Description |
|---|
Sailing.voyage | Voyage | This 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: (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: (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: (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: (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.
status: (Voyage) -> VoyageStatus
How the voyage stands, without advancing it. Its notes are handed over once.
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".