@@ -133,9 +133,9 @@ if m:is_empty() then goto skip end local l = sorcery.data.metallookup[m:get_name()] if not l then local p = sorcery.lib.tbl.walk(m:get_definition()._sorcery,{'material'}) - if p.metal then l = p end + if p and p.metal then l = p end end if not l then return false end mix[l.id] = (mix[l.id] or 0) + l.value count = count + l.value @@ -326,9 +326,9 @@ drop = id; groups = { cracky = (state == 'open' and 2) or nil; sorcery_metallurgy = 1; - not_in_creative_inventory = (state == open) and nil or 1; + not_in_creative_inventory = (state == 'open') and nil or 1; }; sunlight_propagates = true; paramtype1 = 'light'; paramtype2 = 'facedir'; @@ -407,9 +407,9 @@ description = desc; drop = id; after_dig_node = sorcery.lib.node.purge_container; groups = { - cracky = (active and 2) or nil; + cracky = (not active and 2) or nil; sorcery_metallurgy = 1; not_in_creative_inventory = active and 1 or nil; }; paramtype2 = 'facedir';