update hammered code

This commit is contained in:
LordMZTE 2022-03-20 00:11:59 +01:00
parent 2630559256
commit 35b3f6d15b
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
2 changed files with 21 additions and 2 deletions

View file

@ -39,9 +39,13 @@ local function draw()
screen.setBackgroundColor(colors.red)
screen.write "Place Chests"
screen.setCursorPos(7, 6)
screen.setCursorPos(1, 6)
screen.setBackgroundColor(colors.red)
screen.write "Clear Arena"
screen.setCursorPos(13, 6)
screen.setBackgroundColor(colors.purple)
screen.write "Open SG"
end
draw()
@ -79,8 +83,10 @@ parallel.waitForAny(function()
place_chests()
end
elseif y == 6 then
if x >= 7 and x <= 18 then -- clear arena
if x >= 1 and x <= 11 then -- clear arena
clear_arena()
elseif x >= 13 and x <= 20 then -- Open SG
rednet.broadcast("open", "stargate_control")
end
end

View file

@ -0,0 +1,13 @@
local sg = peripheral.find "stargate"
rednet.open "back"
while true do
local _, t = rednet.receive "stargate_control"
if t == "open" then
sg.dial "YAO454VQM"
os.sleep(60)
sg.disconnect()
end
end