-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathoctagon_glass.lua
53 lines (49 loc) · 1.4 KB
/
octagon_glass.lua
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
local has_unifieddyes_mod = minetest.get_modpath("unifieddyes")
local function register_glass(key, name)
local tiles = {"scifi_nodes_" .. key .. ".png"}
minetest.register_node("scifi_nodes:" .. key, {
description = name .. " Octagon Glass",
sunlight_propagates = true,
drawtype = "glasslike",
tiles = tiles,
paramtype = "light",
paramtype2 = "facedir",
use_texture_alpha = "blend",
light_source = 10,
groups = {
cracky = 2,
dig_generic = 3
},
is_ground_content = false,
sounds = scifi_nodes.node_sound_glass_defaults(),
})
end
register_glass("octppl", "Purple")
register_glass("octbl", "Blue")
register_glass("octgrn", "Green")
register_glass("octrng", "Orange")
register_glass("octwht", "White")
if has_unifieddyes_mod then
minetest.register_node("scifi_nodes:octwht", {
description = "Octagon Glass",
sunlight_propagates = true,
drawtype = "glasslike",
tiles = {
"scifi_nodes_octwht.png",
},
palette = "unifieddyes_palette_extended.png",
paramtype = "light",
paramtype2 = "color",
use_texture_alpha = "blend",
light_source = 10,
groups = {
cracky = 2,
dig_generic = 3,
ud_param2_colorable = 1
},
is_ground_content = false,
sounds = scifi_nodes.node_sound_glass_defaults(),
on_construct = unifieddyes.on_construct,
on_dig = unifieddyes.on_dig
})
end