-
Notifications
You must be signed in to change notification settings - Fork 2
/
flint_block.lua
96 lines (80 loc) · 2.47 KB
/
flint_block.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
-- Flint block
-- a good use for otherwise useless item
local node = {
name = "flint_block",
desc = "Flint Block",
tile = {"minetest_errata_flint_block.png"}
}
minetest.register_node("minetest_errata:" .. node.name, {
description = node.desc,
tiles = node.tile,
is_ground_content = false,
groups = { cracky = 2 },
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
output = "minetest_errata:" .. node.name,
recipe = {
{ "default:flint", "default:flint", "default:flint" },
{ "default:flint", "default:flint", "default:flint" },
{ "default:flint", "default:flint", "default:flint" },
}
})
minetest.register_craft({
output = "default:flint 9 ",
recipe = {
{ "minetest_errata:" .. node.name },
}
})
-- Derivative blocks
if stairs and stairs.mod and stairs.mod == "redo" then
stairs.register_all(node.name, "minetest_errata:" .. node.name,
{cracky = 3},
node.tile,
node.desc .. " Stair",
node.desc .. " Slab",
default.node_sound_stone_defaults())
elseif minetest.global_exists("stairsplus") then
stairsplus:register_all("minetest_errata", node.name, "minetest_errata:" .. node.name, {
description = node.desc,
tiles = node.tile,
groups = {cracky = 3},
sounds = default.node_sound_stone_defaults(),
})
else
-- stairs.register_stair_and_slab(node.name, "minetest_errata:" .. node.name,
-- {cracky = 3},
-- node.tile,
-- node.desc .. " Stair",
-- node.desc .. " Slab",
-- default.node_sound_stone_defaults()
-- )
stairs.register_slab(node.name, "minetest_errata:" .. node.name,
{ cracky = 2 },
{"minetest_errata_flint_block.png",
"minetest_errata_flint_block.png",
"minetest_errata_flint_block_slab.png",
"minetest_errata_flint_block_slab.png",
"minetest_errata_flint_block_slab.png",
"minetest_errata_flint_block_slab.png"
},
node.desc .. " Stair",
default.node_sound_stone_defaults()
)
stairs.register_stair(node.name, "minetest_errata:" .. node.name,
{ cracky = 2 },
{"minetest_errata_flint_block_slab.png",
"minetest_errata_flint_block.png",
"minetest_errata_flint_block_stair1.png",
"minetest_errata_flint_block_stair2.png",
"minetest_errata_flint_block.png",
"minetest_errata_flint_block_slab.png"
},
node.desc .. " Slab",
default.node_sound_stone_defaults()
)
end
-- procedurally-generated arcs
if minetest.get_modpath("pkarcs") then
pkarcs.register_node("minetest_errata:" .. node.name)
end