From 470774008a106e52a2a09171f9a7e79c215d8ec7 Mon Sep 17 00:00:00 2001 From: flux <25628292+fluxionary@users.noreply.github.com> Date: Sat, 31 Dec 2022 09:27:35 -0800 Subject: [PATCH] trigger pipeworks visual connection when placing a shared chest next to a pipe --- init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index cf9807d..c35ca22 100644 --- a/init.lua +++ b/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)