-- Translation support
local S = minetest.get_translator("camomese")

-- Register the Digiline Core Copper Block (off state) node
minetest.register_node("camomese:digicore_copperblock", {
    description = S("Digiline Core Copper Block"),
    tiles = {"default_copper_block.png^camomese_digicore.png"},
    is_ground_content = false,
    inventory_image = minetest.inventorycube("default_copper_block.png^camomese_digicore.png"),
    groups = {cracky = 1, level = 2},
    sounds = default.node_sound_metal_defaults(),
    digilines = {
        wire = {
            rules = {
                { x =  0, y =  0, z = -1 },
                { x =  1, y =  0, z =  0 },
                { x = -1, y =  0, z =  0 },
                { x =  0, y =  0, z =  1 },
                { x =  0, y =  1, z =  0 },
                { x =  0, y = -1, z =  0 }
            },
        },
    },
})

-- Register the recipe
minetest.register_craft({
    output = "camomese:digicore_copperblock 8",
    recipe = {
        {"default:copperblock", "default:copperblock", "default:copperblock"},
        {"default:copperblock", "digilines:wire_std_00000000", "default:copperblock"},
        {"default:copperblock", "default:copperblock", "default:copperblock"},
    }
})
