mirror of
https://github.com/minetest-mods/i3.git
synced 2025-07-03 17:10:23 +02:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
e1c0f106cc | |||
46f1136bb7 | |||
e88921fe72 |
@ -242,7 +242,7 @@ local function resolve_aliases(hash)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if newname ~= "" and i3.recipes_cache[oldname] and not hash[newname] then
|
if newname ~= "" and i3.recipes_cache[oldname] and reg_items[newname] and not hash[newname] then
|
||||||
insert(i3.init_items, newname)
|
insert(i3.init_items, newname)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -101,7 +101,7 @@ local function search(data)
|
|||||||
for i = 1, #data.items_raw do
|
for i = 1, #data.items_raw do
|
||||||
local item = data.items_raw[i]
|
local item = data.items_raw[i]
|
||||||
local def = reg_items[item]
|
local def = reg_items[item]
|
||||||
local desc = lower(translate(data.lang_code, def and def.description)) or ""
|
local desc = lower(translate(data.lang_code, def.description)) or ""
|
||||||
local search_in = fmt("%s %s", item, desc)
|
local search_in = fmt("%s %s", item, desc)
|
||||||
local temp, j, to_add = {}, 1
|
local temp, j, to_add = {}, 1
|
||||||
|
|
||||||
|
@ -215,10 +215,10 @@ local function inv_fields(player, data, fields)
|
|||||||
return set_fs(player)
|
return set_fs(player)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function select_item(player, data, _f)
|
local function select_item(player, data, fields)
|
||||||
local item
|
local item
|
||||||
|
|
||||||
for field in pairs(_f) do
|
for field in pairs(fields) do
|
||||||
if find(field, ":") then
|
if find(field, ":") then
|
||||||
item = field
|
item = field
|
||||||
break
|
break
|
||||||
|
@ -829,7 +829,7 @@ local function get_tooltip(item, info, pos)
|
|||||||
return fmt("tooltip[%s;%s]", item, ESC(tooltip))
|
return fmt("tooltip[%s;%s]", item, ESC(tooltip))
|
||||||
end
|
end
|
||||||
|
|
||||||
local function get_output_fs(fs, data, rcp, is_recipe, shapeless, right, btn_size, _btn_size)
|
local function get_output_fs(fs, data, rcp, is_recipe, shapeless, right, btn_size, btn_size2)
|
||||||
local custom_recipe = i3.craft_types[rcp.type]
|
local custom_recipe = i3.craft_types[rcp.type]
|
||||||
local cooking = rcp.type == "cooking"
|
local cooking = rcp.type == "cooking"
|
||||||
local fuel = rcp.type == "fuel"
|
local fuel = rcp.type == "fuel"
|
||||||
@ -866,7 +866,7 @@ local function get_output_fs(fs, data, rcp, is_recipe, shapeless, right, btn_siz
|
|||||||
end
|
end
|
||||||
|
|
||||||
local BTN_SIZE = i3.settings.item_btn_size
|
local BTN_SIZE = i3.settings.item_btn_size
|
||||||
local arrow_X = right + 0.2 + (_btn_size or BTN_SIZE)
|
local arrow_X = right + 0.2 + (btn_size2 or BTN_SIZE)
|
||||||
local X = arrow_X + 1.2
|
local X = arrow_X + 1.2
|
||||||
local Y = data.yoffset + 1.4
|
local Y = data.yoffset + 1.4
|
||||||
|
|
||||||
|
@ -74,6 +74,7 @@ local styles = string.format([[
|
|||||||
style_type[image_button,item_image_button,checkbox,dropdown;border=false;sound=i3_click]
|
style_type[image_button,item_image_button,checkbox,dropdown;border=false;sound=i3_click]
|
||||||
style_type[item_image_button;bgimg_hovered=%s]
|
style_type[item_image_button;bgimg_hovered=%s]
|
||||||
|
|
||||||
|
style[;sound=]
|
||||||
style[nofav;sound=i3_cannot]
|
style[nofav;sound=i3_cannot]
|
||||||
style[pagenum,no_item,no_rcp;font=bold;font_size=18]
|
style[pagenum,no_item,no_rcp;font=bold;font_size=18]
|
||||||
style[exit;fgimg=%s;fgimg_hovered=%s;content_offset=0]
|
style[exit;fgimg=%s;fgimg_hovered=%s;content_offset=0]
|
||||||
|
Reference in New Issue
Block a user