More things

rename basic bricks into white bricks
add crafting that requires dye
(will later add a way to make dye from Xychorium)
master
Kacey of Minetest 2013-04-13 10:00:13 -06:00
parent a26858b7fc
commit cc32dbe697
1 changed files with 41 additions and 5 deletions

View File

@ -20,17 +20,53 @@ minetest.register_craftitem("xytest:xyxhorium", {
description = "Xychorium",
inventory_image = "xytest_xychorium.png",
})
minetest.register_node("xytest:xychorium_brick_basic", {
description = "Basic Xychorium Brick",
tiles = {"xytest_brick_basic.png"},
minetest.register_node("xytest:xychorium_brick_white", {
description = "White Xychorium Brick",
tiles = {"xytest_brick_white.png"},
is_ground_content = true,
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
})
minetest.register_craft({
output = 'xytest:xychorium_brick_basic 4',
output = 'xytest:xychorium_brick_white 4',
recipe = {
{'xytest:xychorium', 'xytest:xychorium'},
{'xytest:xychorium', 'xytest:xychorium'},
}
})
})
local xytest = {}
-- Now to make different colored Bricks
xytest.dyes = {
{"white", "White", nil},
{"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"},
}
for _, row in ipairs(xytest.dyes) do
local name = row[1]
local desc = row[2]
local craft_color_group = row[3]
minetest.register_node("xytest:xychorium_brick_"..name, {
description = desc.." Xychorium Brick",
tiles = {"xytest_brick_"..name..".png"},
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,wool=1},
})
if craft_color_group then
minetest.register_craft({
type = "shapeless",
output = 'xytest:brick_'..name..' 1',
recipe = {'group:dye,'..craft_color_group, 'xytest:xychorium_brick_white'},
})
end
end