mirror of
https://github.com/minetest-mods/i3.git
synced 2025-07-04 01:20:23 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
c91f787cb2 | |||
dcc4068e46 |
@ -42,7 +42,7 @@ local function cache_groups(group, groups)
|
|||||||
local tiles = def.tiles or def.tile_images
|
local tiles = def.tiles or def.tile_images
|
||||||
local texture = true_str(def.inventory_image) and def.inventory_image --or tiles[1]
|
local texture = true_str(def.inventory_image) and def.inventory_image --or tiles[1]
|
||||||
|
|
||||||
if is_cube(def.drawtype) then
|
if def.drawtype and is_cube(def.drawtype) then
|
||||||
texture = get_cube(tiles)
|
texture = get_cube(tiles)
|
||||||
elseif texture then
|
elseif texture then
|
||||||
texture = texture:gsub("%^", "\\^"):gsub(":", "\\:") .. "\\^[resize\\:150x150"
|
texture = texture:gsub("%^", "\\^"):gsub(":", "\\:") .. "\\^[resize\\:150x150"
|
||||||
@ -55,11 +55,13 @@ local function cache_groups(group, groups)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if c > 1 then
|
||||||
sprite = sprite:gsub("WxH", px .. "x" .. px * c)
|
sprite = sprite:gsub("WxH", px .. "x" .. px * c)
|
||||||
|
|
||||||
i3.groups[group].sprite = sprite
|
i3.groups[group].sprite = sprite
|
||||||
i3.groups[group].count = c
|
i3.groups[group].count = c
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function get_item_usages(item, recipe, added)
|
local function get_item_usages(item, recipe, added)
|
||||||
if is_group(item) then
|
if is_group(item) then
|
||||||
|
Reference in New Issue
Block a user