122 lines
4.4 KiB
Lua
Executable File
122 lines
4.4 KiB
Lua
Executable File
-- Minetest 0.4.7 mod: framedglass
|
|
|
|
minetest.register_craft({
|
|
output = 'framedglass:wooden_framed_glass 4',
|
|
recipe = {
|
|
{'default:glass', 'default:glass', 'default:stick'},
|
|
{'default:glass', 'default:glass', 'default:stick'},
|
|
{'default:stick', 'default:stick', ''},
|
|
}
|
|
})
|
|
|
|
minetest.register_craft({
|
|
output = 'framedglass:steel_framed_glass 4',
|
|
recipe = {
|
|
{'default:glass', 'default:glass', 'default:steel_ingot'},
|
|
{'default:glass', 'default:glass', 'default:steel_ingot'},
|
|
{'default:steel_ingot', 'default:steel_ingot', ''},
|
|
}
|
|
})
|
|
|
|
minetest.register_craft({
|
|
output = 'framedglass:wooden_framed_obsidian_glass 4',
|
|
recipe = {
|
|
{'default:obsidian_glass', 'default:obsidian_glass', 'default:stick'},
|
|
{'default:obsidian_glass', 'default:obsidian_glass', 'default:stick'},
|
|
{'default:stick', 'default:stick', ''},
|
|
}
|
|
})
|
|
|
|
minetest.register_craft({
|
|
output = 'framedglass:steel_framed_obsidian_glass 4',
|
|
recipe = {
|
|
{'default:obsidian_glass', 'default:obsidian_glass', 'default:steel_ingot'},
|
|
{'default:obsidian_glass', 'default:obsidian_glass', 'default:steel_ingot'},
|
|
{'default:steel_ingot', 'default:steel_ingot', ''},
|
|
}
|
|
})
|
|
|
|
minetest.register_node("framedglass:wooden_framed_glass", {
|
|
description = "Wooden-framed Glass",
|
|
drawtype = "glasslike_framed_optional",
|
|
tiles = {"framedglass_woodenglass_face_streaks_frame.png","framedglass_glass_face_streaks.png"},
|
|
paramtype = "light",
|
|
sunlight_propagates = true,
|
|
groups = {cracky=3,oddly_breakable_by_hand=3},
|
|
sounds = default.node_sound_glass_defaults(),
|
|
})
|
|
|
|
minetest.register_node("framedglass:steel_framed_glass", {
|
|
description = "Steel-framed Glass",
|
|
drawtype = "glasslike_framed_optional",
|
|
tiles = {"framedglass_steelglass_face_streaks_frame.png","framedglass_glass_face_streaks.png"},
|
|
paramtype = "light",
|
|
sunlight_propagates = true,
|
|
groups = {cracky=3,oddly_breakable_by_hand=3},
|
|
sounds = default.node_sound_glass_defaults(),
|
|
})
|
|
|
|
minetest.register_node("framedglass:wooden_framed_obsidian_glass", {
|
|
description = "Wooden-framed Obsidian Glass",
|
|
drawtype = "glasslike_framed_optional",
|
|
tiles = {"framedglass_woodenglass_face_clean_frame.png","framedglass_glass_face_clean.png"},
|
|
paramtype = "light",
|
|
sunlight_propagates = true,
|
|
groups = {cracky=3,oddly_breakable_by_hand=3},
|
|
sounds = default.node_sound_glass_defaults(),
|
|
})
|
|
|
|
minetest.register_node("framedglass:steel_framed_obsidian_glass", {
|
|
description = "Steel-framed Obsidian Glass",
|
|
drawtype = "glasslike_framed_optional",
|
|
tiles = {"framedglass_steelglass_face_clean_frame.png","framedglass_glass_face_clean.png"},
|
|
paramtype = "light",
|
|
sunlight_propagates = true,
|
|
groups = {cracky=3,oddly_breakable_by_hand=3},
|
|
sounds = default.node_sound_glass_defaults(),
|
|
})
|
|
|
|
if minetest.get_modpath("dye") then
|
|
function add_coloured_framedglass(name, desc, dye)
|
|
minetest.register_node(
|
|
"framedglass:steel_framed_obsidian_glass"..name, {
|
|
description = "Steel-framed "..desc.." Obsidian Glass",
|
|
tiles = {"framedglass_".. name.. "glass_frame.png", "framedglass_".. name.. "glass.png"},
|
|
drawtype = "glasslike_framed_optional",
|
|
paramtype = "light",
|
|
sunlight_propagates = true,
|
|
is_ground_content = true,
|
|
use_texture_alpha = true,
|
|
groups = {cracky=3},
|
|
sounds = default.node_sound_glass_defaults(),
|
|
})
|
|
|
|
minetest.register_craft({
|
|
type = "shapeless",
|
|
output = "framedglass:steel_framed_obsidian_glass"..name,
|
|
recipe = {
|
|
"framedglass:steel_framed_obsidian_glass",
|
|
"group:color_white",
|
|
dye
|
|
}
|
|
})
|
|
end
|
|
|
|
add_coloured_framedglass ("red","Red","group:color_red")
|
|
add_coloured_framedglass ("green","Green","group:color_green")
|
|
add_coloured_framedglass ("blue","Blue","group:color_blue")
|
|
add_coloured_framedglass ("cyan","Cyan","group:color_cyan")
|
|
add_coloured_framedglass ("darkgreen","Dark Green","group:color_dark_green")
|
|
add_coloured_framedglass ("violet","Violet","group:color_violet")
|
|
add_coloured_framedglass ("pink","Pink","group:color_pink")
|
|
add_coloured_framedglass ("yellow","Yellow","group:color_yellow")
|
|
add_coloured_framedglass ("orange","Orange","group:color_orange")
|
|
add_coloured_framedglass ("brown","Brown","group:color_brown")
|
|
add_coloured_framedglass ("white","White","group:color_white")
|
|
add_coloured_framedglass ("grey","Grey","group:color_grey")
|
|
add_coloured_framedglass ("darkgrey","Dark Grey","group:color_dark_grey")
|
|
add_coloured_framedglass ("black","Black","group:color_black")
|
|
end
|
|
|
|
minetest.log("action", "[framedglass] loaded.")
|