trigger pipeworks visual connection when placing a shared chest next to a pipe

This commit is contained in:
flux 2022-12-31 09:27:35 -08:00
parent d1093fe448
commit 470774008a
No known key found for this signature in database
GPG Key ID: 9333B27816848A15
1 changed files with 5 additions and 1 deletions

View File

@ -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)