Compare commits
No commits in common. "d9f85131005e68339ccd6f333ae6277ec00ae2b0" and "5acc3ab0f7045767dfb89eec93e9ad0f35fa4785" have entirely different histories.
d9f8513100
...
5acc3ab0f7
1 changed files with 11 additions and 11 deletions
|
|
@ -9,13 +9,13 @@ local FLOORS = {
|
||||||
return first_char == "A" or first_char == "W"
|
return first_char == "A" or first_char == "W"
|
||||||
end,
|
end,
|
||||||
detect = function ()
|
detect = function ()
|
||||||
return redstone.getInput("top")
|
return redstone.getOutput("top")
|
||||||
end,
|
end,
|
||||||
call = function ()
|
call = function ()
|
||||||
redstone.setOutput("top", true)
|
redstone.setOutput("top", true)
|
||||||
os.sleep(0.5)
|
os.sleep(0.5)
|
||||||
redstone.setOutput("top", false)
|
redstone.setOutput("top", false)
|
||||||
end,
|
end
|
||||||
storage = "create:item_vault_17",
|
storage = "create:item_vault_17",
|
||||||
elevator_storage = "bottom",
|
elevator_storage = "bottom",
|
||||||
},
|
},
|
||||||
|
|
@ -26,14 +26,14 @@ local FLOORS = {
|
||||||
end,
|
end,
|
||||||
detect = function ()
|
detect = function ()
|
||||||
local relay = "redstone_relay_21"
|
local relay = "redstone_relay_21"
|
||||||
peripheral.call(relay, "getInput", "top")
|
peripheral.call(relay, "getOutput", "top")
|
||||||
end,
|
end,
|
||||||
call = function ()
|
call = function ()
|
||||||
local relay = "redstone_relay_21"
|
local relay = "redstone_relay_21"
|
||||||
peripheral.call(relay, "setOutput", "top", true)
|
peripheral.call(relay, "setOutput", "top", true)
|
||||||
os.sleep(0.5)
|
os.sleep(0.5)
|
||||||
peripheral.call(relay, "setOutput", "top", false)
|
peripheral.call(relay, "setOutput", "top", false)
|
||||||
end,
|
end
|
||||||
storage = "create:item_vault_18",
|
storage = "create:item_vault_18",
|
||||||
elevator_storage = "create:portable_storage_interface_8",
|
elevator_storage = "create:portable_storage_interface_8",
|
||||||
},
|
},
|
||||||
|
|
@ -44,14 +44,14 @@ local FLOORS = {
|
||||||
end,
|
end,
|
||||||
detect = function ()
|
detect = function ()
|
||||||
local relay = "redstone_relay_22"
|
local relay = "redstone_relay_22"
|
||||||
peripheral.call(relay, "getInput", "top")
|
peripheral.call(relay, "getOutput", "top")
|
||||||
end,
|
end,
|
||||||
call = function ()
|
call = function ()
|
||||||
local relay = "redstone_relay_22"
|
local relay = "redstone_relay_22"
|
||||||
peripheral.call(relay, "setOutput", "top", true)
|
peripheral.call(relay, "setOutput", "top", true)
|
||||||
os.sleep(0.5)
|
os.sleep(0.5)
|
||||||
peripheral.call(relay, "setOutput", "top", false)
|
peripheral.call(relay, "setOutput", "top", false)
|
||||||
end,
|
end
|
||||||
storage = "create:item_vault_19",
|
storage = "create:item_vault_19",
|
||||||
elevator_storage = "create:portable_storage_interface_9",
|
elevator_storage = "create:portable_storage_interface_9",
|
||||||
},
|
},
|
||||||
|
|
@ -62,14 +62,14 @@ local FLOORS = {
|
||||||
end,
|
end,
|
||||||
detect = function ()
|
detect = function ()
|
||||||
local relay = "redstone_relay_23"
|
local relay = "redstone_relay_23"
|
||||||
peripheral.call(relay, "getInput", "top")
|
peripheral.call(relay, "getOutput", "top")
|
||||||
end,
|
end,
|
||||||
call = function ()
|
call = function ()
|
||||||
local relay = "redstone_relay_23"
|
local relay = "redstone_relay_23"
|
||||||
peripheral.call(relay, "setOutput", "top", true)
|
peripheral.call(relay, "setOutput", "top", true)
|
||||||
os.sleep(0.5)
|
os.sleep(0.5)
|
||||||
peripheral.call(relay, "setOutput", "top", false)
|
peripheral.call(relay, "setOutput", "top", false)
|
||||||
end,
|
end
|
||||||
storage = "create:item_vault_20",
|
storage = "create:item_vault_20",
|
||||||
elevator_storage = "create:portable_storage_interface_10",
|
elevator_storage = "create:portable_storage_interface_10",
|
||||||
},
|
},
|
||||||
|
|
@ -107,7 +107,7 @@ local PKG_QUEUE = {
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end
|
||||||
transfer_all = function (self, src, dest, floors)
|
transfer_all = function (self, src, dest, floors)
|
||||||
-- assumption: this always transfers into the cargo box
|
-- assumption: this always transfers into the cargo box
|
||||||
for slot, item in pairs(peripheral.call(src, "list")) do
|
for slot, item in pairs(peripheral.call(src, "list")) do
|
||||||
|
|
@ -134,7 +134,7 @@ local PKG_QUEUE = {
|
||||||
end,
|
end,
|
||||||
get_next_floor = function (self)
|
get_next_floor = function (self)
|
||||||
return table.remove(self.queue, 1)
|
return table.remove(self.queue, 1)
|
||||||
end,
|
end
|
||||||
queue = {},
|
queue = {},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -161,5 +161,5 @@ function run (floors, queue, first_run)
|
||||||
end
|
end
|
||||||
|
|
||||||
if arg ~= nil and arg[1] == "run" then
|
if arg ~= nil and arg[1] == "run" then
|
||||||
run(FLOORS, PKG_QUEUE, true)
|
run(FLOORS, queue, true)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue