Minor cleaning
This commit is contained in:
parent
8f4c9f28f1
commit
222e04d2c4
15
src/gui.lua
15
src/gui.lua
|
@ -900,10 +900,9 @@ local function get_output_fs(fs, data, rcp, is_recipe, shapeless, right, btn_siz
|
||||||
else
|
else
|
||||||
local size = BTN_SIZE * 1.2
|
local size = BTN_SIZE * 1.2
|
||||||
slot(X, Y - 0.11, size, size)
|
slot(X, Y - 0.11, size, size)
|
||||||
item_image_button(
|
|
||||||
X + 0.11, Y, BTN_SIZE, BTN_SIZE,
|
count *= (is_recipe and data.scrbar_rcp or data.scrbar_usg or 1)
|
||||||
fmt("%s %u %u", name, count * (is_recipe and data.scrbar_rcp or data.scrbar_usg or 1), wear),
|
item_image_button(X + 0.11, Y, BTN_SIZE, BTN_SIZE, fmt("%s %u %u", name, count, wear), _name, "")
|
||||||
_name, "")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local def = reg_items[name]
|
local def = reg_items[name]
|
||||||
|
@ -1030,7 +1029,7 @@ local function get_grid_fs(fs, data, rcp, is_recipe)
|
||||||
end
|
end
|
||||||
|
|
||||||
local btn_name = groups and fmt("group!%s!%s", groups[1], name) or name
|
local btn_name = groups and fmt("group!%s!%s", groups[1], name) or name
|
||||||
local _count = count * (is_recipe and data.scrbar_rcp or data.scrbar_usg or 1)
|
count *= (is_recipe and data.scrbar_rcp or data.scrbar_usg or 1)
|
||||||
|
|
||||||
if group_cache and group_cache.sprite and not large_recipe then
|
if group_cache and group_cache.sprite and not large_recipe then
|
||||||
local sprite = ESC(group_cache.sprite)
|
local sprite = ESC(group_cache.sprite)
|
||||||
|
@ -1040,11 +1039,11 @@ local function get_grid_fs(fs, data, rcp, is_recipe)
|
||||||
animated_image(X + 0.01, Y + 0.025, size, size, sprite, group_cache.count, 1500)
|
animated_image(X + 0.01, Y + 0.025, size, size, sprite, group_cache.count, 1500)
|
||||||
label(X + 0.45, Y + 0.18, label)
|
label(X + 0.45, Y + 0.18, label)
|
||||||
|
|
||||||
if _count > 1 then
|
if count > 1 then
|
||||||
label(X + 0.8, Y + 0.9, _count)
|
label(X + 0.8, Y + 0.9, count)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
item_image_button(X, Y, btn_size, btn_size, fmt("%s %u", name, _count), btn_name, label)
|
item_image_button(X, Y, btn_size, btn_size, fmt("%s %u", name, count), btn_name, label)
|
||||||
end
|
end
|
||||||
|
|
||||||
local def = reg_items[name]
|
local def = reg_items[name]
|
||||||
|
|
Ŝarĝante…
Reference in New Issue