Fix IDE errors
This commit is contained in:
parent
3c338f05dd
commit
0c9f0d65ec
4 changed files with 9 additions and 3 deletions
|
|
@ -43,6 +43,7 @@ local function traverse_and_download(folder_data, prefix)
|
||||||
local response = http.get(subdir_url)
|
local response = http.get(subdir_url)
|
||||||
if response then
|
if response then
|
||||||
local body = response.readAll()
|
local body = response.readAll()
|
||||||
|
if not body then return end
|
||||||
response.close()
|
response.close()
|
||||||
local subdir_data = textutils.unserializeJSON(body)
|
local subdir_data = textutils.unserializeJSON(body)
|
||||||
traverse_and_download(subdir_data, prefix .. dir.href)
|
traverse_and_download(subdir_data, prefix .. dir.href)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
-- PrimeUI by JackMacWindows
|
-- PrimeUI by JackMacWindows
|
||||||
-- Public domain/CC0
|
-- Public domain/CC0
|
||||||
|
|
||||||
|
---@alias window ccTweaked.term.Redirect
|
||||||
|
---@alias color integer
|
||||||
|
|
||||||
local expect = require "cc.expect".expect
|
local expect = require "cc.expect".expect
|
||||||
|
|
||||||
-- Initialization code
|
-- Initialization code
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ local function sync()
|
||||||
print("Synced.");
|
print("Synced.");
|
||||||
end
|
end
|
||||||
---@param itemName string
|
---@param itemName string
|
||||||
---@param perip ccTweaked.peripheral.Inventory|nil
|
---@param perip ccTweaked.peripheral.Inventory|string|nil
|
||||||
---@param maxAmount number|nil
|
---@param maxAmount number|nil
|
||||||
local function sendItemToSelf(itemName, perip, maxAmount)
|
local function sendItemToSelf(itemName, perip, maxAmount)
|
||||||
if perip == nil then
|
if perip == nil then
|
||||||
|
|
@ -62,7 +62,7 @@ local function sendItemToSelf(itemName, perip, maxAmount)
|
||||||
|
|
||||||
local ok, moved = pcall(function()
|
local ok, moved = pcall(function()
|
||||||
ail.performTransfer()
|
ail.performTransfer()
|
||||||
--chatbox.tell("hartbreix", tostring(perip) .. " <> " .. tostring(itemName) .. " <> " .. tostring(toSend) .. " <> " .. tostring(chosenNBT), "debug")
|
|
||||||
local amount = ail.pushItems(perip, itemName, toSend, nil, chosenNBT, {
|
local amount = ail.pushItems(perip, itemName, toSend, nil, chosenNBT, {
|
||||||
["allowBadTransfers"] = true,
|
["allowBadTransfers"] = true,
|
||||||
["optimal"] = true
|
["optimal"] = true
|
||||||
|
|
@ -96,6 +96,8 @@ local function sendItemAwayMultiple(slots, perip, id, maxAmount)
|
||||||
end
|
end
|
||||||
local srcId = id or turtleId
|
local srcId = id or turtleId
|
||||||
|
|
||||||
|
if srcId == nil then return end
|
||||||
|
|
||||||
local itemsInSlots = {}
|
local itemsInSlots = {}
|
||||||
for _, slot in ipairs(slots) do
|
for _, slot in ipairs(slots) do
|
||||||
local item = perip.getItemDetail(slot)
|
local item = perip.getItemDetail(slot)
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ local function runUi()
|
||||||
return refiltered
|
return refiltered
|
||||||
end
|
end
|
||||||
|
|
||||||
local com = getFiltered("")
|
local com = getFiltered()
|
||||||
|
|
||||||
PrimeUI.clear()
|
PrimeUI.clear()
|
||||||
local updateEntries = PrimeUI.selectionBox(
|
local updateEntries = PrimeUI.selectionBox(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue