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 reactor_side = settings.get "basenet.reactor_side"
- local reactor = peripheral.wrap(reactor_side)
- local cell = settings.get "basenet.energy_cell" or "main_energy_cell"
- local low_threshold = settings.get "basenet.low_threshold"
- local low
- basenet.listen(function(data)
- low = data.low
- if low == nil then low = data.level < 0.9 end
- if low_threshold then low = data.level < low_threshold end
- print(low, data.level)
- rs.setOutput(reactor_side, low)
- end, cell)
- basenet.interval(function()
- local item = reactor.getItemMeta(1)
- local fcount, ftype = 0, nil
- if item then fcount = item.count ftype = item.displayName end
- basenet.update { running = low, fuel_available = fcount, fuel_type = ftype }
- end, 1)
- basenet.run()
Add Comment
Please, Sign In to add comment