Oolite JavaScript Reference: EquipmentInfo
Prototype: Object
EquipmentInfo
objects provide information about a type of equipment. To acquire an EquipmentInfo
object, use the infoForKey()
method, as in:
var missileInfo = EquipmentInfo.infoForKey("EQ_MISSILE");
Contents
- 1 Properties
- 1.1 description
- 1.2 effectiveTechLevel
- 1.3 equipmentKey
- 1.4 name
- 1.5 techLevel
- 1.6 price
- 1.7 isAvailableToAll
- 1.8 requiresEmptyPylon
- 1.9 requiresMountedPylon
- 1.10 requiresCleanLegalRecord
- 1.11 requiresNonCleanLegalRecord
- 1.12 requiresFreePassengerBerth
- 1.13 requiresFullFuel
- 1.14 requiresNonFullFuel
- 1.15 isExternalStore
- 1.16 isPortableBetweenShips
- 1.17 requiredCargoSpace
- 1.18 requiresEquipment
- 1.19 requiresAnyEquipment
- 1.20 incompatibleEquipment
- 2 Static methods
Properties
description
description : String (read-only)
A short description of the equipment, as seen on the Ship Outfitting screen.
effectiveTechLevel
effectiveTechLevel : Number (read/write nonnegative integer)
The effective tech level required to purchase this item. Unlike techLevel
, this takes the special meaning of 99 and TL_FOR_EQ_WHATEVER
mission variables into account. If the raw tech level is 99, changing the value of effectiveTechLevel
is equivalent to setting the appropriate TL_FOR_EQ_WHATEVER
mission variable. If the raw tech level is not 99, changes to effectiveTechLevel
are ignored.
See also: techLevel
equipmentKey
equipmentKey : String (read-only)
The equipment key for the equipment described by this EquipmentInfo
object. For EQ_MISSILE, this is "EQ_MISSILE".
name
name : String (read-only)
The display name for the equipment described by this EquipmentInfo
object. This string is localized. For EQ_MISSILE in English, this is "Missile".
techLevel
techLevel : Number (read-only nonnegative integer)
The raw tech level required to purchase this item. Unlike effectiveTechLevel
, this does not take the special meaning of 99 and TL_FOR_EQ_WHATEVER
mission variables into account.
See also: effectiveTechLevel
price
isAvailableToAll
requiresEmptyPylon
requiresMountedPylon
requiresCleanLegalRecord
requiresNonCleanLegalRecord
requiresFreePassengerBerth
requiresFullFuel
requiresNonFullFuel
isExternalStore
isPortableBetweenShips
requiredCargoSpace
requiresEquipment
requiresAnyEquipment
incompatibleEquipment
Static methods
infoForKey
function infoForKey(equipmentKey : String) : EquipmentInfo
Returns the equipment info object for a given type of equipment, or null
for an unrecognised key. Example: var missileInfo = EquipmentInfo.infoForKey("EQ_MISSILE");