summaryrefslogtreecommitdiff
path: root/glass_panes.lua
blob: ef953ed4293015aae3050d6923488f61566ce8ed (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

-- Double pane: top is decorative and can noclip through some slopes and such

minetest.register_node("minetest_errata:pane_flat_double", {
	description = "Double Glass Pane",
	drawtype = "nodebox",
	tiles = {"xpanes_white.png", "xpanes_white.png", "default_glass.png"},
	inventory_image = "minetest_errata_double_glass_item.png",
	paramtype = "light",
	paramtype2 = "facedir",
	sunlight_propagates = true,
                                                            
	node_box = {
			type = "fixed",
			fixed = {{-1/2, -1/2, -1/32, 1/2, 3/2, 1/32}},
		},
	selection_box = {
			type = "fixed",
			fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}},
		},

	groups = {cracky=3},
	use_texture_alpha = true,
})

minetest.register_craft({output = "minetest_errata:pane_flat_double",
	recipe ={
		{"xpanes:pane_flat",},
		{"xpanes:pane_flat",},
	},
})

minetest.register_craft({output = "xpanes:pane_flat 2",
	type = "shapeless",
        recipe ={ "minetest_errata:pane_flat_double" }
})



-- Triple pane: top and right part are decorative

minetest.register_node("minetest_errata:pane_flat_triple", {
	description = "Triple Glass Pane",
	drawtype = "nodebox",
	tiles = {"xpanes_white.png", "xpanes_white.png", "default_glass.png"},
	inventory_image = "minetest_errata_triple_glass_item.png",
	paramtype = "light",
	paramtype2 = "facedir",
	sunlight_propagates = true,
                                                            
	node_box = {
			type = "fixed",
			fixed = {{-1/2, -1/2, -1/32, 1/2, 3/2, 1/32}, 
				   {-1/2, -1/2, -1/32, 3/2, 1/2, 1/32}},
		},
	selection_box = {
			type = "fixed",
			fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}},
		},

	groups = {cracky=3},
	use_texture_alpha = true,
})

minetest.register_craft({output = "minetest_errata:pane_flat_triple",
	recipe ={
		{"xpanes:pane_flat",""},
		{"xpanes:pane_flat","xpanes:pane_flat",},
	},
})

minetest.register_craft({output = "xpanes:pane_flat 3",
        type = "shapeless",
        recipe ={ "minetest_errata:pane_flat_triple" }
})


-- Quadruple pane: all parts save for bottom left are decorative

minetest.register_node("minetest_errata:pane_flat_quadruple", {
	description = "Quadruple Glass Pane",
	drawtype = "nodebox",
	tiles = {"xpanes_white.png", "xpanes_white.png", "default_glass.png"},
	inventory_image = "minetest_errata_quadruple_glass_item.png",
	paramtype = "light",
	paramtype2 = "facedir",
	sunlight_propagates = true,
                                                            
	node_box = {
			type = "fixed",
			fixed = {{-1/2, -1/2, -1/32, 3/2, 3/2, 1/32}},
		},
	selection_box = {
			type = "fixed",
			fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}},
		},

	groups = {cracky=3},
	use_texture_alpha = true,
})

minetest.register_craft({output = "minetest_errata:pane_flat_quadruple",
	recipe ={
		{"xpanes:pane_flat","xpanes:pane_flat",},
		{"xpanes:pane_flat","xpanes:pane_flat",},
	},
})

minetest.register_craft({output = "xpanes:pane_flat 4",
        type = "shapeless",
        recipe ={ "minetest_errata:pane_flat_quadruple" }
})