forked from rudzik8/mcl_decor
Combine chairs and tables registration function
and add optional depend for mcl_cozy... and something i forgor
This commit is contained in:
parent
f4699123d8
commit
494d13d3a6
12
api.lua
12
api.lua
|
@ -52,7 +52,8 @@ end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function mcl_decor.register_chair(name, desc, material, tiles)
|
function mcl_decor.register_chair_and_table(name, desc, name2, desc2, material, tiles)
|
||||||
|
-- chair part
|
||||||
minetest.register_node(name, {
|
minetest.register_node(name, {
|
||||||
description = desc,
|
description = desc,
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
|
@ -104,11 +105,10 @@ function mcl_decor.register_chair(name, desc, material, tiles)
|
||||||
recipe = name,
|
recipe = name,
|
||||||
burntime = 8,
|
burntime = 8,
|
||||||
})
|
})
|
||||||
end
|
|
||||||
|
-- table part
|
||||||
function mcl_decor.register_table(name, desc, material, tiles)
|
minetest.register_node(name2, {
|
||||||
minetest.register_node(name, {
|
description = desc2,
|
||||||
description = desc,
|
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
|
3
mod.conf
3
mod.conf
|
@ -1,4 +1,5 @@
|
||||||
name = mcl_decor
|
name = mcl_decor
|
||||||
title = MineClone2 Furniture and decorations
|
title = MineClone2 Furniture and decorations
|
||||||
description = Adds more decoration and furniture blocks to MineClone 2 (5)
|
description = Adds more decoration and furniture blocks to MineClone 2 (5)
|
||||||
depends = mcl_core, mcl_player, mcl_sounds, mcl_dye, mcl_nether, mcl_stairs
|
depends = mcl_core, mcl_torches, mcl_player, mcl_sounds, mcl_dye, mcl_nether, mcl_stairs
|
||||||
|
optional_depends = mcl_cozy
|
||||||
|
|
20
register.lua
20
register.lua
|
@ -140,20 +140,14 @@ minetest.register_craft({
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
--- Tables and Chairs ---
|
|
||||||
mcl_decor.register_chair("mcl_decor:wooden_chair", S("Oak Chair"), "mcl_core:wood", "default_wood.png")
|
|
||||||
mcl_decor.register_chair("mcl_decor:dark_oak_chair", S("Dark Oak Chair"), "mcl_core:darkwood", "mcl_core_planks_big_oak.png")
|
|
||||||
mcl_decor.register_chair("mcl_decor:jungle_chair", S("Jungle Chair"), "mcl_core:junglewood", "default_junglewood.png")
|
|
||||||
mcl_decor.register_chair("mcl_decor:spruce_chair", S("Spruce Chair"), "mcl_core:sprucewood", "mcl_core_planks_spruce.png")
|
|
||||||
mcl_decor.register_chair("mcl_decor:acacia_chair", S("Acacia Chair"), "mcl_core:acaciawood", "default_acacia_wood.png")
|
|
||||||
mcl_decor.register_chair("mcl_decor:birch_chair", S("Birch Chair"), "mcl_core:birchwood", "mcl_core_planks_birch.png")
|
|
||||||
|
|
||||||
mcl_decor.register_table("mcl_decor:wooden_table", S("Oak Table"), "mcl_core:wood", "default_wood.png")
|
--- Tables and Chairs ---
|
||||||
mcl_decor.register_table("mcl_decor:dark_oak_table", S("Dark Oak Table"), "mcl_core:darkwood", "mcl_core_planks_big_oak.png")
|
mcl_decor.register_chair_and_table("mcl_decor:wooden_chair", S("Oak Chair"), "mcl_decor:wooden_table", S("Oak Table"), "mcl_core:wood", "default_wood.png")
|
||||||
mcl_decor.register_table("mcl_decor:jungle_table", S("Jungle Table"), "mcl_core:junglewood", "default_junglewood.png")
|
mcl_decor.register_chair_and_table("mcl_decor:dark_oak_chair", S("Dark Oak Chair"), "mcl_decor:dark_oak_table", S("Dark Oak Table"), "mcl_core:darkwood", "mcl_core_planks_big_oak.png")
|
||||||
mcl_decor.register_table("mcl_decor:spruce_table", S("Spruce Table"), "mcl_core:sprucewood", "default_wood.png")
|
mcl_decor.register_chair_and_table("mcl_decor:jungle_chair", S("Jungle Chair"), "mcl_decor:jungle_table", S("Jungle Table"), "mcl_core:junglewood", "default_junglewood.png")
|
||||||
mcl_decor.register_table("mcl_decor:acacia_table", S("Acacia Table"), "mcl_core:acaciawood", "default_acacia_wood.png")
|
mcl_decor.register_chair_and_table("mcl_decor:spruce_chair", S("Spruce Chair"), "mcl_decor:spruce_table", S("Spruce Table"), "mcl_core:sprucewood", "mcl_core_planks_spruce.png")
|
||||||
mcl_decor.register_table("mcl_decor:birch_table", S("Birch Table"), "mcl_core:birchwood", "mcl_core_planks_birch.png")
|
mcl_decor.register_chair_and_table("mcl_decor:acacia_chair", S("Acacia Chair"), "mcl_decor:acacia_table", S("Acacia Table"), "mcl_core:acaciawood", "default_acacia_wood.png")
|
||||||
|
mcl_decor.register_chair_and_table("mcl_decor:birch_chair", S("Birch Chair"), "mcl_decor:birch_table", S("Birch Table"), "mcl_core:birchwood", "mcl_core_planks_birch.png")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue