fix rc turtle inventory display
This commit is contained in:
parent
00df04540a
commit
cb28d35b1f
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue