Check for not_in_craft_guide group in reverse mode
Also remove an extra pair of parentheses and split long lines
This commit is contained in:
parent
7e4ab51209
commit
161db07aaf
14
init.lua
14
init.lua
|
@ -302,10 +302,10 @@ function craftguide:get_init_items()
|
|||
local items_list, counter = {}, 0
|
||||
for name, def in pairs(reg_items) do
|
||||
local is_fuel = get_fueltime(name) > 0
|
||||
if (not (def.groups.not_in_craft_guide == 1 or def.groups.not_in_creative_inventory == 1)) and
|
||||
(get_recipe(name).items or is_fuel) and
|
||||
def.description and def.description ~= "" then
|
||||
|
||||
if not (def.groups.not_in_craft_guide == 1 or
|
||||
def.groups.not_in_creative_inventory == 1) and
|
||||
(get_recipe(name).items or is_fuel) and
|
||||
def.description and def.description ~= "" then
|
||||
counter = counter + 1
|
||||
items_list[counter] = name
|
||||
end
|
||||
|
@ -363,8 +363,10 @@ end
|
|||
function craftguide:get_item_usages(item)
|
||||
local usages = {}
|
||||
for name, def in pairs(reg_items) do
|
||||
if not (def.groups.not_in_creative_inventory == 1) and
|
||||
(get_recipe(name).items) and def.description and def.description ~= "" then
|
||||
if not (def.groups.not_in_craft_guide == 1 or
|
||||
def.groups.not_in_creative_inventory == 1) and
|
||||
(get_recipe(name).items) and def.description and
|
||||
def.description ~= "" then
|
||||
local recipes = get_recipes(name)
|
||||
for i = 1, #recipes do
|
||||
local recipe = recipes[i]
|
||||
|
|
Loading…
Reference in New Issue