mirror of
https://github.com/minetest-mods/i3.git
synced 2025-03-20 11:40:27 +01:00
Correct condition
This commit is contained in:
parent
dcc4068e46
commit
c91f787cb2
@ -39,22 +39,19 @@ local function cache_groups(group, groups)
|
|||||||
|
|
||||||
for _, item in ipairs(items) do
|
for _, item in ipairs(items) do
|
||||||
local def = reg_items[item]
|
local def = reg_items[item]
|
||||||
|
local tiles = def.tiles or def.tile_images
|
||||||
|
local texture = true_str(def.inventory_image) and def.inventory_image --or tiles[1]
|
||||||
|
|
||||||
if def then
|
if def.drawtype and is_cube(def.drawtype) then
|
||||||
local tiles = def.tiles or def.tile_images
|
texture = get_cube(tiles)
|
||||||
local texture = true_str(def.inventory_image) and def.inventory_image --or tiles[1]
|
elseif texture then
|
||||||
|
texture = texture:gsub("%^", "\\^"):gsub(":", "\\:") .. "\\^[resize\\:150x150"
|
||||||
|
end
|
||||||
|
|
||||||
if is_cube(def.drawtype) then
|
if texture then
|
||||||
texture = get_cube(tiles)
|
sprite = sprite .. fmt(":0,%u=%s", c * px, texture)
|
||||||
elseif texture then
|
c++
|
||||||
texture = texture:gsub("%^", "\\^"):gsub(":", "\\:") .. "\\^[resize\\:150x150"
|
if c == lim then break end
|
||||||
end
|
|
||||||
|
|
||||||
if texture then
|
|
||||||
sprite = sprite .. fmt(":0,%u=%s", c * px, texture)
|
|
||||||
c++
|
|
||||||
if c == lim then break end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user