Remove some unnecessary checks

This commit is contained in:
Paul Ouellette
2019-01-20 01:22:28 -05:00
parent 24a4b5e07e
commit ac149d25cd

View File

@ -411,7 +411,7 @@ local function make_formspec(player_name)
name) name)
end end
if data.input and reg_items[data.input] then if data.input then
local usage = data.show_usage local usage = data.show_usage
fs[#fs + 1] = get_recipe_fs(data.iX, fs[#fs + 1] = get_recipe_fs(data.iX,
iY, iY,
@ -727,7 +727,7 @@ local function on_receive_fields(player, fields)
end end
local no_recipes = not next(recipes) 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 return
end end
@ -737,7 +737,7 @@ local function on_receive_fields(player, fields)
data.show_usage = not data.show_usage data.show_usage = not data.show_usage
end end
if not progressive_mode and is_fuel and no_recipes then if is_fuel and no_recipes then
data.show_usage = true data.show_usage = true
end end