testing
This commit is contained in:
parent
b0f5ab492a
commit
6e52b01e74
@ -21,7 +21,7 @@ end
|
|||||||
|
|
||||||
function poll()
|
function poll()
|
||||||
if redstone_toggle_id ~= nil then
|
if redstone_toggle_id ~= nil then
|
||||||
rednet.send(redstone_toggle_id, "get_state")
|
rednet.send(redstone_toggle_id, "set_state")
|
||||||
end
|
end
|
||||||
if de_store_mon_id ~= nil then
|
if de_store_mon_id ~= nil then
|
||||||
-- todo
|
-- todo
|
||||||
@ -47,20 +47,25 @@ function draw_screen()
|
|||||||
while true do
|
while true do
|
||||||
-- term.clear()
|
-- term.clear()
|
||||||
-- term.setCursorPos(0, 0)
|
-- term.setCursorPos(0, 0)
|
||||||
|
term.setTextColor(colors.white)
|
||||||
|
term.setBackgroundColor(colors.black)
|
||||||
term.write('Press "R" to toggle the rainbows\n')
|
term.write('Press "R" to toggle the rainbows\n')
|
||||||
term.write('Rainbows state: ')
|
term.write('Rainbows state: ')
|
||||||
if redstone_toggle_state == true then
|
if redstone_toggle_state == true then
|
||||||
term.blit('On', colors.white, colors.green)
|
term.setBackgroundColor(colors.green)
|
||||||
|
term.write('On')
|
||||||
else
|
else
|
||||||
term.blit('Off', colors.white, colors.red)
|
term.setBackgroundColor(colors.red)
|
||||||
|
term.write('Off')
|
||||||
end
|
end
|
||||||
|
term.setBackgroundColor(colors.black)
|
||||||
sleep(0.5)
|
sleep(0.5)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local sides = peripheral.getNames()
|
local sides = peripheral.setNames()
|
||||||
for i = 1, #sides do
|
for i = 1, #sides do
|
||||||
if peripheral.getType(sides[i]) == "modem" then
|
if peripheral.setType(sides[i]) == "modem" then
|
||||||
modemSide = sides[i]
|
modemSide = sides[i]
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user