Difference between revisions of "Oolite JavaScript Reference: Wormhole"

From Elite Wiki
(Added in v1.79: Wormhole entity with properties arrivalTime, destination, expiryTime and origin.)
 
m (cleared up wording, modded link)
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:
 
<small>'''Subtypes:''' none</small>
 
<small>'''Subtypes:''' none</small>
  
The '''<code>Wormhole</code>''' class is an <code>[[Oolite/Development/Scripting/Class/Entity|Entity]]</code> representing an opened gate to another [[Oolite JavaScript Reference: System|System]]. A <code>Wormhole</code> has all the properties and methods of a <code>Entity</code>, and several others.
+
The '''<code>Wormhole</code>''' class is an <code>[[Oolite/Development/Scripting/Class/Entity|Entity]]</code> representing an opened gate to another [[Oolite JavaScript Reference: System|System]]. A <code>Wormhole</code> has all the properties and methods of an <code>Entity</code>, and several others.
  
 
In v1.79 available for the entry Wormholes only.
 
In v1.79 available for the entry Wormholes only.
Line 10: Line 10:
 
{{Oolite-prop-added|1.79}}
 
{{Oolite-prop-added|1.79}}
 
  '''arrivalTime''' : Number (read-only)
 
  '''arrivalTime''' : Number (read-only)
The game real time in seconds when the player will arrive to the other system if fly into the Wormhole. More info can be found in [[Time_scales_in_Oolite]].
+
The [[Time_scales_in_Oolite#Game real time|game real time]] in seconds when the player will arrive at the destination system after entering the wormhole.
  
 
=== <code>destination</code> ===
 
=== <code>destination</code> ===
 
{{Oolite-prop-added|1.79}}
 
{{Oolite-prop-added|1.79}}
  '''destination''' : System (read-only)
+
  '''destination''' : Number (read-only)
The Wormhole ending in this destination [[Oolite JavaScript Reference: System|System]].
+
The [[Oolite JavaScript Reference: System#ID|ID]] of the destination [[Oolite JavaScript Reference: System|System]].
  
 
=== <code>expiryTime</code> ===
 
=== <code>expiryTime</code> ===
 
{{Oolite-prop-added|1.79}}
 
{{Oolite-prop-added|1.79}}
 
  '''expiryTime''' : Number (read-only)
 
  '''expiryTime''' : Number (read-only)
The Wormhole will collapse after this many seconds.
+
The [[Time_scales_in_Oolite#Game_real_time|game real time]] in seconds when the Wormhole will collapse.
  
 
=== <code>origin</code> ===
 
=== <code>origin</code> ===
 
{{Oolite-prop-added|1.79}}
 
{{Oolite-prop-added|1.79}}
  '''origin''' : System (read/write)
+
  '''origin''' : Number (read/write)
The Wormhole opened originally in this [[Oolite JavaScript Reference: System|System]].  
+
The [[Oolite JavaScript Reference: System#ID|ID]] of the [[Oolite JavaScript Reference: System|System]] where the Wormhole originally opened.
  
In v1.79 always equal with the current [[Oolite JavaScript Reference: System|System]] due to available for the entry Wormholes only.
+
In v1.79 always equal with the ID of the current [[Oolite JavaScript Reference: System|System]] due to available for the entry Wormholes only.
  
 
[[Category:Oolite JavaScript Reference]]
 
[[Category:Oolite JavaScript Reference]]

Latest revision as of 16:14, 4 October 2022

Prototype: Entity
Subtypes: none

The Wormhole class is an Entity representing an opened gate to another System. A Wormhole has all the properties and methods of an Entity, and several others.

In v1.79 available for the entry Wormholes only.

Properties

arrivalTime

This property was added in Oolite test release 1.79.

arrivalTime : Number (read-only)

The game real time in seconds when the player will arrive at the destination system after entering the wormhole.

destination

This property was added in Oolite test release 1.79.

destination : Number (read-only)

The ID of the destination System.

expiryTime

This property was added in Oolite test release 1.79.

expiryTime : Number (read-only)

The game real time in seconds when the Wormhole will collapse.

origin

This property was added in Oolite test release 1.79.

origin : Number (read/write)

The ID of the System where the Wormhole originally opened.

In v1.79 always equal with the ID of the current System due to available for the entry Wormholes only.