Other great resources: Official JS API docs, Scripting Forum
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 10 Next »
componentAvailable(type, name)
The type of component.
These constants are not exposed to JS API (#3898) – see "Notes" section below for details.
The component name.
Example: "Spade1Mk1"
"Spade1Mk1"
true
false
Currently, the component type constants aren't exposed to JS API (as of WZ 3.1.0 release). As such, you need to define them manually:
COMP_UNKNOWN
COMP_BODY
COMP_BRAIN
COMP_PROPULSION
COMP_REPAIRUNIT
COMP_ECM
COMP_SENSOR
COMP_CONSTRUCT
COMP_WEAPON
const COMP_PROPULSION = 3; if (componentAvailable(COMP_PROPULSION, "hover01")) { // we can build hovercraft! }
Requires:
Jump to: