-
Notifications
You must be signed in to change notification settings - Fork 157
Digilines
You can control some machines with the digilines mod.
There are two ways getting information from the switching station:
-
Give it a mesecon signal (eg. with a lever) and it will send always when the supply or demand changes.
-
Send to the switching station
"get"or"GET"and it will send back.
The sent message is always a table containing the supply and demand.
You can send the following to it:
-
"get": It will send back a table containing the fields"enabled","power"and"mesecon_mode"which are all integers. -
"off": Deactivate the supply converter. -
"on": Activate the supply converter. -
"toggle": Activate or deactivate the supply converter depending on its current state. -
"power "..power: Set the amount of the power, it shall convert. -
"mesecon_mode "..<int>: Set the mesecon mode.
Send to it "get" or "GET" and it will send a table back containing:
-
demand: A number. -
supply: A number. -
input: A number. -
charge: A number. -
max_charge: A number. -
src: Itemstack made to table. -
dst: Itemstack made to table. -
upgrade1: Itemstack made to table. -
upgrade2: Itemstack made to table.
You should send a table to it containing the command and for some commands the value field.
Some strings will automatically be made to tables:
-
"get"➡️{command = "get"} -
"off"➡️{command = "off"} -
"on"➡️{command = "on"} -
"toggle"➡️{command = "toggle"} -
"range "..range➡️{command = "range", value = range} -
"shape "..shape➡️{command = "shape", value = shape}
The commands:
-
"get": The forcefield emitter sends back a table containing:-
"enabled":0is off,1is on. "range"-
"shape":0is spheric,1is cubic.
-
-
"off": Deactivate the forcefield emitter. -
"on": Activate the forcefield emitter. -
"toggle": Activate or deactivate the forcefield emitter depending on its current state. -
"range": Set the range tovalue. -
"shape":valuecan be a number (0or1) or a string ("sphere"or"cube").
Since the nuclear reactor core can't be accessed by digiline wire because the water layer which mustn't have a hole, you need the digiline_remote mod to control it.
You should send a table to it containing at least the command field and for some commands other fields.
Some strings will automatically be made to tables:
-
"get"➡️{command = "get"} -
"self_destruct "..time➡️{command = "self_destruct", timer = time} -
"start"➡️{command = "start"}
The commands:
-
"get": The nuclear reactor sends back a table containing:-
"burn_time": The time in seconds how long the reactor already runs. One week after start, when it reaches 7 * 24 * 60 * 60 (=604800), the fuel is completely used. -
"enabled": A bool. -
"siren": A bool. "structure_accumulated_badness"-
"rods": A table with 6 numbers in it, one for each fuel slot.- A positive value is the count of fuel rods in the slot.
-
0means the slot is empty. - A negative value means some other items are in the slot. The absolute value is the count of these items.
-
-
"self_destruct": A setting has to be enabled to use this. The reactor will melt down aftertimerseconds or instantly. -
"start": Tries to start the reactor,"Start successful"is sent back on success,"Error"if something is wrong.
If the automatic start is enabled, it will always send "fuel used" when it uses fuel.