forked from mtcontrib/darkage
Simplyfied registrations of Stairsplus
This commit is contained in:
parent
e7c528e1f2
commit
1f089ce75e
151
stairsplus.lua
151
stairsplus.lua
@ -1,128 +1,43 @@
|
||||
--slate Cobble
|
||||
stairsplus:register_all("darkage", "slate_cobble", "darkage:slate_cobble", {
|
||||
description = "Slate Cobble",
|
||||
tiles = {"darkage_slate_cobble.png"},
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
-- Function to register stairs out of base-material
|
||||
local function create_stair(nodeName)
|
||||
local ndef = assert(minetest.registered_nodes[nodeName], "Error: "..nodeName.." is not registered")
|
||||
|
||||
--slate
|
||||
stairsplus:register_all("darkage", "slate", "darkage:slate", {
|
||||
description = "Slate",
|
||||
tiles = {"darkage_slate.png","darkage_slate.png","darkage_slate_side.png"},
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
local mod = nodeName:split(":")[1]
|
||||
local node = nodeName:split(":")[2]
|
||||
|
||||
--slate tile
|
||||
stairsplus:register_all("darkage", "slate_tile", "darkage:slate_tile", {
|
||||
description = "Slate Tale",
|
||||
tiles = {"darkage_slate_tile.png"},
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
stairsplus:register_all(mod, node, nodeName, ndef)
|
||||
end
|
||||
|
||||
--marble
|
||||
stairsplus:register_all("darkage", "marble", "darkage:marble", {
|
||||
description = "Marble",
|
||||
tiles = {"darkage_marble.png"},
|
||||
groups = {cracky=2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
create_stair("darkage:slate_cobble")
|
||||
create_stair("darkage:slate")
|
||||
create_stair("darkage:slate_tile")
|
||||
create_stair("darkage:marble")
|
||||
create_stair("darkage:stone_brick")
|
||||
create_stair("darkage:serpentine")
|
||||
create_stair("darkage:schist")
|
||||
create_stair("darkage:gneiss")
|
||||
create_stair("darkage:gneiss_cobble")
|
||||
create_stair("darkage:basalt")
|
||||
create_stair("darkage:basalt_cobble")
|
||||
create_stair("darkage:shale")
|
||||
create_stair("darkage:ors")
|
||||
create_stair("darkage:ors_cobble")
|
||||
|
||||
--stone brick
|
||||
stairsplus:register_all("darkage", "stone_brick", "darkage:stone_brick", {
|
||||
description = "Stone Brick",
|
||||
tiles = {"darkage_stone_brick.png"},
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
--straw
|
||||
-- Straw
|
||||
-- Keep this until farming:straw gets registered in moreblocks. Register alias then.
|
||||
stairsplus:register_all("darkage", "straw", "farming:straw", {
|
||||
description = "Straw",
|
||||
tiles = {"farming_straw.png"},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
description = "Straw",
|
||||
tiles = {"farming_straw.png"},
|
||||
groups = {snappy=3, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
--straw_bale
|
||||
-- Straw Bale
|
||||
-- Is it used? Maybe remove in future.
|
||||
stairsplus:register_all("darkage", "straw_bale", "darkage:straw_bale", {
|
||||
description = "Straw Bale",
|
||||
tiles = {"darkage_straw_bale.png"},
|
||||
groups = {snappy=2, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
--serpentine
|
||||
stairsplus:register_all("darkage", "serpentine", "darkage:serpentine", {
|
||||
description = "Serpentine",
|
||||
tiles = {"darkage_serpentine.png"},
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
--shist
|
||||
stairsplus:register_all("darkage", "schist", "darkage:schist", {
|
||||
description = "Schist",
|
||||
tiles = {"darkage_schist.png"},
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
--gneiss
|
||||
stairsplus:register_all("darkage", "gneiss", "darkage:gneiss", {
|
||||
description = "Gneiss",
|
||||
tiles = {"darkage_gneiss.png"},
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
--gneiss_cobble
|
||||
stairsplus:register_all("darkage", "gneiss_cobble", "darkage:gneiss_cobble", {
|
||||
description = "Gneiss Cobble",
|
||||
tiles = {"darkage_gneiss_cobble.png"},
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
--basalt
|
||||
stairsplus:register_all("darkage", "basalt", "darkage:basalt", {
|
||||
description = "Basalt",
|
||||
tiles = {"darkage_basalt.png"},
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
--basalt cobble
|
||||
stairsplus:register_all("darkage", "basalt_cobble", "darkage:basalt_cobble", {
|
||||
description = "Basalt Cobble",
|
||||
tiles = {"darkage_basalt_cobble.png"},
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
--shale
|
||||
stairsplus:register_all("darkage", "shale", "darkage:shale", {
|
||||
description = "Shale",
|
||||
tiles = {"darkage_shale.png","darkage_shale.png","darkage_shale_side.png"},
|
||||
groups = {crumbly=2,cracky=2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
|
||||
--old red sandstone
|
||||
stairsplus:register_all("darkage", "ors", "darkage:ors", {
|
||||
description = "Old Red Sandstone",
|
||||
tiles = {"darkage_ors.png"},
|
||||
groups = {crumbly=2,cracky=2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
--old red sandstone cobble
|
||||
stairsplus:register_all("darkage", "ors_cobble", "darkage:ors_cobble", {
|
||||
description = "Old Red Sandstone Cobble",
|
||||
tiles = {"darkage_ors_cobble.png"},
|
||||
groups = {crumbly=2,cracky=2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
description = "Straw Bale",
|
||||
tiles = {"darkage_straw_bale.png"},
|
||||
groups = {snappy=2, flammable=2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user