Compare commits

..

No commits in common. "master" and "master" have entirely different histories.

3 changed files with 38 additions and 44 deletions

2
depends.txt Executable file
View File

@ -0,0 +1,2 @@
default
dye?

View File

@ -76,46 +76,43 @@ minetest.register_node("framedglass:steel_framed_obsidian_glass", {
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
}) })
if minetest.get_modpath("dye") then function add_coloured_framedglass(name, desc, dye)
function add_coloured_framedglass(name, desc, dye) minetest.register_node( "framedglass:steel_framed_obsidian_glass"..name, {
minetest.register_node( description = "Steel-framed "..desc.." Obsidian Glass",
"framedglass:steel_framed_obsidian_glass"..name, { tiles = {"framedglass_".. name.. "glass_frame.png", "framedglass_".. name.. "glass.png"},
description = "Steel-framed "..desc.." Obsidian Glass", drawtype = "glasslike_framed_optional",
tiles = {"framedglass_".. name.. "glass_frame.png", "framedglass_".. name.. "glass.png"}, paramtype = "light",
drawtype = "glasslike_framed_optional", sunlight_propagates = true,
paramtype = "light", is_ground_content = true,
sunlight_propagates = true, use_texture_alpha = true,
is_ground_content = true, groups = {cracky=3},
use_texture_alpha = "blend", sounds = default.node_sound_glass_defaults(),
groups = {cracky=3}, })
sounds = default.node_sound_glass_defaults(),
})
minetest.register_craft({ minetest.register_craft({
type = "shapeless", type = "shapeless",
output = "framedglass:steel_framed_obsidian_glass"..name, output = "framedglass:steel_framed_obsidian_glass"..name,
recipe = { recipe = {
"framedglass:steel_framed_obsidian_glass", "framedglass:steel_framed_glass",
"group:color_white", "group:basecolor_white",
dye 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 end
minetest.log("action", "[framedglass] loaded.") add_coloured_framedglass ("red","Red","group:basecolor_red")
add_coloured_framedglass ("green","Green","group:basecolor_green")
add_coloured_framedglass ("blue","Blue","group:basecolor_blue")
add_coloured_framedglass ("cyan","Cyan","group:basecolor_cyan")
add_coloured_framedglass ("darkgreen","Dark Green","group:unicolor_dark_green")
add_coloured_framedglass ("violet","Violet","group:excolor_violet")
add_coloured_framedglass ("pink","Pink","group:unicolor_light_red")
add_coloured_framedglass ("yellow","Yellow","group:basecolor_yellow")
add_coloured_framedglass ("orange","Orange","group:basecolor_orange")
add_coloured_framedglass ("brown","Brown","group:unicolor_dark_orange")
add_coloured_framedglass ("white","White","group:basecolor_white")
add_coloured_framedglass ("grey","Grey","group:basecolor_grey")
add_coloured_framedglass ("darkgrey","Dark Grey","group:excolor_darkgrey")
add_coloured_framedglass ("black","Black","group:basecolor_black")

View File

@ -1,5 +0,0 @@
name = framedglass
title = Framed Glass
description = Adds Framed Glasses
depends = default
optional_depends = dye