From ac149d25cdcfda568ee49364d6562fd016ec5662 Mon Sep 17 00:00:00 2001 From: Paul Ouellette Date: Sun, 20 Jan 2019 01:22:28 -0500 Subject: [PATCH] Remove some unnecessary checks --- init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 772d443..ff8b22e 100644 --- a/init.lua +++ b/init.lua @@ -411,7 +411,7 @@ local function make_formspec(player_name) name) end - if data.input and reg_items[data.input] then + if data.input then local usage = data.show_usage fs[#fs + 1] = get_recipe_fs(data.iX, iY, @@ -727,7 +727,7 @@ local function on_receive_fields(player, fields) end local no_recipes = not next(recipes) - if no_recipes and (progressive_mode or not is_fuel) then + if no_recipes and not is_fuel then return end @@ -737,7 +737,7 @@ local function on_receive_fields(player, fields) data.show_usage = not data.show_usage end - if not progressive_mode and is_fuel and no_recipes then + if is_fuel and no_recipes then data.show_usage = true end