summaryrefslogtreecommitdiff
path: root/ropes/ropeboxes.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-06-16 18:12:21 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-06-16 18:12:21 -0400
commit75e0a665ce2a45e1158a427d3f70f854f5f4d5a8 (patch)
tree881209e2c8f7efcbce69482bc3caa19b4828e290 /ropes/ropeboxes.lua
parentb8cd2f723c7c9079e631d7a4078862ff47b24915 (diff)
downloaddreambuilder_modpack-75e0a665ce2a45e1158a427d3f70f854f5f4d5a8.tar
dreambuilder_modpack-75e0a665ce2a45e1158a427d3f70f854f5f4d5a8.tar.gz
dreambuilder_modpack-75e0a665ce2a45e1158a427d3f70f854f5f4d5a8.tar.bz2
dreambuilder_modpack-75e0a665ce2a45e1158a427d3f70f854f5f4d5a8.tar.xz
dreambuilder_modpack-75e0a665ce2a45e1158a427d3f70f854f5f4d5a8.zip
Updated several mods for Minetest 0.4.16
castles modpack, areas, biome_lib, blox, boost_cart, plantlife modpack caverealms, coloredwood, concrete, currency, farming redo, home decor, ilights, mesecons, moreores, pipeworks, signs_lib, technic, unified inventory unified bricks, unified dyes, worldedit, and xban2
Diffstat (limited to 'ropes/ropeboxes.lua')
-rw-r--r--ropes/ropeboxes.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/ropes/ropeboxes.lua b/ropes/ropeboxes.lua
index 676f1c2..626b158 100644
--- a/ropes/ropeboxes.lua
+++ b/ropes/ropeboxes.lua
@@ -134,6 +134,17 @@ local function register_rope_block(multiple, max_multiple, name_prefix, node_pre
selection_box = {type="regular"},
collision_box = {type="regular"},
groups = {choppy=2, oddly_breakable_by_hand=1, rope_block = 1},
+
+ on_place = function(itemstack, placer, pointed_thing)
+ if pointed_thing.type == "node" then
+ local target_node = minetest.get_node(pointed_thing.under)
+ local target_def = minetest.registered_nodes[target_node.name]
+ if target_def.walkable == false then
+ return itemstack
+ end
+ end
+ return minetest.item_place(itemstack, placer, pointed_thing)
+ end,
after_place_node = function(pos, placer)
local pos_below = {x=pos.x, y=pos.y-1, z=pos.z}