This repository has been archived by the owner on Jun 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
init.lua
54 lines (48 loc) · 1.5 KB
/
init.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
local colours = {
{"black", "Black"},
{"cyan", "Cyan"},
{"brown", "Brown"},
{"dark_blue", "Dark Blue"},
{"dark_green", "Dark Green"},
{"dark_grey", "Dark Grey"},
{"dark_pink", "Dark Pink"},
{"green", "Green"},
{"grey", "Grey"},
{"orange", "Orange"},
{"pink", "Pink"},
{"purple", "Purple"},
{"red", "Red"},
{"white", "White"},
{"yellow", "Yellow"}
}
for _, row in ipairs(colours) do
local name = row[1]
local description = row[2]
minetest.register_node("colouredstonebricks:"..name, {
description = description.." Stone Brick",
tiles = {"colouredstonebricks_"..name..".png"},
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
type = "shapeless",
output = 'colouredstonebricks:'..name,
recipe = {
'dye:'..name, 'default:stonebrick',
}
})
-- Support for stairsplus mod
if minetest.get_modpath("moreblocks") then
stairsplus:register_all("colouredstonebricks", name, "colouredstonebricks:"..name, {
description = description.." Stone Brick",
tiles = {"colouredstonebricks_"..name..".png"},
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
sunlight_propagates = true,
})
end
end
-- We don't have blue, violet or magenta coloured stone bricks (yet)
--minetest.register_alias("dye:dark_blue","dye:blue")
--minetest.register_alias("dye:dark_pink","dye:magenta")
--minetest.register_alias("dye:purple","dye:violet")