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
|
minetest.register_alias("darkage:lamp", "castle_lighting:light")
minetest.register_alias("castle:street_light", "castle_lighting:light")
minetest.register_alias("castle:light", "castle_lighting:light")
minetest.register_alias("castle:chandelier", "castle_lighting:chandelier")
minetest.register_alias("castle:chandelier_chain", "castle_lighting:chandelier_chain")
-- internationalization boilerplate
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
castle_lighting = {}
dofile(MP.."/brasier.lua")
minetest.register_node("castle_lighting:light",{
drawtype = "glasslike",
description = S("Light Block"),
sunlight_propagates = true,
light_source = 14,
tiles = {"castle_street_light.png"},
groups = {cracky=2},
sounds = default.node_sound_glass_defaults(),
paramtype = "light",
})
minetest.register_craft({
output = "castle_lighting:light",
recipe = {
{"default:stick", "default:glass", "default:stick"},
{"default:glass", "default:torch", "default:glass"},
{"default:stick", "default:glass", "default:stick"},
}
})
minetest.register_node( "castle_lighting:chandelier", {
drawtype = "plantlike",
description = S("Chandelier"),
paramtype = "light",
wield_image = "castle_chandelier_wield.png",
inventory_image = "castle_chandelier_wield.png",
groups = {cracky=2},
sounds = default.node_sound_glass_defaults(),
sunlight_propagates = true,
light_source = 14,
tiles = {
{
name = "castle_chandelier.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 1.0
},
},
},
selection_box = {
type = "fixed",
fixed = {
{0.35,-0.375,0.35,-0.35,0.5,-0.35},
},
},
})
minetest.register_craft({
output = "castle_lighting:chandelier",
recipe = {
{"", "", ""},
{"", "default:steel_ingot", ""},
{"default:torch","default:torch","default:torch"},
}
})
minetest.register_node( "castle_lighting:chandelier_chain", {
drawtype = "plantlike",
description = S("Chandelier Chain"),
paramtype = "light",
wield_image = "castle_chandelier_chain.png",
inventory_image = "castle_chandelier_chain.png",
groups = {cracky=2},
sounds = default.node_sound_glass_defaults(),
sunlight_propagates = true,
tiles = {"castle_chandelier_chain.png"},
selection_box = {
type = "fixed",
fixed = {
{0.1,-0.5,0.1,-0.1,0.5,-0.1},
},
},
})
minetest.register_craft({
output = "castle_lighting:chandelier_chain 4",
recipe = {
{"", "default:steel_ingot", ""},
{"", "", ""},
{"","default:steel_ingot",""},
}
})
|