fix rc turtle inventory display

This commit is contained in:
LordMZTE 2022-03-06 00:42:16 +01:00
parent 00df04540a
commit cb28d35b1f
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6

View file

@ -58,13 +58,15 @@ local actions = {
send_remote "Refueled" send_remote "Refueled"
end, end,
[keys.i] = function() [keys.i] = function()
local detail = ""
for i = 1, 16 do for i = 1, 16 do
turtle.select(i) turtle.select(i)
local item = turtle.getItemDetail() local item = turtle.getItemDetail()
if item ~= nil then if item then
send_remote(i .. ": " .. item.name .. " " .. item.count) detail = detail .. i .. ": " .. item.name .. " " .. item.count .. "\n"
end end
end end
send_remote(detail)
end, end,
[keys.e] = function() [keys.e] = function()
for i = 1, 16 do for i = 1, 16 do
@ -88,6 +90,7 @@ local function reset_output()
print "F = Refuel" print "F = Refuel"
print "I = Show Inventory" print "I = Show Inventory"
print "E = Empty Inventory" print "E = Empty Inventory"
print "------"
end end
reset_output() reset_output()