fixes
parent
c57e3fbfd0
commit
ebc5d61808
20
init.lua
20
init.lua
|
@ -107,21 +107,25 @@ local function get_rob_list(clicked)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--minetest.chat_send_all("hotbar_after="..tostring(#list_hotbar))
|
--minetest.chat_send_all("hotbar_after="..tostring(#list_hotbar))
|
||||||
local i = 0
|
local i = 1
|
||||||
local item_stack, item_name
|
local item_stack, item_name
|
||||||
for y= 0, 3 do
|
for y= 0, 3 do
|
||||||
if i > #list_hotbar then
|
if i > #list_hotbar then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
for x= 0,3 do
|
for x= 0,3 do
|
||||||
i = i + 1
|
if list_hotbar[i] then
|
||||||
if i > #list_hotbar then
|
item_stack = list_hotbar[i].itemstack
|
||||||
break
|
item_name = item_stack:get_name()
|
||||||
end
|
rob_list = rob_list .. " item_image_button [".. tostring(x)..",".. tostring(y) ..";1,1;"
|
||||||
item_stack = list_hotbar[i].itemstack
|
|
||||||
item_name = item_stack:get_name()
|
|
||||||
rob_list = rob_list .. " item_image_button [".. tostring(x)..",".. tostring(y) ..";1,1;"
|
|
||||||
.. item_name .. ";item_name;"..tostring(i).."]"
|
.. item_name .. ";item_name;"..tostring(i).."]"
|
||||||
|
i = i + 1
|
||||||
|
else
|
||||||
|
i = i + 1
|
||||||
|
end
|
||||||
|
if i > #list_hotbar then
|
||||||
|
break
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--minetest.chat_send_all("rob_list="..rob_list)
|
--minetest.chat_send_all("rob_list="..rob_list)
|
||||||
|
|
Loading…
Reference in New Issue