mirror of
https://github.com/minetest-mods/i3.git
synced 2024-12-24 18:00:38 +01:00
Minor tweak
This commit is contained in:
parent
7d0f25e8b2
commit
4ccff6621b
1
init.lua
1
init.lua
@ -28,6 +28,7 @@ i3 = {
|
||||
max_waypoints = 30,
|
||||
min_fs_version = 4,
|
||||
item_btn_size = 1.1,
|
||||
sprite_resolution = 1024,
|
||||
drop_bag_on_die = true,
|
||||
save_interval = 600, -- Player data save interval (in seconds)
|
||||
|
||||
|
@ -34,7 +34,7 @@ local function cache_groups(group, groups)
|
||||
local items = i3.groups[group].items
|
||||
if #items <= 1 then return end
|
||||
|
||||
local c, px, lim = 0, 256, 10
|
||||
local px, c, lim = i3.settings.sprite_resolution, 0, 10
|
||||
local sprite = "[combine:WxH"
|
||||
|
||||
for _, item in ipairs(items) do
|
||||
@ -45,7 +45,7 @@ local function cache_groups(group, groups)
|
||||
if def.drawtype and is_cube(def.drawtype) then
|
||||
texture = get_cube(tiles)
|
||||
elseif texture then
|
||||
texture = texture:gsub("%^", "\\^"):gsub(":", "\\:") .. "\\^[resize\\:150x150"
|
||||
texture = texture:gsub("%^", "\\^"):gsub(":", "\\:") .. "\\^[resize\\:146x146"
|
||||
end
|
||||
|
||||
if texture then
|
||||
|
@ -1034,9 +1034,10 @@ local function get_grid_fs(fs, data, rcp, is_recipe)
|
||||
|
||||
if group_cache and group_cache.sprite and not large_recipe then
|
||||
local sprite = ESC(group_cache.sprite)
|
||||
local size = (i3.settings.sprite_resolution * 1.89) / 256
|
||||
|
||||
item_image_button(X, Y, btn_size, btn_size, "", btn_name, "")
|
||||
animated_image(X + 0.01, Y + 0.01, 1.89, 1.89, sprite, group_cache.count, 1500)
|
||||
animated_image(X + 0.01, Y + 0.01, size, size, sprite, group_cache.count, 1500)
|
||||
label(X + 0.45, Y + 0.18, label)
|
||||
|
||||
if _count > 1 then
|
||||
|
Loading…
Reference in New Issue
Block a user