summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2014-01-01 23:14:27 -0500
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2014-01-01 23:14:27 -0500
commit1dc741002439807dc10dad5d141dd971dbbc312f (patch)
tree2cfb47ebf4465e209fd6673f40ae49a6789d8e17
parentea32144950c96be595f7489089edb3cb44815217 (diff)
downloadpipeworks-1dc741002439807dc10dad5d141dd971dbbc312f.tar
pipeworks-1dc741002439807dc10dad5d141dd971dbbc312f.tar.gz
pipeworks-1dc741002439807dc10dad5d141dd971dbbc312f.tar.bz2
pipeworks-1dc741002439807dc10dad5d141dd971dbbc312f.tar.xz
pipeworks-1dc741002439807dc10dad5d141dd971dbbc312f.zip
fix missing wield/inventory image on "compatibility" tubes
gave them fuller node defs with descriptions et al. also and made them directly call the scan-for-tube-objects function when placed.
-rw-r--r--tubes.lua23
1 files changed, 17 insertions, 6 deletions
diff --git a/tubes.lua b/tubes.lua
index e176c7a..fc45752 100644
--- a/tubes.lua
+++ b/tubes.lua
@@ -174,12 +174,23 @@ pipeworks.register_tube = function(name, desc, plain, noctrs, ends, short, inv,
if REGISTER_COMPATIBILITY then
local cname = name.."_compatibility"
minetest.register_node(cname, {
- drawtype = "airlike",
- style = "6d",
- basename = name,
- groups = {not_in_creative_inventory = 1, tube_to_update = 1},
- tube = {connect_sides = {front = 1, back = 1, left = 1, right = 1, top = 1, bottom = 1}},
- drop = name.."_1",
+ drawtype = "airlike",
+ style = "6d",
+ basename = name,
+ inventory_image = inv,
+ wield_image = inv,
+ paramtype = light,
+ sunlight_propagates = true,
+ description = "Pneumatic tube segment (legacy)",
+ after_place_node = function(pos)
+ pipeworks.scan_for_tube_objects(pos)
+ if minetest.registered_nodes[name.."_compatibility"].after_place_node_ then
+ minetest.registered_nodes[name.."_compatibility"].after_place_node_(pos)
+ end
+ end,
+ groups = {not_in_creative_inventory = 1, tube_to_update = 1},
+ tube = {connect_sides = {front = 1, back = 1, left = 1, right = 1, top = 1, bottom = 1}},
+ drop = name.."_1",
})
table.insert(pipeworks.tubenodes,cname)
for xm = 0, 1 do