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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
-- Minetest 0.4.17 mod: framedglass
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,
palette = "unifieddyes_palette_extended.png",
airbrush_replacement_node = "framedglass:steel_framed_obsidian_glass_tinted",
groups = {cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("framedglass:steel_framed_obsidian_glass_tinted", {
description = "Steel-framed Obsidian Glass",
drawtype = "glasslike_framed",
tiles = {
{ name = "framedglass_steel_frame.png", color = "white" },
"framedglass_whiteglass.png",
},
palette = "unifieddyes_palette_extended.png",
inventory_image = minetest.inventorycube("framedglass_glass_face_inv_static.png"),
paramtype = "light",
paramtype2 = "color",
sunlight_propagates = true,
is_ground_content = true,
use_texture_alpha = true,
groups = {cracky=3,oddly_breakable_by_hand=3, ud_param2_colorable = 1, not_in_creative_inventory = 1},
sounds = default.node_sound_glass_defaults(),
})
-- crafts!
unifieddyes.register_color_craft({
output = "framedglass:steel_framed_obsidian_glass_tinted",
type = "shapeless",
palette = "extended",
neutral_node = "framedglass:steel_framed_obsidian_glass",
recipe = {
"NEUTRAL_NODE",
"MAIN_DYE"
}
})
-- Convert old nodes
local static_colors = {
red = 4*24 ,
orange = 4*24 + 2 ,
yellow = 4*24 + 4 ,
green = 4*24 + 8 ,
cyan = 4*24 + 12 ,
blue = 4*24 + 16 ,
violet = 4*24 + 18 ,
magenta = 4*24 + 20 ,
darkgreen = 8*24 + 8 ,
pink = 23 ,
brown = 8*24 + 2 ,
white = 10*24 ,
grey = 10*24 + 7 ,
darkgrey = 10*24 + 11 ,
black = 10*24 + 15
}
local old_nodes = {}
for k, v in pairs(static_colors) do
table.insert(old_nodes, "framedglass:steel_framed_obsidian_glass"..k)
end
minetest.register_lbm({
label = "Convert old framedglass static-colored nodes",
name = "framedglass:convert_static",
run_at_every_load = false,
nodenames = old_nodes,
action = function(pos, node)
local oldcolor = string.sub(node.name, 40)
if oldcolor then
minetest.swap_node(pos, {name = "framedglass:steel_framed_obsidian_glass_tinted",
param2 = static_colors[oldcolor] })
else
minetest.swap_node(pos, {name = "framedglass:steel_framed_obsidian_glass", param2 = 0 })
end
end
})
|