Fix tome edge-case when node_name is not found.
This commit is contained in:
parent
5d14083f2c
commit
cfca4304c0
@ -238,7 +238,7 @@ function eletome.gen_craft_grid(recipe,y_off,no_items)
|
|||||||
-- handle when recipe includes groups
|
-- handle when recipe includes groups
|
||||||
if string.find(recipe.items[x_cnt],"group") then
|
if string.find(recipe.items[x_cnt],"group") then
|
||||||
local grp_name = string.gsub(recipe.items[x_cnt],"group:","")
|
local grp_name = string.gsub(recipe.items[x_cnt],"group:","")
|
||||||
local node_name
|
local node_name = "UNKNOWN"
|
||||||
for name,def in pairs(minetest.registered_nodes) do
|
for name,def in pairs(minetest.registered_nodes) do
|
||||||
if def.groups[grp_name] and not def.groups["wall"] then
|
if def.groups[grp_name] and not def.groups["wall"] then
|
||||||
node_name = name
|
node_name = name
|
||||||
|
Loading…
Reference in New Issue
Block a user