forked from mtcontrib/chesttools
trigger pipeworks visual connection when placing a shared chest next to a pipe
This commit is contained in:
parent
d1093fe448
commit
470774008a
6
init.lua
6
init.lua
@ -41,7 +41,8 @@ chesttools.chest_add.tube = {};
|
||||
|
||||
-- additional/changed definitions for pipeworks;
|
||||
-- taken from pipeworks/compat.lua
|
||||
if( minetest.get_modpath( 'pipeworks' )) then
|
||||
local has_pipeworks = minetest.get_modpath( 'pipeworks' )
|
||||
if( has_pipeworks ) then
|
||||
chesttools.chest_add.tiles = {
|
||||
"chesttools_blue_chest_top.png^pipeworks_tube_connection_wooden.png",
|
||||
"chesttools_blue_chest_top.png^pipeworks_tube_connection_wooden.png",
|
||||
@ -456,6 +457,9 @@ minetest.register_node( 'chesttools:shared_chest', {
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("owner", placer:get_player_name() or "")
|
||||
meta:set_string("infotext", "Shared Chest (owned by "..meta:get_string("owner")..")")
|
||||
if has_pipeworks then
|
||||
pipeworks.after_place(pos)
|
||||
end
|
||||
end,
|
||||
|
||||
on_construct = function(pos)
|
||||
|
Loading…
Reference in New Issue
Block a user