summaryrefslogtreecommitdiff
path: root/framedglass/init.lua
blob: bf504950cb795155b4ab69cd4f189c6c6d9c8ae6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
-- 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",
	tiles = {"framedglass_wooden_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",
	tiles = {"framedglass_steel_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",
	tiles = {"framedglass_wooden_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",
	tiles = {"framedglass_steel_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(),
})

function add_coloured_framedglass(name, desc, dye, texture)
	minetest.register_node( "framedglass:steel_framed_obsidian_glass"..name, {
		description = "Steel-framed "..desc.." Obsidian Glass",
		tiles = {"framedglass_steel_frame.png",texture},
		drawtype = "glasslike_framed",
		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_glass",
			"group:basecolor_white",
			dye
		}
	})

end

add_coloured_framedglass ("red","Red","group:basecolor_red","framedglass_redglass.png")
add_coloured_framedglass ("green","Green","group:basecolor_green","framedglass_greenglass.png")
add_coloured_framedglass ("blue","Blue","group:basecolor_blue","framedglass_blueglass.png")
add_coloured_framedglass ("cyan","Cyan","group:basecolor_cyan","framedglass_cyanglass.png")
add_coloured_framedglass ("darkgreen","Dark Green","group:unicolor_dark_green","framedglass_darkgreenglass.png")
add_coloured_framedglass ("violet","Violet","group:excolor_violet","framedglass_violetglass.png")
add_coloured_framedglass ("pink","Pink","group:unicolor_light_red","framedglass_pinkglass.png")
add_coloured_framedglass ("yellow","Yellow","group:basecolor_yellow","framedglass_yellowglass.png")
add_coloured_framedglass ("orange","Orange","group:basecolor_orange","framedglass_orangeglass.png")
add_coloured_framedglass ("brown","Brown","group:unicolor_dark_orange","framedglass_brownglass.png")
add_coloured_framedglass ("white","White","group:basecolor_white","framedglass_whiteglass.png")
add_coloured_framedglass ("grey","Grey","group:basecolor_grey","framedglass_greyglass.png")
add_coloured_framedglass ("darkgrey","Dark Grey","group:excolor_darkgrey","framedglass_darkgreyglass.png")
add_coloured_framedglass ("black","Black","group:basecolor_black","framedglass_blackglass.png")