mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-26 04:23:44 +01:00
Move vars
This commit is contained in:
parent
5ef410730a
commit
763e953b8b
12
init.lua
12
init.lua
@ -70,6 +70,10 @@ local ITEM_BTN_SIZE = 1.1
|
|||||||
local XOFFSET = sfinv_only and 3.83 or 11.2
|
local XOFFSET = sfinv_only and 3.83 or 11.2
|
||||||
local YOFFSET = sfinv_only and 4.9 or 1
|
local YOFFSET = sfinv_only and 4.9 or 1
|
||||||
|
|
||||||
|
-- Progressive mode
|
||||||
|
local POLL_FREQ = 0.25
|
||||||
|
local HUD_TIMER_MAX = 1.5
|
||||||
|
|
||||||
local PNG = {
|
local PNG = {
|
||||||
bg = "craftguide_bg.png",
|
bg = "craftguide_bg.png",
|
||||||
bg_full = "craftguide_bg_full.png",
|
bg_full = "craftguide_bg_full.png",
|
||||||
@ -536,7 +540,7 @@ local function get_filtered_items(player, data)
|
|||||||
local usages = usages_cache[item]
|
local usages = usages_cache[item]
|
||||||
|
|
||||||
recipes = #apply_recipe_filters(recipes or {}, player)
|
recipes = #apply_recipe_filters(recipes or {}, player)
|
||||||
usages = #apply_recipe_filters(usages or {}, player)
|
usages = #apply_recipe_filters(usages or {}, player)
|
||||||
|
|
||||||
if recipes > 0 or usages > 0 then
|
if recipes > 0 or usages > 0 then
|
||||||
c = c + 1
|
c = c + 1
|
||||||
@ -1073,8 +1077,7 @@ end
|
|||||||
local function get_rcp_lbl(lang_code, show_usages, unum, rnum, fs, panel, spacing, rn, is_recipe)
|
local function get_rcp_lbl(lang_code, show_usages, unum, rnum, fs, panel, spacing, rn, is_recipe)
|
||||||
local lbl
|
local lbl
|
||||||
|
|
||||||
if (not sfinv_only and is_recipe) or
|
if (not sfinv_only and is_recipe) or (sfinv_only and not show_usages) then
|
||||||
(sfinv_only and not show_usages) then
|
|
||||||
lbl = ES("Recipe @1 of @2", rnum, rn)
|
lbl = ES("Recipe @1 of @2", rnum, rn)
|
||||||
|
|
||||||
elseif not sfinv_only or (sfinv_only and show_usages) then
|
elseif not sfinv_only or (sfinv_only and show_usages) then
|
||||||
@ -1840,9 +1843,6 @@ else
|
|||||||
end
|
end
|
||||||
|
|
||||||
if progressive_mode then
|
if progressive_mode then
|
||||||
local POLL_FREQ = 0.25
|
|
||||||
local HUD_TIMER_MAX = 1.5
|
|
||||||
|
|
||||||
local function item_in_inv(item, inv_items)
|
local function item_in_inv(item, inv_items)
|
||||||
local inv_items_size = #inv_items
|
local inv_items_size = #inv_items
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user