marsdoors: add moreblocks registrations

This commit is contained in:
Milan Ihl 2020-05-20 14:06:37 +02:00
parent b795a1d1ec
commit 5f7bea5726

View File

@ -0,0 +1,98 @@
stairsplus:register_all("marsdoors", "shieldblock", "marsdoors:shieldblock", {
description = "Shieldblock",
tiles = {"marsdoors_shieldblock.png"},
groups = {cracky=1},
sounds = default.node_sound_stone_defaults(),
})
stairsplus:register_all("marsdoors", "steelwallblock", "marsdoors:steelwallblock", {
description = "Steelwallblock",
tiles = {"marsdoors_wall.png"},
groups = {cracky=1},
sounds = default.node_sound_stone_defaults(),
})
stairsplus:register_all("marsdoors", "oxogen", "marsdoors:oxogen", {
description = "Oxogen Block",
tiles = {"marsdoors_oxogen.png"},
groups = {crumbly = 2},
sounds = default.node_sound_glass_defaults(),
})
stairsplus:register_all("marsdoors", "warning", "marsdoors:warning", {
description = "Warning tape block",
tiles = {"marsdoors_warntape.png"},
groups = {cracky = 2},
sounds = default.node_sound_stone_defaults(),
})
table.insert(circular_saw.known_stairs, "marsdoors:shieldblock")
table.insert(circular_saw.known_stairs, "marsdoors:steelwallblock")
table.insert(circular_saw.known_stairs, "marsdoors:oxogen")
table.insert(circular_saw.known_stairs, "marsdoors:warning")
-- and now for the aliases
local saw_names = {
{"micro", "_1"},
{"panel", "_1"},
{"micro", "_2"},
{"panel", "_2"},
{"micro", "_4"},
{"panel", "_4"},
{"micro", ""},
{"panel", ""},
{"micro", "_12"},
{"panel", "_12"},
{"micro", "_14"},
{"panel", "_14"},
{"micro", "_15"},
{"panel", "_15"},
{"stair", "_outer"},
{"stair", ""},
{"stair", "_inner"},
{"slab", "_1"},
{"slab", "_2"},
{"slab", "_quarter"},
{"slab", ""},
{"slab", "_three_quarter"},
{"slab", "_14"},
{"slab", "_15"},
{"slab", "_two_sides"},
{"slab", "_three_sides"},
{"slab", "_three_sides_u"},
{"stair", "_half"},
{"stair", "_alt_1"},
{"stair", "_alt_2"},
{"stair", "_alt_4"},
{"stair", "_alt"},
{"slope", ""},
{"slope", "_half"},
{"slope", "_half_raised"},
{"slope", "_inner"},
{"slope", "_inner_half"},
{"slope", "_inner_half_raised"},
{"slope", "_inner_cut"},
{"slope", "_inner_cut_half"},
{"slope", "_inner_cut_half_raised"},
{"slope", "_outer"},
{"slope", "_outer_half"},
{"slope", "_outer_half_raised"},
{"slope", "_outer_cut"},
{"slope", "_outer_cut_half"},
{"slope", "_outer_cut_half_raised"},
{"slope", "_cut"},
}
for i = 1, #saw_names do
local t = saw_names[i]
minetest.register_alias("stairs" .. ":" .. t[1] .. "_" .. "shieldblock" .. t[2], "marsdoors" .. ":" .. t[1] .. "_" .. "shieldblock" .. t[2])
minetest.register_alias("stairs" .. ":" .. t[1] .. "_" .. "steelwallblock" .. t[2], "marsdoors" .. ":" .. t[1] .. "_" .. "steelwallblock" .. t[2])
minetest.register_alias("stairs" .. ":" .. t[1] .. "_" .. "oxogen" .. t[2], "marsdoors" .. ":" .. t[1] .. "_" .. "oxogen" .. t[2])
minetest.register_alias("stairs" .. ":" .. t[1] .. "_" .. "warning" .. t[2], "marsdoors" .. ":" .. t[1] .. "_" .. "warning" .. t[2])
end