Compare commits

..

2 commits

Author SHA1 Message Date
Emerson Rosen-Jones
d9f8513100 fix: corrects floor detection 2025-12-26 13:43:14 -05:00
Emerson Rosen-Jones
f9302e2b3d fix: remove several syntax errors 2025-12-26 13:39:27 -05:00

View file

@ -9,13 +9,13 @@ local FLOORS = {
return first_char == "A" or first_char == "W"
end,
detect = function ()
return redstone.getOutput("top")
return redstone.getInput("top")
end,
call = function ()
redstone.setOutput("top", true)
os.sleep(0.5)
redstone.setOutput("top", false)
end
end,
storage = "create:item_vault_17",
elevator_storage = "bottom",
},
@ -26,14 +26,14 @@ local FLOORS = {
end,
detect = function ()
local relay = "redstone_relay_21"
peripheral.call(relay, "getOutput", "top")
peripheral.call(relay, "getInput", "top")
end,
call = function ()
local relay = "redstone_relay_21"
peripheral.call(relay, "setOutput", "top", true)
os.sleep(0.5)
peripheral.call(relay, "setOutput", "top", false)
end
end,
storage = "create:item_vault_18",
elevator_storage = "create:portable_storage_interface_8",
},
@ -44,14 +44,14 @@ local FLOORS = {
end,
detect = function ()
local relay = "redstone_relay_22"
peripheral.call(relay, "getOutput", "top")
peripheral.call(relay, "getInput", "top")
end,
call = function ()
local relay = "redstone_relay_22"
peripheral.call(relay, "setOutput", "top", true)
os.sleep(0.5)
peripheral.call(relay, "setOutput", "top", false)
end
end,
storage = "create:item_vault_19",
elevator_storage = "create:portable_storage_interface_9",
},
@ -62,14 +62,14 @@ local FLOORS = {
end,
detect = function ()
local relay = "redstone_relay_23"
peripheral.call(relay, "getOutput", "top")
peripheral.call(relay, "getInput", "top")
end,
call = function ()
local relay = "redstone_relay_23"
peripheral.call(relay, "setOutput", "top", true)
os.sleep(0.5)
peripheral.call(relay, "setOutput", "top", false)
end
end,
storage = "create:item_vault_20",
elevator_storage = "create:portable_storage_interface_10",
},
@ -107,7 +107,7 @@ local PKG_QUEUE = {
end
end
end
end
end,
transfer_all = function (self, src, dest, floors)
-- assumption: this always transfers into the cargo box
for slot, item in pairs(peripheral.call(src, "list")) do
@ -134,7 +134,7 @@ local PKG_QUEUE = {
end,
get_next_floor = function (self)
return table.remove(self.queue, 1)
end
end,
queue = {},
}
@ -161,5 +161,5 @@ function run (floors, queue, first_run)
end
if arg ~= nil and arg[1] == "run" then
run(FLOORS, queue, true)
run(FLOORS, PKG_QUEUE, true)
end