Difference between revisions of "Oolite JavaScript Reference: Dock"
(Property rename) |
(Updating BB links) |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
<small>'''Prototype:''' <code>[[Oolite JavaScript Reference: Ship|Ship]]</code></small><br /> | <small>'''Prototype:''' <code>[[Oolite JavaScript Reference: Ship|Ship]]</code></small><br /> | ||
<small>'''Subtypes:''' none</small> | <small>'''Subtypes:''' none</small> | ||
Line 12: | Line 10: | ||
=== allowsDocking === | === allowsDocking === | ||
'''allowsDocking''' : Boolean (read/write) | '''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, | + | If <code>true</code>, this dock allows ships to dock with it, and the station's traffic control will direct them to this dock. If <code>false</code>, 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 <code>[[#disallowedDockingCollides|disallowedDockingCollides]]</code>. |
=== allowsLaunching === | === allowsLaunching === | ||
'''allowsLaunching''' : Boolean (read/write) | '''allowsLaunching''' : Boolean (read/write) | ||
− | Whether or not the dock allows ships to launch from it. If all of a station | + | 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 === | ||
− | '''disallowedDockingCollides''' : Boolean (read | + | '''disallowedDockingCollides''' : Boolean (read/write) |
− | This property is only used if <code>allowsDocking</code> 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. | + | This property is only used if <code>[[#allowsDocking|allowsDocking]]</code> is <code>false</code>. 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 <code>true</code>, the ship will collide with the dock and be repelled, taking damage in the process. If <code>false</code>, the ship will be allowed to dock with the station anyway. |
− | |||
− | If | ||
=== dockingQueueLength === | === dockingQueueLength === | ||
Line 28: | Line 24: | ||
The number of ships currently queued to dock at this port by station traffic control. | 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. | The number of ships currently queued to launch from this port by station traffic control. | ||
+ | == Links == | ||
+ | *[[DockingAI]] | ||
+ | *[https://bb.oolite.space/viewtopic.php?f=4&t=21444 Docking Tunnel Length] (2023: is there a point where the dock tunnel is too long?) | ||
+ | *[[Docking]] - see list of OXPs | ||
[[Category:Oolite JavaScript Reference]] | [[Category:Oolite JavaScript Reference]] |
Latest revision as of 02:18, 29 February 2024
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 Station
s have at least one Dock object associated with them.
Contents
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
- DockingAI
- Docking Tunnel Length (2023: is there a point where the dock tunnel is too long?)
- Docking - see list of OXPs