fix rc turtle inventory display
This commit is contained in:
parent
00df04540a
commit
cb28d35b1f
|
@ -58,13 +58,15 @@ local actions = {
|
|||
send_remote "Refueled"
|
||||
end,
|
||||
[keys.i] = function()
|
||||
local detail = ""
|
||||
for i = 1, 16 do
|
||||
turtle.select(i)
|
||||
local item = turtle.getItemDetail()
|
||||
if item ~= nil then
|
||||
send_remote(i .. ": " .. item.name .. " " .. item.count)
|
||||
if item then
|
||||
detail = detail .. i .. ": " .. item.name .. " " .. item.count .. "\n"
|
||||
end
|
||||
end
|
||||
send_remote(detail)
|
||||
end,
|
||||
[keys.e] = function()
|
||||
for i = 1, 16 do
|
||||
|
@ -88,6 +90,7 @@ local function reset_output()
|
|||
print "F = Refuel"
|
||||
print "I = Show Inventory"
|
||||
print "E = Empty Inventory"
|
||||
print "------"
|
||||
end
|
||||
|
||||
reset_output()
|
||||
|
|
Loading…
Reference in a new issue