Browse Source

Craftguide: Fix error caused by removing invalid recipes (#2732)

SmallJoker 3 years ago
parent
commit
1da168b3c3
2 changed files with 4 additions and 2 deletions
  1. 1 1
      mods/default/functions.lua
  2. 3 1
      mods/mtg_craftguide/init.lua

+ 1 - 1
mods/default/functions.lua

@@ -431,7 +431,7 @@ function default.register_mesepost(name, def)
 		recipe = {
 			{'', 'default:glass', ''},
 			{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
-			{' ', def.material, ''},
+			{'', def.material, ''},
 		}
 	})
 

+ 3 - 1
mods/mtg_craftguide/init.lua

@@ -111,7 +111,9 @@ local function get_craftable_recipes(output)
 		end
 	end
 
-	return recipes
+	if #recipes > 0 then
+		return recipes
+	end
 end
 
 local function show_item(def)