Add stairsplus support from moreblocks

This commit is contained in:
sys4-fr 2018-10-13 17:58:24 +02:00
parent c912cf078b
commit 7c5e9bf73a
10 changed files with 119 additions and 43 deletions

View File

@ -4,3 +4,4 @@ stairs
clams clams
whiteshell? whiteshell?
colormachine? colormachine?
moreblocks?

View File

@ -60,56 +60,74 @@ minetest.register_node("seacobble:seacobble_redviolet", {
-- STAIRS -- STAIRS
local colors = {"", "cyan", "magenta", "lime", "aqua", "skyblue", "redviolet"}
stairs.register_stair_and_slab("seacobble", "seacobble:seacobble", if minetest.get_modpath("moreblocks") then
for i, color in ipairs(colors) do
local c = "_"..color
if i == 1 then c = "" end
local nodename = "seacobble:seacobble"..c
local ndef = table.copy(minetest.registered_nodes[nodename])
ndef.sunlight_propagates = true
ndef.place_param2 = nil
stairsplus:register_all(
"seacobble",
"seacobble"..c,
nodename,
ndef
)
end
else
stairs.register_stair_and_slab("seacobble", "seacobble:seacobble",
{cracky=3, stone=2}, {cracky=3, stone=2},
{"seacobble_seacobble.png"}, {"seacobble_seacobble.png"},
"Seacobble stair", "Seacobble stair",
"Seacobble slab", "Seacobble slab",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seacobble_cyan", "seacobble:seacobble_cyan", stairs.register_stair_and_slab("seacobble_cyan", "seacobble:seacobble_cyan",
{cracky=3, stone=2}, {cracky=3, stone=2},
{"seacobble_seacobble_cyan.png"}, {"seacobble_seacobble_cyan.png"},
"Seacobble stair cyan", "Seacobble stair cyan",
"Seacobble slab cyan", "Seacobble slab cyan",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seacobble_magenta", "seacobble:seacobble_magenta", stairs.register_stair_and_slab("seacobble_magenta", "seacobble:seacobble_magenta",
{cracky=3, stone=2}, {cracky=3, stone=2},
{"seacobble_seacobble_magenta.png"}, {"seacobble_seacobble_magenta.png"},
"Seacobble stair magenta", "Seacobble stair magenta",
"Seacobble slab magenta", "Seacobble slab magenta",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seacobble_lime", "seacobble:seacobble_lime", stairs.register_stair_and_slab("seacobble_lime", "seacobble:seacobble_lime",
{cracky=3, stone=2}, {cracky=3, stone=2},
{"seacobble_seacobble_lime.png"}, {"seacobble_seacobble_lime.png"},
"Seacobble stair lime", "Seacobble stair lime",
"Seacobble slab lime", "Seacobble slab lime",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seacobble_aqua", "seacobble:seacobble_aqua", stairs.register_stair_and_slab("seacobble_aqua", "seacobble:seacobble_aqua",
{cracky=3, stone=2}, {cracky=3, stone=2},
{"seacobble_seacobble_aqua.png"}, {"seacobble_seacobble_aqua.png"},
"Seacobble stair aqua", "Seacobble stair aqua",
"Seacobble slab aqua", "Seacobble slab aqua",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seacobble_skyblue", "seacobble:seacobble_skyblue", stairs.register_stair_and_slab("seacobble_skyblue", "seacobble:seacobble_skyblue",
{cracky=3, stone=2}, {cracky=3, stone=2},
{"seacobble_seacobble_skyblue.png"}, {"seacobble_seacobble_skyblue.png"},
"Seacobble stair skyblue ", "Seacobble stair skyblue ",
"Seacobble slab skyblue", "Seacobble slab skyblue",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seacobble_redviolet", "seacobble:seacobble_redviolet", stairs.register_stair_and_slab("seacobble_redviolet", "seacobble:seacobble_redviolet",
{cracky=3, stone=2}, {cracky=3, stone=2},
{"seacobble_seacobble_redviolet.png"}, {"seacobble_seacobble_redviolet.png"},
"Seacobble stair redviolet", "Seacobble stair redviolet",
"Seacobble slab redviolet", "Seacobble slab redviolet",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
end
-- CRAFTING -- CRAFTING

View File

@ -4,3 +4,4 @@ stairs
clams clams
stairsshine stairsshine
colormachine? colormachine?
moreblocks?

View File

@ -160,7 +160,6 @@ minetest.register_node("seaglass:seaglassoff_black", {
-- STAIRS -- STAIRS
stairsshine.register_stair_and_slab("seaglass", "seaglass:seaglass", stairsshine.register_stair_and_slab("seaglass", "seaglass:seaglass",
{snappy=2,cracky=3,oddly_breakable_by_hand=3, nocolor=1, shine=1, not_in_creative_inventory=1}, {snappy=2,cracky=3,oddly_breakable_by_hand=3, nocolor=1, shine=1, not_in_creative_inventory=1},
{"seaglass_seaglass.png"}, {"seaglass_seaglass.png"},

View File

@ -4,3 +4,4 @@ stairs
clams clams
whiteshell? whiteshell?
colormachine? colormachine?
moreblocks?

View File

@ -81,8 +81,26 @@ minetest.register_node("seagravel:seagravel_redviolet", {
-- STAIRS -- STAIRS
local colors = {"", "cyan", "magenta", "lime", "aqua", "skyblue", "redviolet"}
stairs.register_stair_and_slab("seagravel", "seagravel:seagravel", if minetest.get_modpath("moreblocks") then
for i, color in ipairs(colors) do
local c = "_"..color
if i == 1 then c = "" end
local nodename = "seagravel:seagravel"..c
local ndef = table.copy(minetest.registered_nodes[nodename])
ndef.sunlight_propagates = true
ndef.place_param2 = nil
stairsplus:register_all(
"seagravel",
"seagravel"..c,
nodename,
ndef
)
end
else
stairs.register_stair_and_slab("seagravel", "seagravel:seagravel",
{crumbly=2, falling_node=1}, {crumbly=2, falling_node=1},
{"seagravel_seagravel.png"}, {"seagravel_seagravel.png"},
"Seagravel stair", "Seagravel stair",
@ -92,7 +110,7 @@ stairs.register_stair_and_slab("seagravel", "seagravel:seagravel",
dug = {name="default_gravel_footstep", gain=1.0}, dug = {name="default_gravel_footstep", gain=1.0},
})) }))
stairs.register_stair_and_slab("seagravel_cyan", "seagravel:seagravel_cyan", stairs.register_stair_and_slab("seagravel_cyan", "seagravel:seagravel_cyan",
{crumbly=2, falling_node=1}, {crumbly=2, falling_node=1},
{"seagravel_seagravel_cyan.png"}, {"seagravel_seagravel_cyan.png"},
"Seagravel stair cyan", "Seagravel stair cyan",
@ -102,7 +120,7 @@ stairs.register_stair_and_slab("seagravel_cyan", "seagravel:seagravel_cyan",
dug = {name="default_gravel_footstep", gain=1.0}, dug = {name="default_gravel_footstep", gain=1.0},
})) }))
stairs.register_stair_and_slab("seagravel_magenta", "seagravel:seagravel_magenta", stairs.register_stair_and_slab("seagravel_magenta", "seagravel:seagravel_magenta",
{crumbly=2, falling_node=1}, {crumbly=2, falling_node=1},
{"seagravel_seagravel_magenta.png"}, {"seagravel_seagravel_magenta.png"},
"Seagravel stair magenta", "Seagravel stair magenta",
@ -112,7 +130,7 @@ stairs.register_stair_and_slab("seagravel_magenta", "seagravel:seagravel_magenta
dug = {name="default_gravel_footstep", gain=1.0}, dug = {name="default_gravel_footstep", gain=1.0},
})) }))
stairs.register_stair_and_slab("seagravel_lime", "seagravel:seagravel_lime", stairs.register_stair_and_slab("seagravel_lime", "seagravel:seagravel_lime",
{cracky=3, stone=2}, {cracky=3, stone=2},
{"seagravel_seagravel_lime.png"}, {"seagravel_seagravel_lime.png"},
"Seagravel stair lime", "Seagravel stair lime",
@ -122,7 +140,7 @@ stairs.register_stair_and_slab("seagravel_lime", "seagravel:seagravel_lime",
dug = {name="default_gravel_footstep", gain=1.0}, dug = {name="default_gravel_footstep", gain=1.0},
})) }))
stairs.register_stair_and_slab("seagravel_aqua", "seagravel:seagravel_aqua", stairs.register_stair_and_slab("seagravel_aqua", "seagravel:seagravel_aqua",
{crumbly=2, falling_node=1}, {crumbly=2, falling_node=1},
{"seagravel_seagravel_aqua.png"}, {"seagravel_seagravel_aqua.png"},
"Seagravel stair aqua", "Seagravel stair aqua",
@ -132,7 +150,7 @@ stairs.register_stair_and_slab("seagravel_aqua", "seagravel:seagravel_aqua",
dug = {name="default_gravel_footstep", gain=1.0}, dug = {name="default_gravel_footstep", gain=1.0},
})) }))
stairs.register_stair_and_slab("seagravel_skyblue", "seagravel:seagravel_skyblue", stairs.register_stair_and_slab("seagravel_skyblue", "seagravel:seagravel_skyblue",
{crumbly=2, falling_node=1}, {crumbly=2, falling_node=1},
{"seagravel_seagravel_skyblue.png"}, {"seagravel_seagravel_skyblue.png"},
"Seagravel stair skyblue ", "Seagravel stair skyblue ",
@ -142,7 +160,7 @@ stairs.register_stair_and_slab("seagravel_skyblue", "seagravel:seagravel_skyblue
dug = {name="default_gravel_footstep", gain=1.0}, dug = {name="default_gravel_footstep", gain=1.0},
})) }))
stairs.register_stair_and_slab("seagravel_redviolet", "seagravel:seagravel_redviolet", stairs.register_stair_and_slab("seagravel_redviolet", "seagravel:seagravel_redviolet",
{crumbly=2, falling_node=1}, {crumbly=2, falling_node=1},
{"seagravel_seagravel_redviolet.png"}, {"seagravel_seagravel_redviolet.png"},
"Seagravel stair redviolet", "Seagravel stair redviolet",
@ -151,7 +169,7 @@ stairs.register_stair_and_slab("seagravel_redviolet", "seagravel:seagravel_redvi
footstep = {name="default_gravel_footstep", gain=0.5}, footstep = {name="default_gravel_footstep", gain=0.5},
dug = {name="default_gravel_footstep", gain=1.0}, dug = {name="default_gravel_footstep", gain=1.0},
})) }))
end
-- CRAFTING -- CRAFTING

