Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local basenet;do local function b()local c,d=http.get"https://pastebin.com/raw/QnFKq9pE"if not c then return false,d end;local e=c.readAll()local f,d=load(e)if not f then return false,d end;return pcall(f)end;for g=0,8 do local h,i=b()if not h then printError(i)sleep(math.pow(2,g))else basenet=i;break end end end
- local reconstructor_side = settings.get "basenet.reconstructor_side"
- local recon = peripheral.wrap(reconstructor_side)
- local cell = settings.get "basenet.energy_cell" or "main_energy_cell"
- local energy_low
- basenet.listen(function(data)
- energy_low = data.low
- end, cell)
- local function pulse(side)
- rs.setOutput(side, true)
- sleep(0.1)
- rs.setOutput(side, false)
- end
- basenet.run_task(function()
- while true do
- if not energy_low and (recon.getEnergyStored() / recon.getEnergyCapacity() > 0.8) then
- pulse(reconstructor_side)
- end
- sleep(0.1)
- end
- end)
- basenet.run()
Add Comment
Please, Sign In to add comment