LUA properties - LemADEC/WarpDrive GitHub Wiki
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!