forked from Echoes91/ethereal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstairs.lua
317 lines (270 loc) · 10.4 KB
/
stairs.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
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
local S = ethereal.intllib
-- Stairs Redo
if stairs and stairs.mod and stairs.mod == "redo" then
stairs.register_all("crystal_block", "ethereal:crystal_block",
{cracky = 1, level = 2, puts_out_fire = 1, cools_lava = 1},
{"crystal_block.png"},
S("Crystal Block Stair"),
S("Crystal Block Slab"),
default.node_sound_glass_defaults())
stairs.register_all("icebrick", "ethereal:icebrick",
{cracky = 3, puts_out_fire = 1, cools_lava = 1},
{"brick_ice.png"},
S("Ice Brick Stair"),
S("Ice Brick Slab"),
default.node_sound_glass_defaults())
stairs.register_all("snowbrick", "ethereal:snowbrick",
{crumbly = 3, puts_out_fire = 1, cools_lava = 1},
{"brick_snow.png"},
S("Snow Brick Stair"),
S("Snow Brick Slab"),
default.node_sound_dirt_defaults({
footstep = {name = "default_snow_footstep", gain = 0.25},
dug = {name = "default_snow_footstep", gain = 0.75},
}))
stairs.register_all("dry_dirt", "ethereal:dry_dirt",
{crumbly = 3},
{"ethereal_dry_dirt.png"},
S("Dried Dirt Stair"),
S("Dried Dirt Slab"),
default.node_sound_dirt_defaults())
stairs.register_all("mushroom_trunk", "ethereal:mushroom_trunk",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
{"mushroom_trunk.png"},
S("Mushroom Trunk Stair"),
S("Mushroom Trunk Slab"),
default.node_sound_wood_defaults())
stairs.register_all("mushroom", "ethereal:mushroom",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
{"mushroom_block.png"},
S("Mushroom Top Stair"),
S("Mushroom Top Slab"),
default.node_sound_wood_defaults())
stairs.register_all("frost_wood", "ethereal:frost_wood",
{choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
{"frost_wood.png"},
S("Frost Wood Stair"),
S("Frost Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_all("yellow_wood", "ethereal:yellow_wood",
{choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
{"yellow_wood.png"},
S("Healing Wood Stair"),
S("Healing Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_all("palm_wood", "ethereal:palm_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"moretrees_palm_wood.png"},
S("Palm Wood Stair"),
S("Palm Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_all("birch_wood", "ethereal:birch_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"moretrees_birch_wood.png"},
S("Birch Wood Stair"),
S("Birch Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_all("banana_wood", "ethereal:banana_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"banana_wood.png"},
S("Banana Wood Stair"),
S("Banana Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_all("willow_wood", "ethereal:willow_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"willow_wood.png"},
S("Willow Wood Stair"),
S("Willow Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_all("redwood_wood", "ethereal:redwood_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"redwood_wood.png"},
S("Redwood stair"),
S("Redwood Slab"),
default.node_sound_wood_defaults())
stairs.register_all("bamboo_wood", "ethereal:bamboo_floor",
{snappy = 3, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"bamboo_floor.png"},
S("Bamboo stair"),
S("Bamboo Slab"),
default.node_sound_wood_defaults())
-- Stairs Plus (in More Blocks)
elseif minetest.global_exists("stairsplus") then
stairsplus:register_all("ethereal", "crystal_block", "ethereal:crystal_block", {
description = S("Crystal block"),
tiles = {"crystal_block.png"},
groups = {cracky = 1, falling_node = 1, puts_out_fire = 1, cools_lava = 1},
sounds = default.node_sound_glass_defaults(),
})
stairsplus:register_all("ethereal", "icebrick", "ethereal:icebrick", {
description = S("Ice Brick"),
tiles = {"brick_ice.png"},
groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1},
sounds = default.node_sound_glass_defaults(),
})
stairsplus:register_all("ethereal", "snowbrick", "ethereal:snowbrick", {
description = S("Snow Brick"),
tiles = {"brick_snow.png"},
groups = {crumbly = 3, puts_out_fire = 1, cools_lava = 1},
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_snow_footstep", gain = 0.25},
dug = {name = "default_snow_footstep", gain = 0.75},
})
})
stairsplus:register_all("ethereal", "dry_dirt", "ethereal:dry_dirt", {
description = S("Dried Dirt"),
tiles = {"ethereal_dry_dirt.png"},
groups = {crumbly = 3},
sounds = default.node_sound_dirt_defaults(),
})
stairsplus:register_all("ethereal", "mushroom_trunk", "ethereal:mushroom_trunk", {
description = S("Mushroom Trunk"),
tiles = {"mushroom_trunk.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "mushroom", "ethereal:mushroom", {
description = S("Mushroom Top"),
tiles = {"mushroom_block.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "frost_wood", "ethereal:frost_wood", {
description = S("Frost Wood"),
tiles = {"frost_wood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "yellow_wood", "ethereal:yellow_wood", {
description = S("Healing Wood"),
tiles = {"yellow_wood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "palm_wood", "ethereal:palm_wood", {
description = S("Palm Wood"),
tiles = {"moretrees_palm_wood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "birch_wood", "ethereal:birch_wood", {
description = S("Birch Wood"),
tiles = {"moretrees_birch_wood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "banana_wood", "ethereal:banana_wood", {
description = S("Banana Wood"),
tiles = {"banana_wood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "willow_wood", "ethereal:willow_wood", {
description = S("Willow Wood"),
tiles = {"willow_wood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "redwood_wood", "ethereal:redwood_wood", {
description = S("Redwood"),
tiles = {"redwood_wood.png"},
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
stairsplus:register_all("ethereal", "bamboo_wood", "ethereal:bamboo_floor", {
description = S("Bamboo"),
tiles = {"bamboo_floor.png"},
groups = {snappy = 3, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
})
-- Default Stairs
else
stairs.register_stair_and_slab("crystal_block", "ethereal:crystal_block",
{cracky = 1, level = 2, puts_out_fire = 1, cools_lava = 1},
{"crystal_block.png"},
S("Crystal Block Stair"),
S("Crystal Block Slab"),
default.node_sound_glass_defaults())
stairs.register_stair_and_slab("icebrick", "ethereal:icebrick",
{cracky = 3, puts_out_fire = 1, cools_lava = 1},
{"brick_ice.png"},
S("Ice Brick Stair"),
S("Ice Brick Slab"),
default.node_sound_glass_defaults())
stairs.register_stair_and_slab("snowbrick", "ethereal:snowbrick",
{crumbly = 3, puts_out_fire = 1, cools_lava = 1},
{"brick_snow.png"},
S("Snow Brick Stair"),
S("Snow Brick Slab"),
default.node_sound_dirt_defaults({
footstep = {name = "default_snow_footstep", gain = 0.15},
dug = {name = "default_snow_footstep", gain = 0.2},
dig = {name = "default_snow_footstep", gain = 0.2}
}))
stairs.register_stair_and_slab("dry_dirt", "ethereal:dry_dirt",
{crumbly = 3},
{"ethereal_dry_dirt.png"},
S("Dried Dirt Stair"),
S("Dried Dirt Slab"),
default.node_sound_dirt_defaults())
stairs.register_stair_and_slab("mushroom_trunk", "ethereal:mushroom_trunk",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
{"mushroom_trunk.png"},
S("Mushroom Trunk Stair"),
S("Mushroom Trunk Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("mushroom", "ethereal:mushroom",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
{"mushroom_block.png"},
S("Mushroom Top Stair"),
S("Mushroom Top Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("frost_wood", "ethereal:frost_wood",
{choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
{"frost_wood.png"},
S("Frost Wood Stair"),
S("Frost Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("yellow_wood", "ethereal:yellow_wood",
{choppy = 2, oddly_breakable_by_hand = 1, put_out_fire = 1},
{"yellow_wood.png"},
S("Healing Wood Stair"),
S("Healing Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("palm_wood", "ethereal:palm_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"moretrees_palm_wood.png"},
S("Palm Wood Stair"),
S("Palm Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("birch_wood", "ethereal:birch_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"moretrees_birch_wood.png"},
"Birch Wood Stair",
"Birch Wood Slab",
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("banana_wood", "ethereal:banana_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"banana_wood.png"},
S("Banana Wood Stair"),
S("Banana Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("willow_wood", "ethereal:willow_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"willow_wood.png"},
S("Willow Wood Stair"),
S("Willow Wood Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("redwood_wood", "ethereal:redwood_wood",
{choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"redwood_wood.png"},
S("Redwood stair"),
S("Redwood Slab"),
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("bamboo_wood", "ethereal:bamboo_floor",
{snappy = 3, choppy = 2, oddly_breakable_by_hand = 1, flammable = 3},
{"bamboo_floor.png"},
S("Bamboo stair"),
S("Bamboo Slab"),
default.node_sound_wood_defaults())
end