Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local s = "back"
- local m = peripheral.find "modem"
- local name = os.getComputerLabel()
- local o = peripheral.wrap(s)
- local function send_metric(...)
- m.transmit(3054, 3054, {...})
- end
- while true do
- local l = o.getEnergyStored() / o.getEnergyCapacity()
- send_metric("reactor_energy/" .. name, "energy stored by reactor", "set", l)
- print(l)
- rs.setOutput(s, l < 0.8)
- sleep(0.5)
- end
Add Comment
Please, Sign In to add comment