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

@ -3,4 +3,5 @@ dye
stairs
clams
whiteshell?
colormachine?
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
@ -136,4 +154,4 @@ register_seacobble_craft("seacobble:seacobble_magenta", {'clams:crushedwhite', '
register_seacobble_craft("seacobble:seacobble_lime", {'clams:crushedwhite', 'default:cobble','dye:lime'})
register_seacobble_craft("seacobble:seacobble_aqua", {'clams:crushedwhite', 'default:cobble','dye:aqua'})
register_seacobble_craft("seacobble:seacobble_skyblue", {'clams:crushedwhite', 'default:cobble','dye:skyblue'})
register_seacobble_craft("seacobble:seacobble_redviolet", {'clams:crushedwhite', 'default:cobble','dye:redviolet'})
register_seacobble_craft("seacobble:seacobble_redviolet", {'clams:crushedwhite', 'default:cobble','dye:redviolet'})

View File

@ -3,4 +3,5 @@ dye
stairs
clams
stairsshine
colormachine?
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"},
@ -738,4 +737,4 @@ minetest.register_alias("clams:yellowlightglass","seaglass:seaglassoff_yellow")
minetest.register_alias("clams:redlightglass","seaglass:seaglassoff_red")
minetest.register_alias("clams:bluelightglass","seaglass:seaglassoff_blue")
minetest.register_alias("clams:whitelightglass","seaglass:seaglassoff_white")
minetest.register_alias("clams:blacklightglass","seaglass:seaglassoff_black")
minetest.register_alias("clams:blacklightglass","seaglass:seaglassoff_black")

View File

@ -3,4 +3,5 @@ dye
stairs
clams
whiteshell?
colormachine?
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
@ -178,4 +196,4 @@ register_seagravel_craft("seagravel:seagravel_magenta", {'clams:crushedwhite', '
register_seagravel_craft("seagravel:seagravel_lime", {'clams:crushedwhite', 'default:gravel','dye:lime'})
register_seagravel_craft("seagravel:seagravel_aqua", {'clams:crushedwhite', 'default:gravel','dye:aqua'})
register_seagravel_craft("seagravel:seagravel_skyblue", {'clams:crushedwhite', 'default:gravel','dye:skyblue'})
register_seagravel_craft("seagravel:seagravel_redviolet", {'clams:crushedwhite', 'default:gravel','dye:redviolet'})
register_seagravel_craft("seagravel:seagravel_redviolet", {'clams:crushedwhite', 'default:gravel','dye:redviolet'})

View File

@ -3,4 +3,5 @@ dye
stairs
clams
whiteshell?
colormachine?
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
@ -162,4 +180,4 @@ register_smoothblock_cooking("seastone:seastone_magenta", "seacobble:seacobble_m
register_smoothblock_cooking("seastone:seastone_lime", "seacobble:seacobble_lime")
register_smoothblock_cooking("seastone:seastone_aqua", "seacobble:seacobble_aqua")
register_smoothblock_cooking("seastone:seastone_skyblue", "seacobble:seacobble_skyblue")
register_smoothblock_cooking("seastone:seastone_redviolet", "seacobble:seacobble_redviolet")
register_smoothblock_cooking("seastone:seastone_redviolet", "seacobble:seacobble_redviolet")

View File

@ -1,4 +1,5 @@
default
stairs
seastone
colormachine?
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
@ -128,4 +146,4 @@ register_blockbrick_craft("seastonebrick:seastonebrick_magenta", {{'seastone:sea
register_blockbrick_craft("seastonebrick:seastonebrick_lime", {{'seastone:seastone_lime', 'seastone:seastone_lime'}, {'seastone:seastone_lime', 'seastone:seastone_lime'}})
register_blockbrick_craft("seastonebrick:seastonebrick_aqua", {{'seastone:seastone_aqua', 'seastone:seastone_aqua'}, {'seastone:seastone_aqua', 'seastone:seastone_aqua'}})
register_blockbrick_craft("seastonebrick:seastonebrick_skyblue", {{'seastone:seastone_skyblue', 'seastone:seastone_skyblue'}, {'seastone:seastone_skyblue', 'seastone:seastone_skyblue'}})
register_blockbrick_craft("seastonebrick:seastonebrick_redviolet", {{'seastone:seastone_redviolet', 'seastone:seastone_redviolet'}, {'seastone:seastone_redviolet', 'seastone:seastone_redviolet'}})
register_blockbrick_craft("seastonebrick:seastonebrick_redviolet", {{'seastone:seastone_redviolet', 'seastone:seastone_redviolet'}, {'seastone:seastone_redviolet', 'seastone:seastone_redviolet'}})