-
Notifications
You must be signed in to change notification settings - Fork 41
LUA properties
For sake of simplicity, we won't go in details of the below methods used to get or set machines properties.
- When no argument is passed, the method returns the current value.
- When a valid argument is passed, the property is changed and the new value is returned. The returned value takes into account any rounding or truncation that was applied to it. For example, if you pass a floating value but the property is integral, the return value will differ from the argument.
- When an invalid argument is passed, the property remains unchanged and it's current value is returned. No error will be reported.
In most cases, changing a property will not affect an ongoing operation.
Type: boolean Default value: false
Get/set the enabled state of the machine.
Type: Number
Default value: 1
Range: 1 to 255
Get/set a new offset from where to start mining.
This will not affect the current mining layer.
Type: Number, Number
Default value: 3, 3
Range: 3 to 16, 3 to 16
Get/set an working radius for the machine. Passing a single number will assume a square shape.
xRadius, zRadius = farm.radius(newRadiusX, newRadiusZ)
xRadius, zRadius = farm.radius(newRadius)
This will affect any ongoing activity, use at your own risk!
Type: boolean
Get/set a Laser tree farm option.
This will affect an ongoing activity, use at your own risk!
Type: Number
Range: 1 or 2
Get/set the current tier of the machine.
For a cloaking core, tier 1 is shadow mode, while tier 2 is full invisibility mode.
This will affect an ongoing activity, use at your own risk!
Type: String
Range: 'up', 'down' or 'redstone'
Sets the current lift direction mode. In redstone mode, an active signal means 'down'.
Type: Number Range: 0 to 268435455
Set the video channel used to link blocks together. Keep it secret or your enemy may spy on your network!
Previous to 1.3.31, range was unlimited (-2^31 to 2^31-1).
Type: Number Range: 0 to 65000
Set the beam frequency of your weapon system. Keep it secret or your enemy may turn it against you!
Type: Number Range: 0 to 999999999
Set the control channel used to link blocks together. Keep it secret or your enemy may jam your machines!
Home
Dependencies
Frequently Asked Questions
Changelog
Tutorials
* First ship, first jump
* Tuning Tools
* Programmable blocks
* Lasers - Basic Tutorial
* Lasers - Advanced Boosting
Exploration
* World generation
* Air in space
* Planets and Transition Planes
* Warp Jump Checklist
Atomic
* Large Hadron Collider
* Accelerator Controller
* Accelerator Control Point
* Chiller
* Electromagnet
* Particles Collider
* Particles Injector
* Void Shell
* Electromagnetic Cell
Breathing
* Breathing
* Air Canister
* Air Generator
* Air Tank
* Energy Air Shield
* Warp armor
Collection
* Laser Tree Farm
* Mining Laser
Detection
* Camera and Monitor
* Cloaking
* Radar
* Siren
* Warp Field Isolation Block
Energy
* IC2 Reactor Laser
* Subspace Capacitor
* Enantiomorphic Reactor
Movement
* Lift
* Transporter Room
* Transporter Core
* Transporter Scanner
* Transporter Containment
* Transporter Beacon
Protection
* Hull
* Force field projector
* Force field relay
* Force field upgrades
Weapons
* Lasers - Basic Tutorial
* Lasers - Advanced Boosting
LUA API
* LUA methods
- for Detection
- for Energy
- for Movement
* LUA properties
- for Energy
- for Movement
* LUA events
* LUA change logs