update hammered code
This commit is contained in:
parent
2630559256
commit
35b3f6d15b
|
@ -39,9 +39,13 @@ local function draw()
|
||||||
screen.setBackgroundColor(colors.red)
|
screen.setBackgroundColor(colors.red)
|
||||||
screen.write "Place Chests"
|
screen.write "Place Chests"
|
||||||
|
|
||||||
screen.setCursorPos(7, 6)
|
screen.setCursorPos(1, 6)
|
||||||
screen.setBackgroundColor(colors.red)
|
screen.setBackgroundColor(colors.red)
|
||||||
screen.write "Clear Arena"
|
screen.write "Clear Arena"
|
||||||
|
|
||||||
|
screen.setCursorPos(13, 6)
|
||||||
|
screen.setBackgroundColor(colors.purple)
|
||||||
|
screen.write "Open SG"
|
||||||
end
|
end
|
||||||
|
|
||||||
draw()
|
draw()
|
||||||
|
@ -79,8 +83,10 @@ parallel.waitForAny(function()
|
||||||
place_chests()
|
place_chests()
|
||||||
end
|
end
|
||||||
elseif y == 6 then
|
elseif y == 6 then
|
||||||
if x >= 7 and x <= 18 then -- clear arena
|
if x >= 1 and x <= 11 then -- clear arena
|
||||||
clear_arena()
|
clear_arena()
|
||||||
|
elseif x >= 13 and x <= 20 then -- Open SG
|
||||||
|
rednet.broadcast("open", "stargate_control")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
13
packs/hammered/stargate/startup.lua
Normal file
13
packs/hammered/stargate/startup.lua
Normal 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
|
Loading…
Reference in a new issue