From 29406598d671e98bdfc7d49c5c76692e3052c77f Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Wed, 26 Oct 2022 09:29:13 +0200 Subject: [PATCH] simplify --- internal.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal.lua b/internal.lua index a0b117f..7231969 100644 --- a/internal.lua +++ b/internal.lua @@ -1,7 +1,6 @@ local S = minetest.get_translator("unified_inventory") local F = minetest.formspec_escape local ui = unified_inventory -local hide_disabled_buttons = ui.hide_disabled_buttons -- This pair of encoding functions is used where variable text must go in -- button names, where the text might contain formspec metacharacters. @@ -55,7 +54,7 @@ local function formspec_tab_buttons(player, formspec, style) for _, def in pairs(ui.buttons) do if not (style.is_lite_mode and def.hide_lite) then - if (def.condition == nil or def.condition(player) or not hide_disabled_buttons) then + if def.condition == nil or def.condition(player) or not ui.hide_disabled_buttons then table.insert(filtered_inv_buttons, def) end end