OwnedBoat

Group
player
Methods
15
Fields
None

Methods

MethodReturnsDescription
slot()numberThe boat slot, 1 to 5.
owned()booleanWhether the slot holds a boat.
kind()BoatKind?The boat type; nil when the client cannot read the game's boat table.
name()string?The boat's name, its words joined by spaces; nil when none can be read.
parts(){ BoatPart }The parts the boat wears.
teleportFocus()BoatTeleportFocusThe boat's teleport focus.
facilities(){ BoatFacilityKind }The facilities in the boat's hotspots.
stats()BoatStats?The boat's stats: the only place its resistances come from while the player is not aboard. nil when the client cannot read the game's table…
storedHp()number?The hit points the boat was left with; nil when none are stored.
storedMaxHp()number?The maximum hit points the boat was left with; nil when none are stored.
location()BoatLocation?Where the boat is; nil when the game names a dock the client cannot read.
spawned()booleanWhether this is the boat in the world now.
position()BoatPosition?Where the boat is, while it is the boat in the world and loaded near you; nil otherwise.
orientation()number?The boat's orientation, 0 to 2047, while it is the boat in the world and loaded near you; nil otherwise.
cargo(){ ItemHandle }The cargo hold's items, read-only. Its size is stats().cargoSize.

Returned by

MethodReturnsDescription
Sailing.boats{ OwnedBoat }The player's boats, by slot: the slots that hold one.

Method details

name

name: (OwnedBoat) -> string?

The boat's name, its words joined by spaces; nil when none can be read.

stats

stats: (OwnedBoat) -> BoatStats?

The boat's stats: the only place its resistances come from while the player is not aboard. nil when the client cannot read the game's tables, never a boat of zeros.

storedHp

storedHp: (OwnedBoat) -> number?

The hit points the boat was left with; nil when none are stored.

storedMaxHp

storedMaxHp: (OwnedBoat) -> number?

The maximum hit points the boat was left with; nil when none are stored.

spawned

spawned: (OwnedBoat) -> boolean

Whether this is the boat in the world now.

orientation

orientation: (OwnedBoat) -> number?

The boat's orientation, 0 to 2047, while it is the boat in the world and loaded near you; nil otherwise.