mirror of
https://github.com/minetest-mods/i3.git
synced 2025-07-03 00:50:22 +02:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
e1c0f106cc | |||
46f1136bb7 | |||
e88921fe72 |
@ -242,7 +242,7 @@ local function resolve_aliases(hash)
|
||||
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)
|
||||
end
|
||||
end
|
||||
|
@ -101,7 +101,7 @@ local function search(data)
|
||||
for i = 1, #data.items_raw do
|
||||
local item = data.items_raw[i]
|
||||
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 temp, j, to_add = {}, 1
|
||||
|
||||
|
@ -215,10 +215,10 @@ local function inv_fields(player, data, fields)
|
||||
return set_fs(player)
|
||||
end
|
||||
|
||||
local function select_item(player, data, _f)
|
||||
local function select_item(player, data, fields)
|
||||
local item
|
||||
|
||||
for field in pairs(_f) do
|
||||
for field in pairs(fields) do
|
||||
if find(field, ":") then
|
||||
item = field
|
||||
break
|
||||
|
@ -829,7 +829,7 @@ local function get_tooltip(item, info, pos)
|
||||
return fmt("tooltip[%s;%s]", item, ESC(tooltip))
|
||||
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 cooking = rcp.type == "cooking"
|
||||
local fuel = rcp.type == "fuel"
|
||||
@ -866,7 +866,7 @@ local function get_output_fs(fs, data, rcp, is_recipe, shapeless, right, btn_siz
|
||||
end
|
||||
|
||||
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 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[item_image_button;bgimg_hovered=%s]
|
||||
|
||||
style[;sound=]
|
||||
style[nofav;sound=i3_cannot]
|
||||
style[pagenum,no_item,no_rcp;font=bold;font_size=18]
|
||||
style[exit;fgimg=%s;fgimg_hovered=%s;content_offset=0]
|
||||
|
Reference in New Issue
Block a user