parent
9b198bffb0
commit
014d1dcfd8
69
api.lua
69
api.lua
|
@ -149,20 +149,83 @@ function mcl_decor.register_table(name, desc, material, tiles)
|
|||
})
|
||||
end
|
||||
|
||||
function mcl_decor.register_dyed_planks(name, desc, hexcolor, dye, color_group)
|
||||
function mcl_decor.register_armchair(name, desc, material, tiles, dye, colorgroup)
|
||||
minetest.register_node(name, {
|
||||
description = desc,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.4375, -0.5, -0.5, 0.4375, -0.0625, 0.1875},
|
||||
{-0.5, -0.4375, -0.5, -0.3125, 0.125, 0.1875},
|
||||
{0.3125, -0.4375, -0.5, 0.5, 0.125, 0.1875},
|
||||
{-0.5, -0.5, 0.1875, 0.5, 0.5, 0.5},
|
||||
{-0.5, -0.5, -0.4375, 0.5, -0.4375, 0.5},
|
||||
}
|
||||
},
|
||||
tiles = {tiles},
|
||||
is_ground_content = false,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
stack_max = 64,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 },
|
||||
},
|
||||
groups = {handy=1, shearsy_wool=1, attached_node=1, deco_block=1, armchair=1, flammable=1, fire_encouragement=30, fire_flammability=60, [colorgroup]=1},
|
||||
_mcl_hardness = 1,
|
||||
_mcl_blast_resistance = 1,
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
on_rightclick = mcl_decor.sit
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = name,
|
||||
recipe = {
|
||||
{"", "", material},
|
||||
{material, material, material},
|
||||
{"mcl_core:stick", "mcl_core:stick", "mcl_core:stick"}
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = name,
|
||||
recipe = {
|
||||
{material, "", ""},
|
||||
{material, material, material},
|
||||
{"mcl_core:stick", "mcl_core:stick", "mcl_core:stick"}
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = name,
|
||||
recipe = {"group:armchair", "mcl_dye:" .. dye},
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = name,
|
||||
burntime = 10,
|
||||
})
|
||||
end
|
||||
|
||||
function mcl_decor.register_dyed_planks(name, desc, hexcolor, dye, colorgroup)
|
||||
minetest.register_node("mcl_decor:"..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},
|
||||
groups = {handy=1, axey=1, flammable=3, wood=1, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=20, [colorgroup]=1},
|
||||
sounds = mcl_sounds.node_sound_wood_defaults(),
|
||||
_mcl_blast_resistance = 3,
|
||||
_mcl_hardness = 2,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = name,
|
||||
output = "mcl_decor:"..name,
|
||||
recipe = {"group:wood", "mcl_dye:" .. dye}
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "mcl_decor:"..name,
|
||||
burntime = 12,
|
||||
})
|
||||
mcl_stairs.register_stair_and_slab_simple(name, "mcl_decor:"..name, desc..S(" Stair"), desc..S(" Slab"), S("Double")..desc..S(" Slab"))
|
||||
end
|
||||
|
|
|
@ -31,3 +31,22 @@ Brown Planks=Коричневые доски
|
|||
Pink Planks=Розовые доски
|
||||
Lime Planks=Зелёные лаймовые доски
|
||||
Light Blue Planks=Светло-голубые доски
|
||||
White Armchair=Белое кресло
|
||||
Grey Armchair=Серое кресло
|
||||
Light Grey Armchair=Светло-серое кресло
|
||||
Black Armchair=Чёрное кресло
|
||||
Red Armchair=Красное кресло
|
||||
Yellow Armchair=Жёлтое кресло
|
||||
Green Armchair=Зелёное кресло
|
||||
Cyan Armchair=Голубое кресло
|
||||
Blue Armchair=Синее кресло
|
||||
Magenta Armchair=Фиолетовое кресло
|
||||
Orange Armchair=Оранжевое кресло
|
||||
Purple Armchair=Пурпурное кресло
|
||||
Brown Armchair=Коричневое кресло
|
||||
Pink Armchair=Розовое кресло
|
||||
Lime Armchair=Зелёное лаймовое кресло
|
||||
Light Blue Armchair=Светло-голубое кресло
|
||||
Stair= Ступенька
|
||||
Slab= Плита
|
||||
Double=Двойная
|
||||
|
|
|
@ -31,3 +31,22 @@ Brown Planks=
|
|||
Pink Planks=
|
||||
Lime Planks=
|
||||
Light Blue Planks=
|
||||
White Armchair=
|
||||
Grey Armchair=
|
||||
Light Grey Armchair=
|
||||
Black Armchair=
|
||||
Red Armchair=
|
||||
Yellow Armchair=
|
||||
Green Armchair=
|
||||
Cyan Armchair=
|
||||
Blue Armchair=
|
||||
Magenta Armchair=
|
||||
Orange Armchair=
|
||||
Purple Armchair=
|
||||
Brown Armchair=
|
||||
Pink Armchair=
|
||||
Lime Armchair=
|
||||
Light Blue Armchair=
|
||||
Stair=
|
||||
Slab=
|
||||
Double=
|
||||
|
|
2
mod.conf
2
mod.conf
|
@ -1,4 +1,4 @@
|
|||
name = mcl_decor
|
||||
title = MineClone2 Furniture and decorations
|
||||
description = Adds more decoration and furniture blocks to MineClone 2 (5)
|
||||
depends = mcl_core, mcl_player, mcl_sounds, mcl_dye, mcl_nether
|
||||
depends = mcl_core, mcl_player, mcl_sounds, mcl_dye, mcl_nether, mcl_stairs
|
||||
|
|
53
register.lua
53
register.lua
|
@ -26,6 +26,7 @@ minetest.register_craft({
|
|||
{"mcl_core:coal_lump", "mcl_nether:quartz"}
|
||||
}
|
||||
})
|
||||
mcl_stairs.register_stair_and_slab_simple("coalquartz_tile", "mcl_decor:coalquartz_tile", S("Coalquartz Tile Stair"), S("Coalquartz Tile Slab"), S("Double Coal Quartz Slab"))
|
||||
|
||||
--- Gravel Path ---
|
||||
minetest.register_node("mcl_decor:gravel_path", {
|
||||
|
@ -121,20 +122,40 @@ mcl_decor.register_table("mcl_decor:birch_table", S("Birch Table"), "mcl_core:bi
|
|||
|
||||
|
||||
|
||||
--- Armchairs ---
|
||||
mcl_decor.register_armchair("mcl_decor:white_armchair", S("White Armchair"), "mcl_wool:white", "wool_white.png", "white", "unicolor_white")
|
||||
mcl_decor.register_armchair("mcl_decor:grey_armchair", S("Grey Armchair"), "mcl_wool:grey", "wool_dark_grey.png", "dark_grey", "unicolor_darkgrey")
|
||||
mcl_decor.register_armchair("mcl_decor:silver_armchair", S("Light Grey Armchair"), "mcl_wool:silver", "wool_grey.png", "grey", "unicolor_grey")
|
||||
mcl_decor.register_armchair("mcl_decor:black_armchair", S("Black Armchair"), "mcl_wool:black", "wool_black.png", "black", "unicolor_black")
|
||||
mcl_decor.register_armchair("mcl_decor:red_armchair", S("Red Armchair"), "mcl_wool:red", "wool_red.png", "red", "unicolor_red")
|
||||
mcl_decor.register_armchair("mcl_decor:yellow_armchair", S("Yellow Armchair"), "mcl_wool:yellow", "wool_yellow.png", "yellow", "unicolor_yellow")
|
||||
mcl_decor.register_armchair("mcl_decor:green_armchair", S("Green Armchair"), "mcl_wool:green", "wool_dark_green.png", "dark_green", "unicolor_dark_green")
|
||||
mcl_decor.register_armchair("mcl_decor:cyan_armchair", S("Cyan Armchair"), "mcl_wool:cyan", "wool_cyan.png", "cyan", "unicolor_cyan")
|
||||
mcl_decor.register_armchair("mcl_decor:blue_armchair", S("Blue Armchair"), "mcl_wool:blue", "wool_blue.png", "blue", "unicolor_blue")
|
||||
mcl_decor.register_armchair("mcl_decor:magenta_armchair", S("Magenta Armchair"), "mcl_wool:magenta", "wool_magenta.png", "magenta", "unicolor_red_violet")
|
||||
mcl_decor.register_armchair("mcl_decor:orange_armchair", S("Orange Armchair"), "mcl_wool:orange", "wool_orange.png", "orange", "unicolor_orange")
|
||||
mcl_decor.register_armchair("mcl_decor:purple_armchair", S("Purple Armchair"), "mcl_wool:purple", "wool_violet.png", "violet", "unicolor_violet")
|
||||
mcl_decor.register_armchair("mcl_decor:brown_armchair", S("Brown Armchair"), "mcl_wool:brown", "wool_brown.png", "brown", "unicolor_dark_orange")
|
||||
mcl_decor.register_armchair("mcl_decor:pink_armchair", S("Pink Armchair"), "mcl_wool:pink", "wool_pink.png", "pink", "unicolor_light_red")
|
||||
mcl_decor.register_armchair("mcl_decor:lime_armchair", S("Lime Armchair"), "mcl_wool:lime", "mcl_wool_lime.png", "green", "unicolor_green")
|
||||
mcl_decor.register_armchair("mcl_decor:light_blue_armchair", S("Light Blue Armchair"), "mcl_wool:light_blue", "mcl_wool_light_blue.png", "lightblue", "unicolor_light_blue")
|
||||
|
||||
|
||||
|
||||
--- 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")
|
||||
mcl_decor.register_dyed_planks("white_planks", S("White Planks"), "#EDEDED", "white", "unicolor_white")
|
||||
mcl_decor.register_dyed_planks("grey_planks", S("Grey Planks"), "#5F5F5F", "dark_grey", "unicolor_darkgrey")
|
||||
mcl_decor.register_dyed_planks("silver_planks", S("Light Grey Planks"), "#8C8C8C", "grey", "unicolor_grey")
|
||||
mcl_decor.register_dyed_planks("black_planks", S("Black Planks"), "#030303", "black", "unicolor_black")
|
||||
mcl_decor.register_dyed_planks("red_planks", S("Red Planks"), "#BD0000", "red", "unicolor_red")
|
||||
mcl_decor.register_dyed_planks("yellow_planks", S("Yellow Planks"), "#EBD800", "yellow", "unicolor_yellow")
|
||||
mcl_decor.register_dyed_planks("green_planks", S("Green Planks"), "#086400", "dark_green", "unicolor_dark_green")
|
||||
mcl_decor.register_dyed_planks("cyan_planks", S("Cyan Planks"), "#00C4B4", "cyan", "unicolor_cyan")
|
||||
mcl_decor.register_dyed_planks("blue_planks", S("Blue Planks"), "#0B1E80", "blue", "unicolor_blue")
|
||||
mcl_decor.register_dyed_planks("magenta_planks", S("Magenta Planks"), "#954395", "magenta", "unicolor_red_violet")
|
||||
mcl_decor.register_dyed_planks("orange_planks", S("Orange Planks"), "#E68200", "orange", "unicolor_orange")
|
||||
mcl_decor.register_dyed_planks("purple_planks", S("Purple Planks"), "#461A6D", "violet", "unicolor_violet")
|
||||
mcl_decor.register_dyed_planks("brown_planks", S("Brown Planks"), "#432209", "brown", "unicolor_dark_orange")
|
||||
mcl_decor.register_dyed_planks("pink_planks", S("Pink Planks"), "#ED9BB4", "pink", "unicolor_light_red")
|
||||
mcl_decor.register_dyed_planks("lime_planks", S("Lime Planks"), "#B3DF86", "green", "unicolor_green")
|
||||
mcl_decor.register_dyed_planks("light_blue_planks", S("Light Blue Planks"), "#72A4D4", "lightblue", "unicolor_light_blue")
|
||||
|
|
Reference in New Issue