Advertisement
Stravides

ReactorSend3.0

Nov 25th, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.83 KB | None | 0 0
  1. rednet.open("bottom")
  2. local reactor
  3.  
  4. reactor   = peripheral.wrap("BigReactors-Reactor_0")
  5.  
  6. function prepMsg()
  7.  
  8.   local R_Temp = reactor.getFuelTemperature()
  9. --  local R_HFL  = reactor.getHotFluidProducedLastTick()
  10.  
  11.   local R_Active= reactor.getActive()
  12.   local R_StoredRF=reactor.getEnergyStored()
  13.   local R_CaseTemp=reactor.getCasingTemperature()
  14.  
  15.   if R_Active then
  16.     R_Active="Active"
  17.   else
  18.     R_Active="OFFLINE"
  19.   end
  20.  
  21.   local fuellvl = reactor.getFuelAmount("")
  22.   local fuelmax = reactor.getFuelAmountMax("")
  23.   local fuelpct = fuellvl/fuelmax
  24.    
  25.    msg=R_Active.."|"..R_Temp.."|"..fuelpct.."|"..R_StoredRF.."|"..R_CaseTemp
  26.   rednet.open("bottom")
  27.   shell.run("clear")
  28.  
  29.   rednet.send(63,msg) -- dev screen
  30. end
  31.  
  32. print("Program is running <CTRL> <T> to stop")
  33. while true do
  34.   prepMsg()
  35.   sleep(1)
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement