Fix wall craft registrations (#3004)

This commit is contained in:
Alexander Chibrikin 2022-12-02 21:54:46 +03:00 committed by GitHub
parent c4cf1a6004
commit 792bc6f6e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -45,6 +45,12 @@ walls.register = function(wall_name, wall_desc, wall_texture_table, wall_mat, wa
})
-- crafting recipe
-- HACK:
-- Walls have no crafts, when register new wall via API from another mod, but in the same namespace (`walls`).
-- So we should remove `":"` at the beginning of the name.
if wall_name:sub(1, 1) == ":" then
wall_name = wall_name:sub(2)
end
minetest.register_craft({
output = wall_name .. " 6",
recipe = {