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,7 +60,25 @@ minetest.register_node("seacobble:seacobble_redviolet", {
-- STAIRS
local colors = {"", "cyan", "magenta", "lime", "aqua", "skyblue", "redviolet"}
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"},
@ -109,7 +127,7 @@ stairs.register_stair_and_slab("seacobble_redviolet", "seacobble:seacobble_redvi
"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,7 +81,25 @@ minetest.register_node("seagravel:seagravel_redviolet", {
-- STAIRS
local colors = {"", "cyan", "magenta", "lime", "aqua", "skyblue", "redviolet"}
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"},
@ -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,7 +67,25 @@ minetest.register_node("seastone:seastone_redviolet", {
-- STAIRS
local colors = {"", "cyan", "magenta", "lime", "aqua", "skyblue", "redviolet"}
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"},
@ -116,7 +134,7 @@ stairs.register_stair_and_slab("seastone_redviolet", "seastone:seastone_redviole
"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,7 +61,25 @@ minetest.register_node("seastonebrick:seastonebrick_redviolet", {
-- STAIRS
local colors = {"", "cyan", "magenta", "lime", "aqua", "skyblue", "redviolet"}
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"},
@ -110,7 +128,7 @@ stairs.register_stair_and_slab("seastonebrick_redviolet", "seastonebrick:seaston
"Seastonebrick stair redviolet",
"Seastonebrick slab redviolet",
default.node_sound_stone_defaults())
end
-- CRAFTING