Oolite JavaScript Reference: EquipmentInfo

From Elite Wiki
Revision as of 22:54, 17 October 2008 by Ahruman (talk | contribs) (New page: {{Oolite-script-item-future|class|1.72|test}} <small>'''Prototype:''' <code>Object</code></small><br /> '''<code>EquipmentInfo</code>''' objects provide information about a type of equipm...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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");

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");