Oolite JavaScript Reference: Dock

From Elite Wiki
Revision as of 11:50, 13 July 2012 by Cim (talk | contribs) (Document new Dock object)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is a new class planned for 1.77 and may be subject to significant change before 1.77 is released.

Prototype: Ship
Subtypes: none

The Dock class is an Entity representing a docking port on a carrier or station. A Dock has all the properties and methods of a Ship, and some others.

All Stations have at least one Dock object associated with them.

Properties

This property was added in Oolite test release 1.77.

allowsDocking

allowsDocking : Boolean (read-only)

If true, this dock allows ships to dock with it, and the station's traffic control will direct them to this dock. If false, station control will not direct any ships to this dock, and ships attempting to dock will bounce off, taking damage.

allowsPlayerDocking

allowsPlayerDocking : Boolean (read-only)

If this is false, the player will not be allowed to dock with this dock. If allowsDocking is true, then NPCs will be able to dock here.

If this is true, the player will be allowed to dock with this dock even if allowsDocking is false. NPCs that somehow end up next to this dock will also be docked in this case, though traffic control will never intentionally put them in this situation.

allowsLaunching

allowsLaunching : Boolean (read-only)

Whether or not the dock allows ships to launch from it. If all of a station's docks disallow launching, the player will still be allowed to launch from one of them.

dockingQueueLength

dockingQueueLength : Number (read-only)

The number of ships currently queued to dock at this port by station traffic control.

launchQueueLength

launchQueueLength : Number (read-only)

The number of ships currently queued to launch from this port by station traffic control.