Merge pull request #5 from fluxionary/pipeworks_connect

trigger pipeworks visual connection when placing a shared chest next to a pipe
This commit is contained in:
Sokomine 2023-01-22 22:37:29 +01:00 committed by GitHub
commit 435b8cdda5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -44,7 +44,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.chest_add.tiles[1].."^pipeworks_tube_connection_wooden.png",
chesttools.chest_add.tiles[1].."^pipeworks_tube_connection_wooden.png",
@ -481,6 +482,9 @@ chesttools.register_chest = function(node_name, desc, name, paramtype2, palette,
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)