From 38eb8b8f59beb59efe5e2dc89fe22f5107b1db00 Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Fri, 31 May 2019 23:07:01 -0400 Subject: [PATCH] scan around the distribution node, if any, for connection targets --- simple.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/simple.lua b/simple.lua index e75f6cc..4db3e84 100644 --- a/simple.lua +++ b/simple.lua @@ -163,10 +163,6 @@ local function check_and_place(itemstack, placer, pointed_thing, pole, light, pa end - if distributor_node and needs_digiline_wire then - minetest.set_node(pos0, { name = distributor_node }) - end - if controls.sneak then minetest.set_node(pos1, { name = streetlights.concrete }) end @@ -187,6 +183,12 @@ local function check_and_place(itemstack, placer, pointed_thing, pole, light, pa if needs_digiline_wire and ilights.player_channels[playername] then minetest.get_meta(pos4):set_string("channel", ilights.player_channels[playername]) end + + if distributor_node and needs_digiline_wire then + minetest.set_node(pos0, { name = distributor_node }) + digilines.update_autoconnect(pos0) + end + end local poles_tab = {