mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 12:01:06 +01:00
Make ladder placable on any solid block
This commit is contained in:
parent
95aadd40b9
commit
9657c9d8bb
1 changed files with 3 additions and 4 deletions
|
@ -40,7 +40,7 @@ end
|
||||||
minetest.register_node("mcl_core:ladder", {
|
minetest.register_node("mcl_core:ladder", {
|
||||||
description = S("Ladder"),
|
description = S("Ladder"),
|
||||||
_doc_items_longdesc = S(
|
_doc_items_longdesc = S(
|
||||||
"A piece of ladder which allows you to climb vertically. Ladders can only be placed on the side of solid blocks and not on glass, leaves, ice, slabs, glowstone, nor sea lanterns."),
|
"A piece of ladder which allows you to climb vertically. Ladders can only be placed on the side of solid blocks."),
|
||||||
drawtype = "signlike",
|
drawtype = "signlike",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
tiles = { "default_ladder.png" },
|
tiles = { "default_ladder.png" },
|
||||||
|
@ -85,9 +85,8 @@ minetest.register_node("mcl_core:ladder", {
|
||||||
end
|
end
|
||||||
local groups = def.groups
|
local groups = def.groups
|
||||||
|
|
||||||
-- Don't allow to place the ladder at particular nodes
|
-- Don't allow to place the ladder at non-solid nodes
|
||||||
if (groups and (groups.glass or groups.leaves or groups.slab)) or
|
if (groups and (not groups.solid)) then
|
||||||
node.name == "mcl_core:ladder" or node.name == "mcl_core:ice" or node.name == "mcl_nether:glowstone" or node.name == "mcl_ocean:sea_lantern" then
|
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue