mirror of
https://github.com/mt-mods/xcompat.git
synced 2025-07-13 14:00:32 +02:00
Added register stairs/slabs function
This commit is contained in:
@ -16,4 +16,62 @@ function functions.can_interact_with_node(player, pos)
|
||||
return false
|
||||
end
|
||||
|
||||
function functions.register_stairs_slabs(Name, BaseItem, Tiles, DigGroups, Sounds, StairName, SlabName)
|
||||
--skip if farlands as farlands reloaded uses diggroups to make stairs/slabs
|
||||
--if minetest.get_modpath("fl_core") then return end
|
||||
|
||||
|
||||
local LName = string.lower(Name)
|
||||
|
||||
|
||||
if minetest.global_exists("stairs") then
|
||||
if stairs.mod and stairs.mod == "redo" then
|
||||
stairs.register_all(
|
||||
LName,
|
||||
BaseItem,
|
||||
DigGroups,
|
||||
Tiles,
|
||||
Name,
|
||||
Sounds,
|
||||
--true/false world align texture
|
||||
true
|
||||
)
|
||||
else
|
||||
stairs.register_stair_and_slab(
|
||||
LName,
|
||||
BaseItem,
|
||||
DigGroups,
|
||||
Tiles,
|
||||
StairName,
|
||||
SlabName,
|
||||
Sounds
|
||||
)
|
||||
end
|
||||
elseif minetest.global_exists("stairsplus") then
|
||||
stairsplus:register_all(
|
||||
Name,
|
||||
Name,
|
||||
BaseItem,
|
||||
{
|
||||
description = Name,
|
||||
tiles = Tiles,
|
||||
groups = DigGroups,
|
||||
sounds = Sounds
|
||||
}
|
||||
)
|
||||
elseif minetest.global_exists("mcl_stairs") then
|
||||
--mcl_stairs.register_stair_and_slab(LName
|
||||
mcl_stairs.register_stair_and_slab(LName, {
|
||||
baseitem = BaseItem,
|
||||
--base_description = Name,
|
||||
description_stair = StairName,
|
||||
description_slab = SlabName,
|
||||
})
|
||||
elseif minetest.global_exists("fl_stairs") then
|
||||
minetest.override_item(BaseItem, {
|
||||
groups = {stairtable=1,},
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
return functions
|
Reference in New Issue
Block a user