Add dyed planks

register them via API, add one mask texture for them and locales
This commit is contained in:
Mikita Wiśniewski 2022-03-22 10:50:54 +07:00
parent aa4a004087
commit 9b198bffb0
5 changed files with 70 additions and 0 deletions

18
api.lua
View File

@ -148,3 +148,21 @@ function mcl_decor.register_table(name, desc, material, tiles)
burntime = 10,
})
end
function mcl_decor.register_dyed_planks(name, desc, hexcolor, dye, color_group)
minetest.register_node(name, {
description = desc,
tiles = {"mcl_decor_dyed_planks.png^[colorize:" .. hexcolor .. ":125"},
stack_max = 64,
is_ground_content = false,
groups = {handy=1, axey=1, flammable=3, wood=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=20, [color_group]=1},
sounds = mcl_sounds.node_sound_wood_defaults(),
_mcl_blast_resistance = 3,
_mcl_hardness = 2,
})
minetest.register_craft({
type = "shapeless",
output = name,
recipe = {"group:wood", "mcl_dye:" .. dye}
})
end

View File

@ -15,3 +15,19 @@ Birch Table=Берёзовый стол
Dark Oak Table=Стол из тёмного дуба
Jungle Table=Стол из тропического дерева
Spruce Table=Еловый стол
White Planks=Белые доски
Grey Planks=Серые доски
Light Grey Planks=Светло-серые доски
Black Planks=Чёрные доски
Red Planks=Красные доски
Yellow Planks=Жёлтые доски
Green Planks=Зелёные доски
Cyan Planks=Голубые доски
Blue Planks=Синие доски
Magenta Planks=Фиолетовые доски
Orange Planks=Оранжевые доски
Purple Planks=Пурпурные доски
Brown Planks=Коричневые доски
Pink Planks=Розовые доски
Lime Planks=Зелёные лаймовые доски
Light Blue Planks=Светло-голубые доски

View File

@ -15,3 +15,19 @@ Birch Table=
Dark Oak Table=
Jungle Table=
Spruce Table=
White Planks=
Grey Planks=
Light Grey Planks=
Black Planks=
Red Planks=
Yellow Planks=
Green Planks=
Cyan Planks=
Blue Planks=
Magenta Planks=
Orange Planks=
Purple Planks=
Brown Planks=
Pink Planks=
Lime Planks=
Light Blue Planks=

View File

@ -118,3 +118,23 @@ mcl_decor.register_table("mcl_decor:jungle_table", S("Jungle Table"), "mcl_core:
mcl_decor.register_table("mcl_decor:spruce_table", S("Spruce Table"), "mcl_core:sprucewood", "default_wood.png")
mcl_decor.register_table("mcl_decor:acacia_table", S("Acacia Table"), "mcl_core:acaciawood", "default_acacia_wood.png")
mcl_decor.register_table("mcl_decor:birch_table", S("Birch Table"), "mcl_core:birchwood", "mcl_core_planks_birch.png")
--- Dyed Planks ---
mcl_decor.register_dyed_planks("mcl_decor:white_planks", S("White Planks"), "#EDEDED", "white", "unicolor_white=1")
mcl_decor.register_dyed_planks("mcl_decor:grey_planks", S("Grey Planks"), "#5F5F5F", "dark_grey", "unicolor_darkgrey=1")
mcl_decor.register_dyed_planks("mcl_decor:silver_planks", S("Light Grey Planks"), "#8C8C8C", "grey", "unicolor_grey=1")
mcl_decor.register_dyed_planks("mcl_decor:black_planks", S("Black Planks"), "#030303", "black", "unicolor_black=1")
mcl_decor.register_dyed_planks("mcl_decor:red_planks", S("Red Planks"), "#BD0000", "red", "unicolor_red=1")
mcl_decor.register_dyed_planks("mcl_decor:yellow_planks", S("Yellow Planks"), "#EBD800", "yellow", "unicolor_yellow=1")
mcl_decor.register_dyed_planks("mcl_decor:green_planks", S("Green Planks"), "#086400", "dark_green", "unicolor_dark_green=1")
mcl_decor.register_dyed_planks("mcl_decor:cyan_planks", S("Cyan Planks"), "#00C4B4", "cyan", "unicolor_cyan=1")
mcl_decor.register_dyed_planks("mcl_decor:blue_planks", S("Blue Planks"), "#0B1E80", "blue", "unicolor_blue=1")
mcl_decor.register_dyed_planks("mcl_decor:magenta_planks", S("Magenta Planks"), "#954395", "magenta", "unicolor_red_violet=1")
mcl_decor.register_dyed_planks("mcl_decor:orange_planks", S("Orange Planks"), "#E68200", "orange", "unicolor_orange=1")
mcl_decor.register_dyed_planks("mcl_decor:purple_planks", S("Purple Planks"), "#461A6D", "violet", "unicolor_violet=1")
mcl_decor.register_dyed_planks("mcl_decor:brown_planks", S("Brown Planks"), "#432209", "brown", "unicolor_dark_orange=1")
mcl_decor.register_dyed_planks("mcl_decor:pink_planks", S("Pink Planks"), "#ED9BB4", "pink", "unicolor_light_red=1")
mcl_decor.register_dyed_planks("mcl_decor:lime_planks", S("Lime Planks"), "#B3DF86", "green", "unicolor_green=1")
mcl_decor.register_dyed_planks("mcl_decor:light_blue_planks", S("Light Blue Planks"), "#72A4D4", "lightblue", "unicolor_light_blue=1")

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B