Advertisement
JVZ

BR Control - Command

JVZ
Apr 7th, 2020
585
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. rednet.open("right")
  2. p = peripheral.wrap("back")
  3. a = {}
  4. controlRodCommand = 100
  5.  
  6. while true do
  7.     --Envoi des infos
  8.     a["active"] = p.getActive()
  9.     a["energyStored"] = p.getEnergyStored()
  10.     a["fuelAmount"] = p.getFuelAmount()
  11.     a["fuelAmountMax"] = p.getFuelAmountMax()
  12.     a["controlRodLevel"] = p.getControlRodLevel(0)
  13.     a["energyProducedLastTick"] = p.getEnergyProducedLastTick()
  14.     a["fuelConsumedLastTick"] = p.getFuelConsumedLastTick()
  15.  
  16.     rednet.broadcast(a)
  17.  
  18.  
  19.     --Ajustement des barres de controle
  20.     id, controlRodCommand = rednet.receive()
  21.     p.setAllControlRodLevels(controlRodCommand)
  22.    
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement