IEMatrixGuy

rcp

Apr 21st, 2022 (edited)
1,136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. NN_REACTOR = "BigReactors-Reactor_1"
  2.  
  3. reactor = peripherals.wrap( NN_REACTOR )
  4. monitor = peripherals.wrap( "back" )
  5.  
  6. if reactor == nil or not reactor.getConnected() then
  7.     drawText( monitor.getWidth() / 2, monitor.getHeight() / 2, "ERR 01 : REACTOR NOT FOUND", "red", "white" )
  8. elseif
  9.     drawText( monitor.getWidth() / 2, monitor.getHeight() / 2, "REACTOR CONTROL OPERATIONAL", "green", "white" )
  10. end
  11.  
  12.  
  13. function drawText( x, y, text, backColor, foreColor )
  14.     monitor.setTextColor( foreColor )
  15.     monitor.setBackgroundColor( backColor )
  16.     monitor.setCursorPos( x, y )
  17.     monitor.write( text )
  18. end
Advertisement
Add Comment
Please, Sign In to add comment