mirror of
https://github.com/minetest-mods/craftguide.git
synced 2025-07-06 10:00:32 +02:00
Remove some unnecessary checks
This commit is contained in:
6
init.lua
6
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
|
||||
|
||||
|
Reference in New Issue
Block a user