Require stair/slab descriptions to be specified
Generating descriptions automatically will limit the options for creating good translations.
This commit is contained in:
parent
b565ab379c
commit
3b5b7aa17c
@ -198,14 +198,20 @@ end
|
||||
--slabs/stairs
|
||||
mcl_stairs.register_stair_and_slab("blackstone", {
|
||||
baseitem = "mcl_blackstone:blackstone",
|
||||
description_stair = S("Blackstone Stairs"),
|
||||
description_slab = S("Blackstone Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_blackstone:blackstone"}}, {_mcl_stonecutter_recipes = {"mcl_blackstone:blackstone"}}
|
||||
})
|
||||
mcl_stairs.register_stair_and_slab("blackstone_polished", {
|
||||
baseitem = "mcl_blackstone:blackstone_polished",
|
||||
description_stair = S("Polished Blackstone Stairs"),
|
||||
description_slab = S("Polished Blackstone Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_blackstone:blackstone", "mcl_blackstone:blackstone_polished"}}, {_mcl_stonecutter_recipes = {"mcl_blackstone:blackstone", "mcl_blackstone:blackstone_polished"}}
|
||||
})
|
||||
mcl_stairs.register_stair_and_slab("blackstone_brick_polished", {
|
||||
baseitem = "mcl_blackstone:blackstone_brick_polished",
|
||||
description_stair = S("Blackstone Brick Stairs"),
|
||||
description_slab = S("Blackstone Brick Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_blackstone:blackstone", "mcl_blackstone:blackstone_polished"}}, {_mcl_stonecutter_recipes = {"mcl_blackstone:blackstone", "mcl_blackstone:blackstone_polished"}}
|
||||
})
|
||||
minetest.register_alias("mcl_stairs:slab_blackstone_chiseled_polished_top", "mcl_stairs:slab_blackstone_polished_top")
|
||||
|
@ -135,20 +135,28 @@ minetest.register_node("mcl_copper:block_oxidized_cut", {
|
||||
|
||||
mcl_stairs.register_stair_and_slab("copper_cut", {
|
||||
baseitem = "mcl_copper:block_cut",
|
||||
description_stair = "Cut Copper Stairs",
|
||||
description_slab = "Cut Copper Slab",
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_copper:block", "mcl_copper:block_cut"}}
|
||||
})
|
||||
|
||||
mcl_stairs.register_stair_and_slab("copper_exposed_cut", {
|
||||
baseitem = "mcl_copper:block_exposed_cut",
|
||||
description_stair = "Exposed Cut Copper Stairs",
|
||||
description_slab = "Exposed Cut Copper Slab",
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_copper:block_exposed", "mcl_copper:block_exposed_cut"}, _on_lightning_strike = on_lightning_strike}
|
||||
})
|
||||
|
||||
mcl_stairs.register_stair_and_slab("copper_weathered_cut", {
|
||||
baseitem = "mcl_copper:block_weathered_cut",
|
||||
description_stair = "Weathered Cut Copper Stairs",
|
||||
description_slab = "Weathered Cut Copper Slab",
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_copper:block_weathered", "mcl_copper:block_weathered_cut"}, _on_lightning_strike = on_lightning_strike}
|
||||
})
|
||||
|
||||
mcl_stairs.register_stair_and_slab("copper_oxidized_cut", {
|
||||
baseitem = "mcl_copper:block_oxidized_cut",
|
||||
description_stair = "Oxidized Cut Copper Stairs",
|
||||
description_slab = "Oxidized Cut Copper Slab",
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_copper:block_oxidized", "mcl_copper:block_oxidized_cut"}, _on_lightning_strike = on_lightning_strike}
|
||||
})
|
||||
|
@ -2,107 +2,142 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
||||
|
||||
mcl_stairs.register_stair_and_slab("stone_rough", {
|
||||
baseitem = "mcl_core:stone",
|
||||
description_stair = S("Stone Stairs"),
|
||||
description_slab = S("Stone Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:stone"}},
|
||||
})
|
||||
|
||||
mcl_stairs.register_slab("stone", {
|
||||
baseitem = "mcl_core:stone_smooth",
|
||||
description = S("Smooth Stone Slab"),
|
||||
tiles = {"mcl_stairs_stone_slab_top.png", "mcl_stairs_stone_slab_top.png", "mcl_stairs_stone_slab_side.png"},
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:stone_smooth"}},
|
||||
})
|
||||
|
||||
mcl_stairs.register_stair_and_slab("andesite", {
|
||||
baseitem = "mcl_core:andesite",
|
||||
description_stair = S("Andesite Stairs"),
|
||||
description_slab = S("Andesite Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:andesite"}},
|
||||
})
|
||||
mcl_stairs.register_stair_and_slab("granite", {
|
||||
baseitem = "mcl_core:granite",
|
||||
description_stair = S("Granite Stairs"),
|
||||
description_slab = S("Granite Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:granite"}},
|
||||
})
|
||||
mcl_stairs.register_stair_and_slab("diorite", {
|
||||
baseitem = "mcl_core:diorite",
|
||||
description_stair = S("Diorite Stairs"),
|
||||
description_slab = S("Diorite Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:diorite"}},
|
||||
})
|
||||
|
||||
mcl_stairs.register_stair_and_slab("cobble", {
|
||||
baseitem = "mcl_core:cobble",
|
||||
description_stair = S("Cobblestone Stairs"),
|
||||
description_slab = S("Cobblestone Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:cobble"}},
|
||||
})
|
||||
mcl_stairs.register_stair_and_slab("mossycobble", {
|
||||
baseitem = "mcl_core:mossycobble",
|
||||
description_stair = S("Mossy Cobblestone Stairs"),
|
||||
description_slab = S("Mossy Cobblestone Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:mossycobble"}},
|
||||
})
|
||||
|
||||
mcl_stairs.register_stair_and_slab("brick_block", {
|
||||
baseitem = "mcl_core:brick_block",
|
||||
description_stair = S("Brick Stairs"),
|
||||
description_slab = S("Brick Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:brick_block"}},
|
||||
})
|
||||
|
||||
|
||||
mcl_stairs.register_stair_and_slab("sandstone", {
|
||||
baseitem = "mcl_core:sandstone",
|
||||
description_stair = S("Sandstone Stairs"),
|
||||
description_slab = S("Sandstone Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:sandstone"}},
|
||||
})
|
||||
mcl_stairs.register_stair_and_slab("sandstonesmooth2", {
|
||||
baseitem = "mcl_core:sandstonesmooth2",
|
||||
description_stair = S("Smooth Sandstone Stairs"),
|
||||
description_slab = S("Smooth Sandstone Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:sandstone"}},
|
||||
})
|
||||
mcl_stairs.register_stair_and_slab("sandstonesmooth", {
|
||||
baseitem = "mcl_core:sandstonesmooth",
|
||||
description_stair = S("Cut Sandstone Stairs"),
|
||||
description_slab = S("Cut Sandstone Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:sandstone", "mcl_core:sandstonesmooth2"}},
|
||||
})
|
||||
|
||||
mcl_stairs.register_stair_and_slab("redsandstone", {
|
||||
baseitem = "mcl_core:redsandstone",
|
||||
description_stair = S("Red Sandstone Stairs"),
|
||||
description_slab = S("Red Sandstone Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:redsandstone"}},
|
||||
})
|
||||
mcl_stairs.register_stair_and_slab("redsandstonesmooth2", {
|
||||
baseitem = "mcl_core:redsandstonesmooth2",
|
||||
description_stair = S("Smooth Red Sandstone Stairs"),
|
||||
description_slab = S("Smooth Red Sandstone Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:redsandstone"}},
|
||||
})
|
||||
mcl_stairs.register_stair_and_slab("redsandstonesmooth", {
|
||||
baseitem = "mcl_core:redsandstonesmooth",
|
||||
description_stair = S("Cut Red Sandstone Stairs"),
|
||||
description_slab = S("Cut Red Sandstone Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:redsandstone", "mcl_core:redsandstonesmooth2"}},
|
||||
})
|
||||
|
||||
mcl_stairs.register_stair_and_slab("stonebrick", {
|
||||
baseitem = "mcl_core:stonebrick",
|
||||
base_description = S("Stone Brick"),
|
||||
description_stair = S("Stone Brick Stairs"),
|
||||
description_slab = S("Stone Brick Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:stone", "mcl_core:stonebrick"}},
|
||||
})
|
||||
|
||||
mcl_stairs.register_stair("andesite_smooth", {
|
||||
baseitem = "mcl_core:andesite_smooth",
|
||||
description = S("Polished Andesite Stairs"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:andesite_smooth", "mcl_core:andesite"}},
|
||||
})
|
||||
mcl_stairs.register_slab("andesite_smooth", {
|
||||
baseitem = "mcl_core:andesite_smooth",
|
||||
tiles={"mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_stairs_andesite_smooth_slab.png"},
|
||||
description = S("Polished Andesite Slab"),
|
||||
tiles = {"mcl_core_andesite_smooth.png", "mcl_core_andesite_smooth.png", "mcl_stairs_andesite_smooth_slab.png"},
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:andesite_smooth", "mcl_core:andesite"}},
|
||||
})
|
||||
|
||||
mcl_stairs.register_stair("granite_smooth", {
|
||||
baseitem = "mcl_core:granite_smooth",
|
||||
description = S("Polished Granite Stairs"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:granite_smooth", "mcl_core:granite"}},
|
||||
})
|
||||
mcl_stairs.register_slab("granite_smooth", {
|
||||
baseitem = "mcl_core:granite_smooth",
|
||||
tiles={"mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_stairs_granite_smooth_slab.png"},
|
||||
description = S("Polished Granite Slab"),
|
||||
tiles = {"mcl_core_granite_smooth.png", "mcl_core_granite_smooth.png", "mcl_stairs_granite_smooth_slab.png"},
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:granite_smooth", "mcl_core:granite"}},
|
||||
})
|
||||
|
||||
mcl_stairs.register_stair("diorite_smooth", {
|
||||
baseitem = "mcl_core:diorite_smooth",
|
||||
description = S("Polished Diorite Stairs"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:diorite_smooth", "mcl_core:diorite"}},
|
||||
})
|
||||
mcl_stairs.register_slab("diorite_smooth", {
|
||||
baseitem = "mcl_core:diorite_smooth",
|
||||
tiles={"mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_stairs_diorite_smooth_slab.png"},
|
||||
description = S("Polished Diorite Slab"),
|
||||
tiles = {"mcl_core_diorite_smooth.png", "mcl_core_diorite_smooth.png", "mcl_stairs_diorite_smooth_slab.png"},
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:diorite_smooth", "mcl_core:diorite"}},
|
||||
})
|
||||
|
||||
mcl_stairs.register_stair("stonebrickmossy", {
|
||||
mcl_stairs.register_stair_and_slab("stonebrickmossy", {
|
||||
baseitem = "mcl_core:stonebrickmossy",
|
||||
base_description = S("Mossy Stone Brick"),
|
||||
description_stair = S("Mossy Stone Brick Stairs"),
|
||||
description_slab = S("Mossy Stone Brick Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:stonebrickmossy"}},
|
||||
})
|
||||
|
@ -139,11 +139,18 @@ local function register_deepslate_variant(name, defs)
|
||||
tiles = { "mcl_deepslate_"..name.."_cracked.png" },
|
||||
}, defs.cracked))
|
||||
end
|
||||
if defs.stair_and_slab then
|
||||
if defs.stair then
|
||||
mcl_stairs.register_stair("deepslate_"..name, {
|
||||
base_description = defs.stair_and_slab.base_description,
|
||||
description = defs.stair.description,
|
||||
baseitem = main_itemstring,
|
||||
overrides = defs.stairs
|
||||
overrides = defs.stair
|
||||
})
|
||||
end
|
||||
if defs.slab then
|
||||
mcl_stairs.register_slab("deepslate_"..name, {
|
||||
description = defs.slab.description,
|
||||
baseitem = main_itemstring,
|
||||
overrides = defs.slab
|
||||
})
|
||||
end
|
||||
|
||||
@ -158,7 +165,12 @@ register_deepslate_variant("cobbled", {
|
||||
_doc_items_longdesc = S("Cobbled deepslate is a stone variant that functions similar to cobblestone or blackstone."),
|
||||
groups = { cobble = 1, stonecuttable = 1 },
|
||||
},
|
||||
stair_and_slab = {
|
||||
stair = {
|
||||
description = S("Cobbled Deepslate Stairs"),
|
||||
_mcl_stonecutter_recipes = { "mcl_deepslate:deepslate_cobbled", },
|
||||
},
|
||||
slab = {
|
||||
description = S("Cobbled Deepslate Slab"),
|
||||
_mcl_stonecutter_recipes = { "mcl_deepslate:deepslate_cobbled", },
|
||||
},
|
||||
wall = {
|
||||
@ -174,7 +186,12 @@ register_deepslate_variant("polished", {
|
||||
groups = { stonecuttable = 1 },
|
||||
_mcl_stonecutter_recipes = { "mcl_deepslate:deepslate_cobbled", },
|
||||
},
|
||||
stair_and_slab = {
|
||||
stair = {
|
||||
description = S("Polished Deepslate Stairs"),
|
||||
_mcl_stonecutter_recipes = { "mcl_deepslate:deepslate_cobbled", "mcl_deepslate:deepslate_polished", },
|
||||
},
|
||||
slab = {
|
||||
description = S("Polished Deepslate Slab"),
|
||||
_mcl_stonecutter_recipes = { "mcl_deepslate:deepslate_cobbled", "mcl_deepslate:deepslate_polished", },
|
||||
},
|
||||
wall = {
|
||||
@ -190,8 +207,12 @@ register_deepslate_variant("bricks", {
|
||||
groups = { stonecuttable = 1 },
|
||||
_mcl_stonecutter_recipes = { "mcl_deepslate:deepslate_cobbled", "mcl_deepslate:deepslate_polished", "mcl_deepslate:deepslate_bricks", },
|
||||
},
|
||||
stair_and_slab = {
|
||||
base_description = S("Deepslate Brick"),
|
||||
stair = {
|
||||
description = S("Deepslate Brick Stairs"),
|
||||
_mcl_stonecutter_recipes = { "mcl_deepslate:deepslate_cobbled", "mcl_deepslate:deepslate_polished", "mcl_deepslate:deepslate_bricks", },
|
||||
},
|
||||
slab = {
|
||||
description = S("Deepslate Brick Slab"),
|
||||
_mcl_stonecutter_recipes = { "mcl_deepslate:deepslate_cobbled", "mcl_deepslate:deepslate_polished", "mcl_deepslate:deepslate_bricks", },
|
||||
},
|
||||
wall = {
|
||||
@ -210,8 +231,12 @@ register_deepslate_variant("tiles", {
|
||||
groups = { stonecuttable = 1 },
|
||||
_mcl_stonecutter_recipes = { "mcl_deepslate:deepslate_cobbled", "mcl_deepslate:deepslate_polished", "mcl_deepslate:deepslate_bricks", },
|
||||
},
|
||||
stair_and_slab = {
|
||||
base_description = S("Deepslate Tile"),
|
||||
stair = {
|
||||
description = S("Deepslate Tile Stairs"),
|
||||
_mcl_stonecutter_recipes = { "mcl_deepslate:deepslate_cobbled", "mcl_deepslate:deepslate_polished", "mcl_deepslate:deepslate_bricks", "mcl_deepslate:deepslate_tiles", },
|
||||
},
|
||||
slab = {
|
||||
description = S("Deepslate Tile Slab"),
|
||||
_mcl_stonecutter_recipes = { "mcl_deepslate:deepslate_cobbled", "mcl_deepslate:deepslate_polished", "mcl_deepslate:deepslate_bricks", "mcl_deepslate:deepslate_tiles", },
|
||||
},
|
||||
wall = {
|
||||
|
@ -183,13 +183,15 @@ minetest.register_node("mcl_end:dragon_egg", {
|
||||
|
||||
mcl_stairs.register_stair_and_slab("end_bricks", {
|
||||
baseitem = "mcl_end:end_bricks",
|
||||
base_description = S("End Stone Brick"),
|
||||
description_stair = S("End Stone Brick Stairs"),
|
||||
description_slab = S("End Stone Brick Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_end:end_bricks","mcl_end:end_stone"}},{_mcl_stonecutter_recipes = {"mcl_end:end_bricks","mcl_end:end_stone"}}
|
||||
})
|
||||
|
||||
mcl_stairs.register_stair_and_slab("purpur_block", {
|
||||
baseitem = "mcl_end:purpur_block",
|
||||
base_description = S("Purpur"),
|
||||
description_stair = S("Purpur Stairs"),
|
||||
description_slab = S("Purpur Slab"),
|
||||
recipeitem = "group:purpur_block",
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_end:purpur_block"}}
|
||||
})
|
||||
|
@ -47,7 +47,8 @@ minetest.register_node("mcl_mud:mud_bricks", {
|
||||
|
||||
mcl_stairs.register_stair_and_slab("mud_brick", {
|
||||
baseitem = "mcl_mud:mud_bricks",
|
||||
base_description = S("Mud Brick"),
|
||||
description_stair = S("Mud Brick Stair"),
|
||||
description_slab = S("Mud Brick Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_mud:mud_bricks"}},{_mcl_stonecutter_recipes = {"mcl_mud:mud_bricks"}}
|
||||
})
|
||||
|
||||
|
@ -281,19 +281,22 @@ minetest.register_node("mcl_nether:quartz_smooth", {
|
||||
|
||||
mcl_stairs.register_stair_and_slab("quartzblock", {
|
||||
baseitem = "mcl_nether:quartz_block",
|
||||
base_description = S("Quartz"),
|
||||
description_stair = S("Quartz Stairs"),
|
||||
description_slab = S("Quartz Slab"),
|
||||
recipeitem = "group:quartz_block",
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_nether:quartz_block"}},
|
||||
})
|
||||
|
||||
mcl_stairs.register_stair_and_slab("nether_brick", {
|
||||
baseitem = "mcl_nether:nether_brick",
|
||||
base_description = S("Nether Brick"),
|
||||
description_stair = S("Nether Brick Stairs"),
|
||||
description_slab = S("Nether Brick Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = { "mcl_nether:nether_brick" }},{_mcl_stonecutter_recipes = { "mcl_nether:nether_brick" }},
|
||||
})
|
||||
mcl_stairs.register_stair_and_slab("red_nether_brick", {
|
||||
baseitem = "mcl_nether:red_nether_brick",
|
||||
base_description = S("Red Nether Brick"),
|
||||
description_stair = S("Red Nether Brick Stairs"),
|
||||
description_slab = S("Red Nether Brick Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = { "mcl_nether:red_nether_brick" }},{_mcl_stonecutter_recipes = { "mcl_nether:red_nether_brick" }},
|
||||
})
|
||||
|
||||
|
@ -66,15 +66,20 @@ minetest.register_node("mcl_ocean:prismarine_dark", {
|
||||
|
||||
mcl_stairs.register_stair_and_slab("prismarine", {
|
||||
baseitem = "mcl_ocean:prismarine",
|
||||
description_stair = S("Prismarine Stairs"),
|
||||
description_slab = S("Prismarine Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = { "mcl_ocean:prismarine" }},{_mcl_stonecutter_recipes = { "mcl_ocean:prismarine" }}
|
||||
})
|
||||
mcl_stairs.register_stair_and_slab("prismarine_brick", {
|
||||
baseitem = "mcl_ocean:prismarine_brick",
|
||||
base_description = S("Prismarine Brick"),
|
||||
description_stair = S("Prismarine Brick Stairs"),
|
||||
description_slab = S("Prismarine Brick Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = { "mcl_ocean:prismarine_brick" }},{_mcl_stonecutter_recipes = { "mcl_ocean:prismarine_brick" }}
|
||||
})
|
||||
mcl_stairs.register_stair_and_slab("prismarine_dark", {
|
||||
baseitem = "mcl_ocean:prismarine_dark",
|
||||
description_stair = S("Dark Prismarine Stairs"),
|
||||
description_slab = S("Dark Prismarine Slab"),
|
||||
overrides = {_mcl_stonecutter_recipes = { "mcl_ocean:prismarine_dark" }},{_mcl_stonecutter_recipes = { "mcl_ocean:prismarine_dark" }}
|
||||
})
|
||||
|
||||
|
@ -31,15 +31,18 @@ This function will register the node `mcl_stairs:stair_<subname>`. The nodes
|
||||
are only used for placed nodes will also be registered.
|
||||
|
||||
## `mcl_stairs.register_slab(subname, stair definition)`
|
||||
Same as `mcl_stairs.register_stair` but registers slab instead.
|
||||
Same as `register_stair` but registers slab instead.
|
||||
|
||||
This function will register the node `mcl_stairs:slab_<subname>`. The nodes
|
||||
`mcl_stairs:slab_<subname>_top` and `mcl_stairs:slab_<subname>_double` which
|
||||
are only used for placed nodes will also be registered.
|
||||
|
||||
## `mcl_stairs.register_stair_and_slab(subname, stair definition)`
|
||||
Shorthand for calling both `mcl_stairs.register_stair` and
|
||||
`mcl_stairs.register_slab` with the same arguments.
|
||||
Shorthand for calling `register_stair` and `register_slab` at the same time.
|
||||
|
||||
For the second argument `description_stair` get passed as `description` to
|
||||
`register_stair` and `description_slab` get passed as `description` to
|
||||
`register_slab`.
|
||||
|
||||
## Stair definition
|
||||
Used by `mcl_stairs.register_stair`, `mcl_stairs.register_slab` and
|
||||
@ -48,13 +51,10 @@ Used by `mcl_stairs.register_stair`, `mcl_stairs.register_slab` and
|
||||
```lua
|
||||
{
|
||||
baseitem = "",
|
||||
-- Node the registered stair/slab is based on.
|
||||
-- Node the stair/slab is based on.
|
||||
|
||||
base_description = "",
|
||||
-- String used for the stair/slab description. Stair and slab
|
||||
-- descriptions have the form "<base_description> Stairs" and
|
||||
-- "<base_description> Slab" respectively. Defaults to the description of
|
||||
-- the `baseitem` node if unspecified.
|
||||
description = "",
|
||||
-- Description for the stair/slab.
|
||||
|
||||
recipeitem = "",
|
||||
-- Item or group used for the crafting recipe. Defaults to `baseitem` if
|
||||
|
@ -408,13 +408,12 @@ function mcl_stairs.register_stair(subname, ...)
|
||||
if type(select(1, ...)) == "table" then
|
||||
local stairdef = select(1, ...)
|
||||
local ndef = minetest.registered_nodes[stairdef.baseitem]
|
||||
local base_description = stairdef.base_description or ndef.description
|
||||
|
||||
register_stair(subname, {
|
||||
recipeitem = stairdef.recipeitem or stairdef.baseitem,
|
||||
groups = table.merge(ndef.groups or {}, stairdef.groups or {}),
|
||||
tiles = stairdef.tiles or ndef.tiles,
|
||||
description = S("@1 Stairs", base_description),
|
||||
description = stairdef.description,
|
||||
sounds = ndef.sounds,
|
||||
blast_resistance = ndef.blast_resistance,
|
||||
hardness = ndef.hardness,
|
||||
@ -439,14 +438,13 @@ function mcl_stairs.register_slab(subname, ...)
|
||||
if type(select(1, ...)) == "table" then
|
||||
local stairdef = select(1, ...)
|
||||
local ndef = minetest.registered_nodes[stairdef.baseitem]
|
||||
local base_description = stairdef.base_description or ndef.description
|
||||
|
||||
register_slab(subname, {
|
||||
recipeitem = stairdef.recipeitem or stairdef.baseitem,
|
||||
groups = table.merge(ndef.groups or {}, stairdef.groups or {}),
|
||||
tiles = stairdef.tiles or ndef.tiles,
|
||||
description = S("@1 Slab", base_description),
|
||||
double_description = S("Double @1 Slab", base_description),
|
||||
description = stairdef.description,
|
||||
double_description = S("Double @1", stairdef.description),
|
||||
sounds = ndef.sounds,
|
||||
blast_resistance = ndef.blast_resistance,
|
||||
hardness = ndef.hardness,
|
||||
@ -454,48 +452,48 @@ function mcl_stairs.register_slab(subname, ...)
|
||||
})
|
||||
else
|
||||
register_slab(subname, {
|
||||
recipeitem=select(1, ...),
|
||||
groups=select(2, ...),
|
||||
tiles=select(3, ...),
|
||||
description=select(4, ...),
|
||||
sounds=select(5, ...),
|
||||
blast_resistance=select(6, ...),
|
||||
hardness=select(7, ...),
|
||||
double_description=select(8, ...),
|
||||
overrides=select(9, ...),
|
||||
recipeitem = select(1, ...),
|
||||
groups = select(2, ...),
|
||||
tiles = select(3, ...),
|
||||
description = select(4, ...),
|
||||
sounds = select(5, ...),
|
||||
blast_resistance = select(6, ...),
|
||||
hardness = select(7, ...),
|
||||
double_description = select(8, ...),
|
||||
overrides = select(9, ...),
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- Stair/slab registration function.
|
||||
function mcl_stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab, sounds, blast_resistance, hardness,
|
||||
double_description, corner_stair_texture_override)
|
||||
if type(recipeitem) == "table" then
|
||||
mcl_stairs.register_stair(subname, recipeitem)
|
||||
mcl_stairs.register_slab(subname, recipeitem)
|
||||
function mcl_stairs.register_stair_and_slab(subname, ...)
|
||||
if type(select(1, ...)) == "table" then
|
||||
local stairdef = select(1, ...)
|
||||
mcl_stairs.register_stair(subname, table.merge(stairdef, { description = stairdef.description_stair }))
|
||||
mcl_stairs.register_slab(subname, table.merge(stairdef, { description = stairdef.description_slab }))
|
||||
return
|
||||
end
|
||||
|
||||
register_stair(subname, {
|
||||
recipeitem = recipeitem,
|
||||
groups = groups,
|
||||
images = images,
|
||||
description = desc_stair,
|
||||
sounds = sounds,
|
||||
blast_resistance = blast_resistance,
|
||||
hardness = hardness,
|
||||
corner_stair_texture_override = corner_stair_texture_override
|
||||
recipeitem = select(1, ...),
|
||||
groups = select(2, ...),
|
||||
tiles = select(3, ...),
|
||||
description = select(4, ...),
|
||||
sounds = select(6, ...),
|
||||
blast_resistance = select(7, ...),
|
||||
hardness = select(8, ...),
|
||||
corner_stair_texture_override = select(10, ...),
|
||||
})
|
||||
register_slab(subname, {
|
||||
recipeitem = recipeitem,
|
||||
groups = groups,
|
||||
images = images,
|
||||
description = desc_slab,
|
||||
sounds = sounds,
|
||||
blast_resistance = blast_resistance,
|
||||
hardness = hardness,
|
||||
double_description = double_description
|
||||
recipeitem = select(1, ...),
|
||||
groups = select(2, ...),
|
||||
tiles = select(3, ...),
|
||||
description = select(5, ...),
|
||||
sounds = select(6, ...),
|
||||
blast_resistance = select(7, ...),
|
||||
hardness = select(8, ...),
|
||||
double_description = select(9, ...),
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -505,20 +505,27 @@ function mcl_trees.register_wood(name, p)
|
||||
|
||||
if p.stairs == nil or type(p.stairs) == "table" then
|
||||
p.stairs = p.stairs or {}
|
||||
mcl_stairs.register_stair_and_slab(name, {
|
||||
mcl_stairs.register_stair(name, {
|
||||
baseitem="mcl_trees:wood_"..name,
|
||||
description = S("@1 Stairs", rname),
|
||||
})
|
||||
mcl_stairs.register_stair(name.."_bark", {
|
||||
baseitem="mcl_trees:bark_"..name,
|
||||
description = S("@1 Bark Stairs", rname),
|
||||
recipeitem=bark_stairs and "mcl_trees:bark_"..name or ""
|
||||
})
|
||||
end
|
||||
|
||||
if p.slab == nil or type(p.slab) == "table" then
|
||||
p.slab = p.slab or {}
|
||||
mcl_stairs.register_stair_and_slab(name, { baseitem="mcl_trees:wood_"..name, register_stair_and_slab = false })
|
||||
mcl_stairs.register_slab(name, {
|
||||
baseitem="mcl_trees:wood_"..name,
|
||||
description = S("@1 Slab", rname),
|
||||
register_stair_and_slab = false
|
||||
})
|
||||
mcl_stairs.register_slab(name.."_bark", {
|
||||
baseitem="mcl_trees:bark_"..name,
|
||||
description = S("@1 Bark Slab", rname),
|
||||
recipeitem=bark_stairs and "mcl_trees:bark_"..name or ""
|
||||
})
|
||||
end
|
||||
|
@ -4,13 +4,13 @@ local extra_nodes = minetest.settings:get_bool("mcl_extra_nodes", true)
|
||||
|
||||
mcl_stairs.register_stair("lapisblock", {
|
||||
baseitem="mcl_core:lapisblock",
|
||||
base_description=S("Lapis Lazuli"),
|
||||
description=S("Lapis Lazuli Stairs"),
|
||||
recipeitem=extra_nodes and "mcl_core:lapisblock" or "",
|
||||
groups={not_in_creative_inventory=extra_nodes and 0 or 1},
|
||||
})
|
||||
mcl_stairs.register_slab("lapisblock", {
|
||||
baseitem="mcl_core:lapisblock",
|
||||
base_description=S("Lapis Lazuli"),
|
||||
description=S("Lapis Lazuli Slab"),
|
||||
recipeitem=extra_nodes and "mcl_core:lapisblock" or "",
|
||||
groups={not_in_creative_inventory=extra_nodes and 0 or 1},
|
||||
tiles={"mcl_core_lapis_block.png", "mcl_core_lapis_block.png", "mcl_stairs_lapis_block_slab.png"},
|
||||
@ -18,13 +18,13 @@ mcl_stairs.register_slab("lapisblock", {
|
||||
|
||||
mcl_stairs.register_stair("goldblock", {
|
||||
baseitem="mcl_core:goldblock",
|
||||
base_description=S("Gold"),
|
||||
description=S("Gold Stairs"),
|
||||
recipeitem=extra_nodes and "mcl_core:goldblock" or "",
|
||||
groups={not_in_creative_inventory=extra_nodes and 0 or 1},
|
||||
})
|
||||
mcl_stairs.register_slab("goldblock", {
|
||||
baseitem="mcl_core:goldblock",
|
||||
base_description=S("Gold"),
|
||||
description=S("Gold Slab"),
|
||||
recipeitem=extra_nodes and "mcl_core:goldblock" or "",
|
||||
groups={not_in_creative_inventory=extra_nodes and 0 or 1},
|
||||
tiles={"default_gold_block.png", "default_gold_block.png", "mcl_stairs_gold_block_slab.png"},
|
||||
@ -32,13 +32,13 @@ mcl_stairs.register_slab("goldblock", {
|
||||
|
||||
mcl_stairs.register_stair("ironblock", {
|
||||
baseitem="mcl_core:ironblock",
|
||||
base_description=S("Iron"),
|
||||
description=S("Iron Stairs"),
|
||||
recipeitem=extra_nodes and "mcl_core:ironblock" or "",
|
||||
groups={not_in_creative_inventory=extra_nodes and 0 or 1},
|
||||
})
|
||||
mcl_stairs.register_slab("ironblock", {
|
||||
baseitem="mcl_core:ironblock",
|
||||
base_description=S("Iron"),
|
||||
description=S("Iron Slab"),
|
||||
recipeitem=extra_nodes and "mcl_core:ironblock" or "",
|
||||
groups={not_in_creative_inventory=extra_nodes and 0 or 1},
|
||||
tiles={"default_steel_block.png", "default_steel_block.png", "mcl_stairs_iron_block_slab.png"},
|
||||
@ -46,25 +46,30 @@ mcl_stairs.register_slab("ironblock", {
|
||||
|
||||
mcl_stairs.register_stair_and_slab("stonebrickcracked", {
|
||||
baseitem="mcl_core:stonebrickcracked",
|
||||
base_description=S("Cracked Stone Brick"),
|
||||
description_stair=S("Cracked Stone Brick Stairs"),
|
||||
description_slab=S("Cracked Stone Brick Slab"),
|
||||
recipeitem=extra_nodes and "mcl_core:stonebrickcracked" or "",
|
||||
groups={not_in_creative_inventory=extra_nodes and 0 or 1},
|
||||
})
|
||||
mcl_stairs.register_stair_and_slab("deepslate_bricks_cracked", {
|
||||
baseitem="mcl_deepslate:deepslate_bricks_cracked",
|
||||
base_description=S("Cracked Deepslate Brick"),
|
||||
description_stair=S("Cracked Deepslate Brick Stairs"),
|
||||
description_slab=S("Cracked Deepslate Brick Slab"),
|
||||
recipeitem=extra_nodes and "mcl_deepslate:deepslate_bricks_cracked" or "",
|
||||
groups={not_in_creative_inventory=extra_nodes and 0 or 1},
|
||||
})
|
||||
mcl_stairs.register_stair_and_slab("deepslate_tiles_cracked", {
|
||||
baseitem="mcl_deepslate:deepslate_tiles_cracked",
|
||||
base_description=S("Cracked Deepslate Tile"),
|
||||
description_stair=S("Cracked Deepslate Tile Stairs"),
|
||||
description_slab=S("Cracked Deepslate Tile Slab"),
|
||||
recipeitem=extra_nodes and "mcl_deepslate:deepslate_tiles_cracked" or "",
|
||||
groups={not_in_creative_inventory=extra_nodes and 0 or 1},
|
||||
})
|
||||
|
||||
mcl_stairs.register_stair_and_slab("end_stone", {
|
||||
baseitem = "mcl_end:end_stone",
|
||||
description_stair=S("End Stone Stairs"),
|
||||
description_slab=S("End Stone Slab"),
|
||||
recipeitem = extra_nodes and "mcl_end:end_stone" or "",
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_end:end_stone"}},
|
||||
groups = {not_in_creative_inventory=extra_nodes and 0 or 1},
|
||||
@ -72,6 +77,7 @@ mcl_stairs.register_stair_and_slab("end_stone", {
|
||||
|
||||
mcl_stairs.register_stair("stone", {
|
||||
baseitem = "mcl_core:stone_smooth",
|
||||
description=S("Smooth Stone Stairs"),
|
||||
recipeitem = extra_nodes and "mcl_core:stone_smooth" or "",
|
||||
overrides = {_mcl_stonecutter_recipes = {"mcl_core:stone_smooth"}},
|
||||
groups = {not_in_creative_inventory = extra_nodes and 0 or 1},
|
||||
@ -81,6 +87,8 @@ local canonical_color = "yellow"
|
||||
for name,cdef in pairs(mcl_dyes.colors) do
|
||||
local is_canonical = name == canonical_color
|
||||
mcl_stairs.register_stair_and_slab("concrete_"..name, {
|
||||
description_stair = S("@1 Concrete Stairs", cdef.readable_name),
|
||||
description_slab = S("@1 Concrete Slab", cdef.readable_name),
|
||||
groups={not_in_creative_inventory=extra_nodes and 0 or 1},
|
||||
baseitem="mcl_colorblocks:concrete_"..name,
|
||||
recipeitem=extra_nodes and "mcl_core:stonebrickcracked" or "",
|
||||
|
Loading…
x
Reference in New Issue
Block a user