Fix support for stairsplus.

This commit is contained in:
sys4-fr 2018-10-02 21:34:37 +02:00
parent 1c5dca224d
commit 7da66f5222

View File

@ -68,21 +68,6 @@ minetest.register_node("quartz:pillar", {
on_place = minetest.rotate_node
})
-- Stairs & Slabs
stairs.register_stair_and_slab("quartzblock", "quartz:block",
{cracky=3, oddly_breakable_by_hand=1},
{"quartz_block.png"},
S("Quartz stair"),
S("Quartz slab"),
default.node_sound_glass_defaults())
stairs.register_stair_and_slab("quartzstair", "quartz:pillar",
{cracky=3, oddly_breakable_by_hand=1},
{"quartz_pillar_top.png", "quartz_pillar_top.png", "quartz_pillar_side.png"},
S("Quartz Pillar stair"),
S("Quartz Pillar slab"),
default.node_sound_glass_defaults())
--
-- Crafting
--
@ -157,34 +142,39 @@ minetest.register_abm({
-- Compatibility with stairsplus
--
if minetest.get_modpath("moreblocks") and settings:get_bool("ENABLE_STAIRSPLUS") then
register_stair_slab_panel_micro("quartz", "block", "quartz:block",
{cracky=3},
if minetest.get_modpath("moreblocks") then
local nodename = "quartz:block"
local ndef = table.copy(minetest.registered_nodes[nodename])
ndef.sunlight_propagates = true
ndef.place_param2 = nil
stairsplus:register_all("quartz", "block", nodename, ndef)
nodename = "quartz:chiseled"
ndef = table.copy(minetest.registered_nodes[nodename])
ndef.sunlight_propagates = true
ndef.place_param2 = nil
stairsplus:register_all("quartz", "chiseled", nodename, ndef)
nodename = "quartz:pillar"
ndef = table.copy(minetest.registered_nodes[nodename])
ndef.sunlight_propagates = true
ndef.place_param2 = nil
stairsplus:register_all("quartz", "pillar", nodename, ndef)
else
-- Stairs & Slabs
stairs.register_stair_and_slab("quartzblock", "quartz:block",
{cracky=3, oddly_breakable_by_hand=1},
{"quartz_block.png"},
"Quartz Block",
"block",
0
)
S("Quartz stair"),
S("Quartz slab"),
default.node_sound_glass_defaults())
register_stair_slab_panel_micro("quartz", "chiseled", "quartz:chiseled",
{cracky=3},
{"quartz_chiseled.png"},
"Chiseled Quartz",
"chiseled",
0
)
register_stair_slab_panel_micro("quartz", "pillar", "quartz:pillar",
{cracky=3},
stairs.register_stair_and_slab("quartzstair", "quartz:pillar",
{cracky=3, oddly_breakable_by_hand=1},
{"quartz_pillar_top.png", "quartz_pillar_top.png", "quartz_pillar_side.png"},
"Quartz Pillar",
"pillar",
0
)
table.insert(circular_saw.known_stairs, "quartz:block")
table.insert(circular_saw.known_stairs, "quartz:chiseled")
table.insert(circular_saw.known_stairs, "quartz:pillar")
S("Quartz Pillar stair"),
S("Quartz Pillar slab"),
default.node_sound_glass_defaults())
end
--