2015-04-01 10:06:11 +02:00
|
|
|
-- Baked Clay (0.4) by TenPlus1
|
2014-11-09 16:21:00 +01:00
|
|
|
|
|
|
|
local clay = {}
|
2015-04-01 10:06:11 +02:00
|
|
|
|
2014-11-09 16:21:00 +01:00
|
|
|
clay.dyes = {
|
|
|
|
{"white", "White", "basecolor_white"},
|
|
|
|
{"grey", "Grey", "basecolor_grey"},
|
|
|
|
{"black", "Black", "basecolor_black"},
|
|
|
|
{"red", "Red", "basecolor_red"},
|
|
|
|
{"yellow", "Yellow", "basecolor_yellow"},
|
|
|
|
{"green", "Green", "basecolor_green"},
|
|
|
|
{"cyan", "Cyan", "basecolor_cyan"},
|
|
|
|
{"blue", "Blue", "basecolor_blue"},
|
|
|
|
{"magenta", "Magenta", "basecolor_magenta"},
|
|
|
|
{"orange", "Orange", "excolor_orange"},
|
|
|
|
{"violet", "Violet", "excolor_violet"},
|
|
|
|
{"brown", "Brown", "unicolor_dark_orange"},
|
|
|
|
{"pink", "Pink", "unicolor_light_red"},
|
|
|
|
{"dark_grey", "Dark Grey", "unicolor_darkgrey"},
|
|
|
|
{"dark_green", "Dark Green", "unicolor_dark_green"},
|
|
|
|
}
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "cooking",
|
|
|
|
output = "bakedclay:white",
|
|
|
|
recipe = "default:clay",
|
|
|
|
})
|
|
|
|
|
|
|
|
for _, row in ipairs(clay.dyes) do
|
2015-04-01 10:06:11 +02:00
|
|
|
|
|
|
|
-- node definition
|
|
|
|
minetest.register_node("bakedclay:" .. row[1], {
|
|
|
|
description = row[2] .. " Baked Clay",
|
|
|
|
tiles = {"baked_clay_" .. row[1] ..".png"},
|
|
|
|
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
|
|
|
|
|
|
|
-- craft from dye and white clay
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "shapeless",
|
|
|
|
output = "bakedclay:" .. row[1],
|
|
|
|
recipe = {"group:dye," .. row[3], "group:bakedclay"},
|
|
|
|
})
|
|
|
|
|
|
|
|
-- register stair and slab
|
|
|
|
stairs.register_stair_and_slab("bakedclay_".. row[1], "bakedclay:".. row[1],
|
2014-11-09 16:21:00 +01:00
|
|
|
{cracky=3},
|
2015-04-01 10:06:11 +02:00
|
|
|
{"baked_clay_" .. row[1] .. ".png"},
|
|
|
|
"Baked Clay " .. row[2] .. " Stair",
|
|
|
|
"Baked Clay " .. row[2] .. " Slab",
|
2014-11-09 16:21:00 +01:00
|
|
|
default.node_sound_stone_defaults())
|
|
|
|
end
|
|
|
|
|
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
|
|
|
},
|
|
|
|
})
|