View File

@ -4,3 +4,4 @@ stairs
clams clams
whiteshell? whiteshell?
colormachine? colormachine?
moreblocks?

View File

@ -67,56 +67,74 @@ minetest.register_node("seastone:seastone_redviolet", {
-- STAIRS -- STAIRS
local colors = {"", "cyan", "magenta", "lime", "aqua", "skyblue", "redviolet"}
stairs.register_stair_and_slab("seastone", "seastone:seastone", if minetest.get_modpath("moreblocks") then
for i, color in ipairs(colors) do
local c = "_"..color
if i == 1 then c = "" end
local nodename = "seastone:seastone"..c
local ndef = table.copy(minetest.registered_nodes[nodename])
ndef.sunlight_propagates = true
ndef.place_param2 = nil
stairsplus:register_all(
"seastone",
"seastone"..c,
nodename,
ndef
)
end
else
stairs.register_stair_and_slab("seastone", "seastone:seastone",
{cracky=3, stone=1}, {cracky=3, stone=1},
{"seastone_seastone.png"}, {"seastone_seastone.png"},
"Seastone stair", "Seastone stair",
"Seastone slab", "Seastone slab",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seastone_cyan", "seastone:seastone_cyan", stairs.register_stair_and_slab("seastone_cyan", "seastone:seastone_cyan",
{cracky=3, stone=1}, {cracky=3, stone=1},
{"seastone_seastone_cyan.png"}, {"seastone_seastone_cyan.png"},
"Seastone stair cyan", "Seastone stair cyan",
"Seastone slab cyan", "Seastone slab cyan",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seastone_magenta", "seastone:seastone_magenta", stairs.register_stair_and_slab("seastone_magenta", "seastone:seastone_magenta",
{cracky=3, stone=1}, {cracky=3, stone=1},
{"seastone_seastone_magenta.png"}, {"seastone_seastone_magenta.png"},
"Seastone stair magenta", "Seastone stair magenta",
"Seastone slab magenta", "Seastone slab magenta",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seastone_lime", "seastone:seastone_lime", stairs.register_stair_and_slab("seastone_lime", "seastone:seastone_lime",
{cracky=3, stone=1}, {cracky=3, stone=1},
{"seastone_seastone_lime.png"}, {"seastone_seastone_lime.png"},
"Seastone stair lime", "Seastone stair lime",
"Seastone slab lime", "Seastone slab lime",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seastone_aqua", "seastone:seastone_aqua", stairs.register_stair_and_slab("seastone_aqua", "seastone:seastone_aqua",
{cracky=3, stone=1}, {cracky=3, stone=1},
{"seastone_seastone_aqua.png"}, {"seastone_seastone_aqua.png"},
"Seastone stair aqua", "Seastone stair aqua",
"Seastone slab aqua", "Seastone slab aqua",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seastone_skyblue", "seastone:seastone_skyblue", stairs.register_stair_and_slab("seastone_skyblue", "seastone:seastone_skyblue",
{cracky=3, stone=1}, {cracky=3, stone=1},
{"seastone_seastone_skyblue.png"}, {"seastone_seastone_skyblue.png"},
"Seastone stair skyblue ", "Seastone stair skyblue ",
"Seastone slab skyblue", "Seastone slab skyblue",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seastone_redviolet", "seastone:seastone_redviolet", stairs.register_stair_and_slab("seastone_redviolet", "seastone:seastone_redviolet",
{cracky=3, stone=1}, {cracky=3, stone=1},
{"seastone_seastone_redviolet.png"}, {"seastone_seastone_redviolet.png"},
"Seastone stair redviolet", "Seastone stair redviolet",
"Seastone slab redviolet", "Seastone slab redviolet",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
end
-- CRAFTING -- CRAFTING

View File

@ -2,3 +2,4 @@ default
stairs stairs
seastone seastone
colormachine? colormachine?
moreblocks?

View File

@ -61,56 +61,74 @@ minetest.register_node("seastonebrick:seastonebrick_redviolet", {
-- STAIRS -- STAIRS
local colors = {"", "cyan", "magenta", "lime", "aqua", "skyblue", "redviolet"}
stairs.register_stair_and_slab("seastonebrick", "seastonebrick:seastonebrick", if minetest.get_modpath("moreblocks") then
for i, color in ipairs(colors) do
local c = "_"..color
if i == 1 then c = "" end
local nodename = "seastonebrick:seastonebrick"..c
local ndef = table.copy(minetest.registered_nodes[nodename])
ndef.sunlight_propagates = true
ndef.place_param2 = nil
stairsplus:register_all(
"seastonebrick",
"seastonebrick"..c,
nodename,
ndef
)
end
else
stairs.register_stair_and_slab("seastonebrick", "seastonebrick:seastonebrick",
{cracky=3, stone=1}, {cracky=3, stone=1},
{"seastonebrick_seastonebrick.png"}, {"seastonebrick_seastonebrick.png"},
"Seastonebrick stair", "Seastonebrick stair",
"Seastonebrick slab", "Seastonebrick slab",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seastonebrick_cyan", "seastonebrick:seastonebrick_cyan", stairs.register_stair_and_slab("seastonebrick_cyan", "seastonebrick:seastonebrick_cyan",
{cracky=3, stone=1}, {cracky=3, stone=1},
{"seastonebrick_seastonebrick_cyan.png"}, {"seastonebrick_seastonebrick_cyan.png"},
"Seastonebrick stair cyan", "Seastonebrick stair cyan",
"Seastonebrick slab cyan", "Seastonebrick slab cyan",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seastonebrick_magenta", "seastonebrick:seastonebrick_magenta", stairs.register_stair_and_slab("seastonebrick_magenta", "seastonebrick:seastonebrick_magenta",
{cracky=3, stone=1}, {cracky=3, stone=1},
{"seastonebrick_seastonebrick_magenta.png"}, {"seastonebrick_seastonebrick_magenta.png"},
"Seastonebrick stair magenta", "Seastonebrick stair magenta",
"Seastonebrick slab magenta", "Seastonebrick slab magenta",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seastonebrick_lime", "seastonebrick:seastonebrick_lime", stairs.register_stair_and_slab("seastonebrick_lime", "seastonebrick:seastonebrick_lime",
{cracky=3, stone=1}, {cracky=3, stone=1},
{"seastonebrick_seastonebrick_lime.png"}, {"seastonebrick_seastonebrick_lime.png"},
"Seastonebrick stair lime", "Seastonebrick stair lime",
"Seastonebrick slab lime", "Seastonebrick slab lime",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seastonebrick_aqua", "seastonebrick:seastonebrick_aqua", stairs.register_stair_and_slab("seastonebrick_aqua", "seastonebrick:seastonebrick_aqua",
{cracky=3, stone=1}, {cracky=3, stone=1},
{"seastonebrick_seastonebrick_aqua.png"}, {"seastonebrick_seastonebrick_aqua.png"},
"Seastonebrick stair aqua", "Seastonebrick stair aqua",
"Seastonebrick slab aqua", "Seastonebrick slab aqua",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seastonebrick_skyblue", "seastonebrick:seastonebrick_skyblue", stairs.register_stair_and_slab("seastonebrick_skyblue", "seastonebrick:seastonebrick_skyblue",
{cracky=3, stone=1}, {cracky=3, stone=1},
{"seastonebrick_seastonebrick_skyblue.png"}, {"seastonebrick_seastonebrick_skyblue.png"},
"Seastonebrick stair skyblue ", "Seastonebrick stair skyblue ",
"Seastonebrick slab skyblue", "Seastonebrick slab skyblue",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
stairs.register_stair_and_slab("seastonebrick_redviolet", "seastonebrick:seastonebrick_redviolet", stairs.register_stair_and_slab("seastonebrick_redviolet", "seastonebrick:seastonebrick_redviolet",
{cracky=3, stone=1}, {cracky=3, stone=1},
{"seastonebrick_seastonebrick_redviolet.png"}, {"seastonebrick_seastonebrick_redviolet.png"},
"Seastonebrick stair redviolet", "Seastonebrick stair redviolet",
"Seastonebrick slab redviolet", "Seastonebrick slab redviolet",
default.node_sound_stone_defaults()) default.node_sound_stone_defaults())
end
-- CRAFTING -- CRAFTING