mirror of
https://github.com/Sokomine/cottages.git
synced 2025-07-04 00:50:28 +02:00
fix public anvil support
This commit is contained in:
@ -2,9 +2,11 @@ local S = cottages.S
|
||||
|
||||
minetest.register_node("cottages:rope", {
|
||||
description = S("Rope"),
|
||||
tiles = {"cottages_rope.png"},
|
||||
tiles = { "cottages_rope.png" },
|
||||
groups = {
|
||||
snappy = 3, choppy = 3, oddly_breakable_by_hand = 3,
|
||||
snappy = 3,
|
||||
choppy = 3,
|
||||
oddly_breakable_by_hand = 3,
|
||||
},
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
@ -13,7 +15,7 @@ minetest.register_node("cottages:rope", {
|
||||
drawtype = "plantlike",
|
||||
is_ground_content = false,
|
||||
can_dig = function(pos, player)
|
||||
local below = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z})
|
||||
local below = minetest.get_node({ x = pos.x, y = pos.y - 1, z = pos.z })
|
||||
|
||||
if below.name == "cottages:rope" then
|
||||
if minetest.is_player(player) then
|
||||
@ -25,16 +27,16 @@ minetest.register_node("cottages:rope", {
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
if cottages.has.carts then
|
||||
local groups = table.copy(carts:get_rail_groups())
|
||||
groups.attached_node = 1
|
||||
groups.attached_node = 0
|
||||
carts:register_rail("cottages:ladder_with_rope_and_rail", {
|
||||
description = S("Ladder with \"rail support\""),
|
||||
description = S('Ladder with "rail support"'),
|
||||
tiles = {
|
||||
"default_ladder_wood.png^carts_rail_straight.png^cottages_rope.png"
|
||||
"default_ladder_wood.png^carts_rail_straight.png^cottages_rope.png",
|
||||
},
|
||||
inventory_image = "default_ladder_wood.png",
|
||||
wield_image = "default_ladder_wood.png",
|
||||
@ -43,15 +45,14 @@ if cottages.has.carts then
|
||||
paramtype2 = "wallmounted",
|
||||
legacy_wallmounted = true,
|
||||
}, {})
|
||||
|
||||
else
|
||||
minetest.register_node("cottages:ladder_with_rope_and_rail", {
|
||||
description = S("Ladder with \"rail support\""),
|
||||
description = S('Ladder with "rail support"'),
|
||||
inventory_image = "default_ladder_wood.png",
|
||||
wield_image = "default_ladder_wood.png",
|
||||
drawtype = "raillike",
|
||||
tiles = {
|
||||
"default_ladder_wood.png^carts_rail_straight.png^cottages_rope.png"
|
||||
"default_ladder_wood.png^carts_rail_straight.png^cottages_rope.png",
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
@ -63,9 +64,10 @@ else
|
||||
type = "wallmounted",
|
||||
},
|
||||
groups = {
|
||||
choppy = 2, oddly_breakable_by_hand = 3, rail = 1,
|
||||
choppy = 2,
|
||||
oddly_breakable_by_hand = 3,
|
||||
rail = 1,
|
||||
connect_to_raillike = minetest.raillike_group("rail"),
|
||||
attached_node = 1,
|
||||
},
|
||||
legacy_wallmounted = true,
|
||||
sounds = cottages.sounds.wood,
|
||||
|
Reference in New Issue
Block a user