Difference between revisions of "Oolite JavaScript Reference: Station"

From Elite Wiki
(<code>hasNPCTraffic</code>)
(Added dockPlayer and requiresDockingClearance)
Line 11: Line 11:
   
 
=== <code>isMainStation</code> ===
 
=== <code>isMainStation</code> ===
  +
{{Oolite-prop-added|1.73}}
 
'''isMainStation''' : Boolean (read-only)
 
'''isMainStation''' : Boolean (read-only)
 
<code>true</code> if the station is the main station of the system, <code>false</code> otherwise.
 
<code>true</code> if the station is the main station of the system, <code>false</code> otherwise.
  +
  +
=== <code>requiresDockingClearance</code> ===
  +
'''requiresDockingClearance''' : Boolean (read/write)
  +
<code>true</code> if the station requires docking clearance, <code>false</code> otherwise.
  +
  +
== Methods ==
  +
{{Oolite-prop-added|1.73}}
  +
=== <code>dockPlayer</code> ===
  +
'''dockPlayer()''' : Boolean
  +
This method docks the player at the specified station. Returns false if docking fails, otherwise true.
   
 
[[Category:Oolite scripting]]
 
[[Category:Oolite scripting]]

Revision as of 16:40, 31 August 2009

Prototype: Ship

This class was added in Oolite test release 1.70.

The Station class is an Entity representing a station or carrier (i.e., a ship with a docking port). A Station has all the properties and methods of a Ship, and some others.

Properties

hasNPCTraffic

hasNPCTraffic : Boolean (read/write)

If true, the station has associated non-player traffic, such as shuttles, patrol ships and scavengers. Corresponds to the has_npc_traffic shipdata.plist key.

isMainStation

This property was added in Oolite test release 1.73.

isMainStation : Boolean (read-only)

true if the station is the main station of the system, false otherwise.

requiresDockingClearance

requiresDockingClearance : Boolean (read/write)

true if the station requires docking clearance, false otherwise.

Methods

This property was added in Oolite test release 1.73.

dockPlayer

dockPlayer() : Boolean 

This method docks the player at the specified station. Returns false if docking fails, otherwise true.