-- =================================================================== local cvt = castle.cvt local fcon = castle.fcon local S = castle.S -- =================================================================== castle_masonry.register_murderhole = function (material) local composition_def, burn_time, tile, desc = castle_masonry.get_material_properties(material) if composition_def == nil then return end local mod_name = minetest.get_current_modname() local nodename = mod_name .. ":hole_" .. material.name -- Node Definition castle_masonry.masonry_node (nodename, { drawtype = "nodebox", description = S("@1 Murder Hole", desc), tiles = tile, groups = composition_def.groups, sounds = composition_def.sounds, paramtype = "light", paramtype2 = "facedir", node_box = { type = "fixed", fixed = { {-8/16,-8/16,-8/16,-4/16,8/16,8/16}, {4/16,-8/16,-8/16,8/16,8/16,8/16}, {-4/16,-8/16,-8/16,4/16,8/16,-4/16}, {-4/16,-8/16,8/16,4/16,8/16,4/16}, }, }, }) nodename = mod_name .. ":machicolation_" .. material.name castle_masonry.masonry_node (nodename, { drawtype = "nodebox", description = S("@1 Machicolation", desc), tiles = tile, groups = composition_def.groups, sounds = composition_def.sounds, paramtype = "light", paramtype2 = "facedir", node_box = { type = "fixed", fixed = { {-0.5, 0, -0.5, 0.5, 0.5, 0}, {-0.5, -0.5, 0, -0.25, 0.5, 0.5}, {0.25, -0.5, 0, 0.5, 0.5, 0.5}, }, }, }) minetest.register_craft ({ output = mod_name..":hole_"..material.name.." 4", recipe = { {"",material.craft_material, "" }, {material.craft_material,"", material.craft_material}, {"",material.craft_material, ""} }, }) minetest.register_craft({ output = mod_name..":machicolation_"..material.name, type="shapeless", recipe = {mod_name..":hole_"..material.name}, }) minetest.register_craft({ output = mod_name..":hole_"..material.name, type="shapeless", recipe = {mod_name..":machicolation_"..material.name}, }) if burn_time > 0 then minetest.register_craft({ type = "fuel", recipe = mod_name..":hole_"..material.name, burntime = burn_time, }) minetest.register_craft({ type = "fuel", recipe = mod_name..":machicolation_"..material.name, burntime = burn_time, }) end end -- =================================================================== -- End of file.