Difference between revisions of "Oolite JavaScript Reference: Station"
Eric Walch (talk | contribs) (Added alert level to station) |
m (corrected the added-templates) |
||
Line 7: | Line 7: | ||
== Properties == |
== Properties == |
||
=== <code>alertCondition</code> === |
=== <code>alertCondition</code> === |
||
− | {{Oolite- |
+ | {{Oolite-prop-added|1.72}} |
'''alertCondition''' : Number (read/write, integer) |
'''alertCondition''' : Number (read/write, integer) |
||
Returns the current alert condition. 1 = Green, 2 = Yellow, 3 = Red. |
Returns the current alert condition. 1 = Green, 2 = Yellow, 3 = Red. |
||
Line 24: | Line 24: | ||
== Methods == |
== Methods == |
||
− | {{Oolite-prop-added|1.73}} |
||
=== <code>dockPlayer</code> === |
=== <code>dockPlayer</code> === |
||
+ | {{Oolite-method-added|1.73}} |
||
'''dockPlayer()''' : Boolean |
'''dockPlayer()''' : Boolean |
||
This method docks the player at the specified station. Returns false if docking fails, otherwise true. |
This method docks the player at the specified station. Returns false if docking fails, otherwise true. |
||
− | {{Oolite-prop-added|1.74}} |
||
=== <code>launchShipWithRole</code> === |
=== <code>launchShipWithRole</code> === |
||
+ | {{Oolite-method-added|1.74}} |
||
'''launchShipWithRole(role : string)''' : Ship |
'''launchShipWithRole(role : string)''' : Ship |
||
This method adds a ship with given role to the launching queue at the specified station. Returns the entity of the chosen ship. |
This method adds a ship with given role to the launching queue at the specified station. Returns the entity of the chosen ship. |
Revision as of 15:39, 24 November 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.
Contents
Properties
alertCondition
This property was added in Oolite test release 1.72.
alertCondition : Number (read/write, integer)
Returns the current alert condition. 1 = Green, 2 = Yellow, 3 = Red.
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
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
dockPlayer
This method was added in Oolite test release 1.73.
dockPlayer() : Boolean
This method docks the player at the specified station. Returns false if docking fails, otherwise true.
launchShipWithRole
This method was added in Oolite test release 1.74.
launchShipWithRole(role : string) : Ship
This method adds a ship with given role to the launching queue at the specified station. Returns the entity of the chosen ship.