Difference between revisions of "Oolite JavaScript Reference: Dock"

From Elite Wiki
(Added Proofs of Concept)
(Proofs of Concept: Added Cim's second)
 
Line 35: Line 35:
 
[[File:Multi-Dock Test Carrier.png|right|300px|MultiDock Test]]
 
[[File:Multi-Dock Test Carrier.png|right|300px|MultiDock Test]]
 
== Proofs of Concept ==
 
== Proofs of Concept ==
*[[File:MultiDock Test 0.2.oxp.zip]]: adds a giant metal brick with four docking bays to high planetary orbit for testing of the [[Multiple Docks|multiple docking bay]] traffic control. [[User:Cim|Cim]], 2012.
+
*[[File:MultiDock Test 0.1.zip]] & [[File:MultiDock Test 0.2.oxp.zip]]: adds a giant metal brick with four docking bays to high planetary orbit for testing of the [[Multiple Docks|multiple docking bay]] traffic control. [[User:Cim|Cim]], 2012.
 
*[https://app.box.com/s/o4qs0rd5tirgpioaujxc DockBox-Demo] - [[User:Thargoid|Thargoid]], 2012 - adds blue glowing spheres around the system main station - just fly into them to dock with it. In effect it adds 5 more docks to the station. Something similar could be done easily by using sub-entities or by expanding the script. See his post [https://bb.oolite.space/viewtopic.php?p=166112#p166112 here] for more detail.
 
*[https://app.box.com/s/o4qs0rd5tirgpioaujxc DockBox-Demo] - [[User:Thargoid|Thargoid]], 2012 - adds blue glowing spheres around the system main station - just fly into them to dock with it. In effect it adds 5 more docks to the station. Something similar could be done easily by using sub-entities or by expanding the script. See his post [https://bb.oolite.space/viewtopic.php?p=166112#p166112 here] for more detail.
  
 
[[Category:Oolite JavaScript Reference]]
 
[[Category:Oolite JavaScript Reference]]

Latest revision as of 14:46, 5 July 2026

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/write)

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, though ships that end up there may be allowed to dock anyway, depending on the value of disallowedDockingCollides.

allowsLaunching

allowsLaunching : Boolean (read/write)

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

disallowedDockingCollides

disallowedDockingCollides : Boolean (read/write)

This property is only used if allowsDocking is false. In that situation, when a ship tries to dock with this dock (under normal circumstances, this will either be the player docking manually, or a ship with a customised AI), what happens depends on this property. If true, the ship will collide with the dock and be repelled, taking damage in the process. If false, the ship will be allowed to dock with the station anyway.

dockingQueueLength

dockingQueueLength : Number (read-only)

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

launchingQueueLength

launchingQueueLength : Number (read-only)

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

Links

MultiDock Test

Proofs of Concept