1
0
mirror of https://codeberg.org/tenplus1/bakedclay.git synced 2024-11-07 08:50:17 +01:00
bakedclay/init.lua

99 lines
1.9 KiB
Lua
Raw Normal View History

2016-01-10 18:56:39 +01:00
2015-04-01 10:06:11 +02:00
-- Baked Clay (0.4) by TenPlus1
2014-11-09 16:21:00 +01:00
2015-08-28 21:27:06 +02:00
local clay = {
2016-01-10 18:56:39 +01:00
{"white", "White"},
{"grey", "Grey"},
{"black", "Black"},
{"red", "Red"},
{"yellow", "Yellow"},
{"green", "Green"},
{"cyan", "Cyan"},
{"blue", "Blue"},
{"magenta", "Magenta"},
{"orange", "Orange"},
{"violet", "Violet"},
{"brown", "Brown"},
{"pink", "Pink"},
{"dark_grey", "Dark Grey"},
{"dark_green", "Dark Green"},
2014-11-09 16:21:00 +01:00
}
2016-06-05 11:43:01 +02:00
for n = 1, #clay do
2015-04-01 10:06:11 +02:00
-- node definition
2016-06-05 11:43:01 +02:00
minetest.register_node("bakedclay:" .. clay[n][1], {
description = clay[n][2] .. " Baked Clay",
tiles = {"baked_clay_" .. clay[n][1] ..".png"},
2016-01-10 18:56:39 +01:00
groups = {cracky = 3, bakedclay = 1},
2014-11-09 16:21:00 +01:00
sounds = default.node_sound_stone_defaults(),
})
2015-04-01 10:06:11 +02:00
2016-01-10 18:56:39 +01:00
-- craft from dye and any baked clay
2015-04-01 10:06:11 +02:00
minetest.register_craft({
type = "shapeless",
2016-06-05 11:43:01 +02:00
output = "bakedclay:" .. clay[n][1],
recipe = {"dye:" .. clay[n][1], "group:bakedclay"},
2015-04-01 10:06:11 +02:00
})
-- register stair and slab
2015-08-28 21:27:06 +02:00
if stairs and not stairs.mod then
2016-06-05 11:43:01 +02:00
stairs.register_stair_and_slab("bakedclay_".. clay[n][1], "bakedclay:".. clay[n][1],
{cracky = 3},
{"baked_clay_" .. clay[n][1] .. ".png"},
clay[n][2] .. " Baked Clay Stair",
clay[n][2] .. " Baked Clay Slab",
2014-11-09 16:21:00 +01:00
default.node_sound_stone_defaults())
2015-08-28 21:27:06 +02:00
end
2014-11-09 16:21:00 +01:00
end
2016-06-05 11:43:01 +02:00
-- cook clay block into white baked clay
minetest.register_craft({
type = "cooking",
output = "bakedclay:white",
recipe = "default:clay",
})
2015-04-01 10:06:11 +02:00
-- register a few extra dye colour options
2014-11-09 16:21:00 +01:00
minetest.register_craft( {
2015-04-01 10:06:11 +02:00
type = "shapeless",
output = "dye:dark_grey 3",
recipe = {
"dye:black", "dye:black", "dye:white",
2014-11-09 16:21:00 +01:00
},
})
minetest.register_craft( {
2015-04-01 10:06:11 +02:00
type = "shapeless",
output = "dye:grey 3",
recipe = {
"dye:black", "dye:white", "dye:white",
2014-11-09 16:21:00 +01:00
},
})
minetest.register_craft( {
2015-04-01 10:06:11 +02:00
type = "shapeless",
output = "dye:green 4",
recipe = {
"default:cactus",
2014-11-09 16:21:00 +01:00
},
})
minetest.register_craft( {
2015-04-01 10:06:11 +02:00
type = "shapeless",
output = "dye:black 4",
recipe = {
"default:coal_lump",
2014-11-09 16:21:00 +01:00
},
})
2016-06-05 11:43:01 +02:00
minetest.register_craft( {
type = "shapeless",
output = "dye:brown 4",
recipe = {
"default:dry_shrub",
},
})