summaryrefslogtreecommitdiff
path: root/nodes_mining.lua
diff options
context:
space:
mode:
authorh-v-smacker <hans-von-smacker+github@gmail.com>2018-07-15 02:24:40 +0300
committerh-v-smacker <hans-von-smacker+github@gmail.com>2018-07-15 02:24:40 +0300
commitdb05f23b54d775d7f0de1618c80aeb9938896d91 (patch)
treebd302ceeeff777001437ea43e9324d41de08043c /nodes_mining.lua
parent0539c2123cdb75610d8d6c4d8ac35491b1dd480e (diff)
formspec fixes and cleanup
Diffstat (limited to 'nodes_mining.lua')
-rw-r--r--nodes_mining.lua30
1 files changed, 15 insertions, 15 deletions
diff --git a/nodes_mining.lua b/nodes_mining.lua
index 297af3e..a8a5763 100644
--- a/nodes_mining.lua
+++ b/nodes_mining.lua
@@ -7,26 +7,26 @@ local S = cottages.S
-- the rope can only be digged if there is no further rope above it;
-- Note: This rope also counts as a rail node; thus, carts can move through it
minetest.register_node("cottages:rope", {
- description = S("Rope for climbing"),
- tiles = {"cottages_rope.png"},
+ description = S("Rope for climbing"),
+ tiles = {"cottages_rope.png"},
groups = {snappy=3,choppy=3,oddly_breakable_by_hand=3,rail=1,connect_to_raillike=1},--connect_to_raillike=minetest.raillike_group("rail")},
- walkable = false,
- climbable = true,
- paramtype = "light",
- sunlight_propagates = true,
- drawtype = "plantlike",
+ walkable = false,
+ climbable = true,
+ paramtype = "light",
+ sunlight_propagates = true,
+ 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});
- if( below and below.name and below.name == "cottages:rope" ) then
- if( player ) then
- minetest.chat_send_player( player:get_player_name(),
- 'The entire rope would be too heavy. Start digging at its lowest end!');
- end
- return false;
+ local below = minetest.get_node( {x=pos.x, y=pos.y-1, z=pos.z});
+ if( below and below.name and below.name == "cottages:rope" ) then
+ if( player ) then
+ minetest.chat_send_player( player:get_player_name(),
+ 'The entire rope would be too heavy. Start digging at its lowest end!');
end
- return true;
+ return false;
end
+ return true;
+ end
})
minetest.register_craft({