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
whiteshell?
colormachine?
moreblocks?

View File

@ -60,56 +60,74 @@ minetest.register_node("seacobble:seacobble_redviolet", {
-- 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},
{"seacobble_seacobble.png"},
"Seacobble stair",
"Seacobble slab",
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},
{"seacobble_seacobble_cyan.png"},
"Seacobble stair cyan",
"Seacobble slab cyan",
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},
{"seacobble_seacobble_magenta.png"},
"Seacobble stair magenta",
"Seacobble slab magenta",
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},
{"seacobble_seacobble_lime.png"},
"Seacobble stair lime",
"Seacobble slab lime",
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},
{"seacobble_seacobble_aqua.png"},
"Seacobble stair aqua",
"Seacobble slab aqua",
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},
{"seacobble_seacobble_skyblue.png"},
"Seacobble stair skyblue ",
"Seacobble slab skyblue",
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},
{"seacobble_seacobble_redviolet.png"},
"Seacobble stair redviolet",
"Seacobble slab redviolet",
default.node_sound_stone_defaults())
end
-- CRAFTING

View File

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

View File

@ -160,7 +160,6 @@ minetest.register_node("seaglass:seaglassoff_black", {
-- STAIRS
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},
{"seaglass_seaglass.png"},

View File

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

View File

@ -81,8 +81,26 @@ minetest.register_node("seagravel:seagravel_redviolet", {
-- 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},
{"seagravel_seagravel.png"},
"Seagravel stair",
@ -92,7 +110,7 @@ stairs.register_stair_and_slab("seagravel", "seagravel:seagravel",
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},
{"seagravel_seagravel_cyan.png"},
"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},
}))
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},
{"seagravel_seagravel_magenta.png"},
"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},
}))
stairs.register_stair_and_slab("seagravel_lime", "seagravel:seagravel_lime",
stairs.register_stair_and_slab("seagravel_lime", "seagravel:seagravel_lime",
{cracky=3, stone=2},
{"seagravel_seagravel_lime.png"},
"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},
}))
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},
{"seagravel_seagravel_aqua.png"},
"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},
}))
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},
{"seagravel_seagravel_skyblue.png"},
"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},
}))
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},
{"seagravel_seagravel_redviolet.png"},
"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},
dug = {name="default_gravel_footstep", gain=1.0},
}))
end
-- CRAFTING

View File

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

View File

@ -67,56 +67,74 @@ minetest.register_node("seastone:seastone_redviolet", {
-- 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},
{"seastone_seastone.png"},
"Seastone stair",
"Seastone slab",
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},
{"seastone_seastone_cyan.png"},
"Seastone stair cyan",
"Seastone slab cyan",
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},
{"seastone_seastone_magenta.png"},
"Seastone stair magenta",
"Seastone slab magenta",
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},
{"seastone_seastone_lime.png"},
"Seastone stair lime",
"Seastone slab lime",
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},
{"seastone_seastone_aqua.png"},
"Seastone stair aqua",
"Seastone slab aqua",
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},
{"seastone_seastone_skyblue.png"},
"Seastone stair skyblue ",
"Seastone slab skyblue",
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},
{"seastone_seastone_redviolet.png"},
"Seastone stair redviolet",
"Seastone slab redviolet",
default.node_sound_stone_defaults())
end
-- CRAFTING

View File

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

View File

@ -61,56 +61,74 @@ minetest.register_node("seastonebrick:seastonebrick_redviolet", {
-- 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},
{"seastonebrick_seastonebrick.png"},
"Seastonebrick stair",
"Seastonebrick slab",
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},
{"seastonebrick_seastonebrick_cyan.png"},
"Seastonebrick stair cyan",
"Seastonebrick slab cyan",
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},
{"seastonebrick_seastonebrick_magenta.png"},
"Seastonebrick stair magenta",
"Seastonebrick slab magenta",
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},
{"seastonebrick_seastonebrick_lime.png"},
"Seastonebrick stair lime",
"Seastonebrick slab lime",
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},
{"seastonebrick_seastonebrick_aqua.png"},
"Seastonebrick stair aqua",
"Seastonebrick slab aqua",
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},
{"seastonebrick_seastonebrick_skyblue.png"},
"Seastonebrick stair skyblue ",
"Seastonebrick slab skyblue",
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},
{"seastonebrick_seastonebrick_redviolet.png"},
"Seastonebrick stair redviolet",
"Seastonebrick slab redviolet",
default.node_sound_stone_defaults())
end
-- CRAFTING