mirror of
https://github.com/minetest-mods/craftguide.git
synced 2025-07-06 18:10:31 +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)
|
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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user