Stairs: Code cleanup, fix various errors

Improve registration format
Fix groups not matching corresponding full node
Improve some descriptions
This commit is contained in:
paramat 2016-06-26 03:57:30 +01:00
parent 22dc7b2d9e
commit 983af7b1c0

@ -256,8 +256,8 @@ end
-- Stair/slab registration function. -- Stair/slab registration function.
-- Nodes will be called stairs:{stair,slab}_<subname> -- Nodes will be called stairs:{stair,slab}_<subname>
function stairs.register_stair_and_slab(subname, recipeitem, groups, images, function stairs.register_stair_and_slab(subname, recipeitem,
desc_stair, desc_slab, sounds) groups, images, desc_stair, desc_slab, sounds)
stairs.register_stair(subname, recipeitem, groups, images, desc_stair, sounds) stairs.register_stair(subname, recipeitem, groups, images, desc_stair, sounds)
stairs.register_slab(subname, recipeitem, groups, images, desc_slab, sounds) stairs.register_slab(subname, recipeitem, groups, images, desc_slab, sounds)
end end
@ -265,184 +265,262 @@ end
-- Register default stairs and slabs -- Register default stairs and slabs
stairs.register_stair_and_slab("wood", "default:wood", stairs.register_stair_and_slab(
{snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, "wood",
{"default_wood.png"}, "default:wood",
"Wooden Stair", {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
"Wooden Slab", {"default_wood.png"},
default.node_sound_wood_defaults()) "Wooden Stair",
"Wooden Slab",
default.node_sound_wood_defaults()
)
stairs.register_stair_and_slab("junglewood", "default:junglewood", stairs.register_stair_and_slab(
{snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, "junglewood",
{"default_junglewood.png"}, "default:junglewood",
"Junglewood Stair", {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
"Junglewood Slab", {"default_junglewood.png"},
default.node_sound_wood_defaults()) "Jungle Wood Stair",
"Jungle Wood Slab",
default.node_sound_wood_defaults()
)
stairs.register_stair_and_slab("pine_wood", "default:pine_wood", stairs.register_stair_and_slab(
{snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, "pine_wood",
{"default_pine_wood.png"}, "default:pine_wood",
"Pine Wood Stair", {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
"Pine Wood Slab", {"default_pine_wood.png"},
default.node_sound_wood_defaults()) "Pine Wood Stair",
"Pine Wood Slab",
default.node_sound_wood_defaults()
)
stairs.register_stair_and_slab("acacia_wood", "default:acacia_wood", stairs.register_stair_and_slab(
{snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, "acacia_wood",
{"default_acacia_wood.png"}, "default:acacia_wood",
"Acacia Wood Stair", {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
"Acacia Wood Slab", {"default_acacia_wood.png"},
default.node_sound_wood_defaults()) "Acacia Wood Stair",
"Acacia Wood Slab",
default.node_sound_wood_defaults()
)
stairs.register_stair_and_slab("aspen_wood", "default:aspen_wood", stairs.register_stair_and_slab(
{snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, "aspen_wood",
{"default_aspen_wood.png"}, "default:aspen_wood",
"Aspen Wood Stair", {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
"Aspen Wood Slab", {"default_aspen_wood.png"},
default.node_sound_wood_defaults()) "Aspen Wood Stair",
"Aspen Wood Slab",
default.node_sound_wood_defaults()
)
stairs.register_stair_and_slab("stone", "default:stone", stairs.register_stair_and_slab(
{cracky = 3}, "stone",
{"default_stone.png"}, "default:stone",
"Stone Stair", {cracky = 3},
"Stone Slab", {"default_stone.png"},
default.node_sound_stone_defaults()) "Stone Stair",
"Stone Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("cobble", "default:cobble", stairs.register_stair_and_slab(
{cracky = 3}, "cobble",
{"default_cobble.png"}, "default:cobble",
"Cobblestone Stair", {cracky = 3},
"Cobblestone Slab", {"default_cobble.png"},
default.node_sound_stone_defaults()) "Cobblestone Stair",
"Cobblestone Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("mossycobble", nil, stairs.register_stair_and_slab(
{cracky = 3}, "mossycobble",
{"default_mossycobble.png"}, nil,
"Mossy Cobblestone Stair", {cracky = 3},
"Mossy Cobblestone Slab", {"default_mossycobble.png"},
default.node_sound_stone_defaults()) "Mossy Cobblestone Stair",
"Mossy Cobblestone Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("stonebrick", "default:stonebrick", stairs.register_stair_and_slab(
{cracky = 3}, "stonebrick",
{"default_stone_brick.png"}, "default:stonebrick",
"Stone Brick Stair", {cracky = 2},
"Stone Brick Slab", {"default_stone_brick.png"},
default.node_sound_stone_defaults()) "Stone Brick Stair",
"Stone Brick Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("stone_block", "default:stone_block", stairs.register_stair_and_slab(
{cracky = 2}, "stone_block",
{"default_stone_block.png"}, "default:stone_block",
"Stone Block Stair", {cracky = 2},
"Stone Block Slab", {"default_stone_block.png"},
default.node_sound_stone_defaults()) "Stone Block Stair",
"Stone Block Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("desert_stone", "default:desert_stone", stairs.register_stair_and_slab(
{cracky = 3}, "desert_stone",
{"default_desert_stone.png"}, "default:desert_stone",
"Desertstone Stair", {cracky = 3},
"Desertstone Slab", {"default_desert_stone.png"},
default.node_sound_stone_defaults()) "Desert Stone Stair",
"Desert Stone Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("desert_cobble", "default:desert_cobble", stairs.register_stair_and_slab(
{cracky = 3}, "desert_cobble",
{"default_desert_cobble.png"}, "default:desert_cobble",
"Desert Cobblestone Stair", {cracky = 3},
"Desert Cobblestone Slab", {"default_desert_cobble.png"},
default.node_sound_stone_defaults()) "Desert Cobblestone Stair",
"Desert Cobblestone Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("desert_stonebrick", "default:desert_stonebrick", stairs.register_stair_and_slab(
{cracky = 3}, "desert_stonebrick",
{"default_desert_stone_brick.png"}, "default:desert_stonebrick",
"Desert Stone Brick Stair", {cracky = 2},
"Desert Stone Brick Slab", {"default_desert_stone_brick.png"},
default.node_sound_stone_defaults()) "Desert Stone Brick Stair",
"Desert Stone Brick Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("desert_stone_block", "default:desert_stone_block", stairs.register_stair_and_slab(
{cracky = 2}, "desert_stone_block",
{"default_desert_stone_block.png"}, "default:desert_stone_block",
"Desert Stone Block Stair", {cracky = 2},
"Desert Stone Block Slab", {"default_desert_stone_block.png"},
default.node_sound_stone_defaults()) "Desert Stone Block Stair",
"Desert Stone Block Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("sandstone", "default:sandstone", stairs.register_stair_and_slab(
{crumbly = 1, cracky = 3}, "sandstone",
{"default_sandstone.png"}, "default:sandstone",
"Sandstone Stair", {crumbly = 1, cracky = 3},
"Sandstone Slab", {"default_sandstone.png"},
default.node_sound_stone_defaults()) "Sandstone Stair",
"Sandstone Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("sandstonebrick", "default:sandstonebrick", stairs.register_stair_and_slab(
{cracky = 2}, "sandstonebrick",
{"default_sandstone_brick.png"}, "default:sandstonebrick",
"Sandstone Brick Stair", {cracky = 2},
"Sandstone Brick Slab", {"default_sandstone_brick.png"},
default.node_sound_stone_defaults()) "Sandstone Brick Stair",
"Sandstone Brick Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("sandstone_block", "default:sandstone_block", stairs.register_stair_and_slab(
{cracky = 2}, "sandstone_block",
{"default_sandstone_block.png"}, "default:sandstone_block",
"Sandstone Block Stair", {cracky = 2},
"Sandstone Block Slab", {"default_sandstone_block.png"},
default.node_sound_stone_defaults()) "Sandstone Block Stair",
"Sandstone Block Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("obsidian", "default:obsidian", stairs.register_stair_and_slab(
{cracky = 1, level = 2}, "obsidian",
{"default_obsidian.png"}, "default:obsidian",
"Obsidian Stair", {cracky = 1, level = 2},
"Obsidian Slab", {"default_obsidian.png"},
default.node_sound_stone_defaults()) "Obsidian Stair",
"Obsidian Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("obsidianbrick", "default:obsidianbrick", stairs.register_stair_and_slab(
{cracky = 1, level = 2}, "obsidianbrick",
{"default_obsidian_brick.png"}, "default:obsidianbrick",
"Obsidian Brick Stair", {cracky = 1, level = 2},
"Obsidian Brick Slab", {"default_obsidian_brick.png"},
default.node_sound_stone_defaults()) "Obsidian Brick Stair",
"Obsidian Brick Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("obsidian_block", "default:obsidian_block", stairs.register_stair_and_slab(
{cracky = 1, level = 2}, "obsidian_block",
{"default_obsidian_block.png"}, "default:obsidian_block",
"Obsidian Block Stair", {cracky = 1, level = 2},
"Obsidian Block Slab", {"default_obsidian_block.png"},
default.node_sound_stone_defaults()) "Obsidian Block Stair",
"Obsidian Block Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("brick", "default:brick", stairs.register_stair_and_slab(
{cracky = 3}, "brick",
{"default_brick.png"}, "default:brick",
"Brick Stair", {cracky = 3},
"Brick Slab", {"default_brick.png"},
default.node_sound_stone_defaults()) "Brick Stair",
"Brick Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("straw", "farming:straw", stairs.register_stair_and_slab(
{snappy = 3, flammable = 4}, "straw",
{"farming_straw.png"}, "farming:straw",
"Straw Stair", {snappy = 3, flammable = 4},
"Straw Slab", {"farming_straw.png"},
default.node_sound_leaves_defaults()) "Straw Stair",
"Straw Slab",
default.node_sound_leaves_defaults()
)
stairs.register_stair_and_slab("steelblock", "default:steelblock", stairs.register_stair_and_slab(
{cracky = 1, level = 2}, "steelblock",
{"default_steel_block.png"}, "default:steelblock",
"Steel Block Stair", {cracky = 1, level = 2},
"Steel Block Slab", {"default_steel_block.png"},
default.node_sound_stone_defaults()) "Steel Block Stair",
"Steel Block Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("copperblock", "default:copperblock", stairs.register_stair_and_slab(
{cracky = 1, level = 2}, "copperblock",
{"default_copper_block.png"}, "default:copperblock",
"Copper Block Stair", {cracky = 1, level = 2},
"Copper Block Slab", {"default_copper_block.png"},
default.node_sound_stone_defaults()) "Copper Block Stair",
"Copper Block Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("bronzeblock", "default:bronzeblock", stairs.register_stair_and_slab(
{cracky = 1, level = 2}, "bronzeblock",
{"default_bronze_block.png"}, "default:bronzeblock",
"Bronze Block Stair", {cracky = 1, level = 2},
"Bronze Block Slab", {"default_bronze_block.png"},
default.node_sound_stone_defaults()) "Bronze Block Stair",
"Bronze Block Slab",
default.node_sound_stone_defaults()
)
stairs.register_stair_and_slab("goldblock", "default:goldblock", stairs.register_stair_and_slab(
{cracky = 1}, "goldblock",
{"default_gold_block.png"}, "default:goldblock",
"Gold Block Stair", {cracky = 1},
"Gold Block Slab", {"default_gold_block.png"},
default.node_sound_stone_defaults()) "Gold Block Stair",
"Gold Block Slab",
default.node_sound_stone_defaults()
)