From f6f19c1a35b29bd10421e0760d81007a7e3c18f4 Mon Sep 17 00:00:00 2001 From: Troels Bjerre Lund Date: Fri, 22 Mar 2019 22:35:08 +0100 Subject: [PATCH] v0.10.2: heavy handed destroying cloned signals --- control.lua | 7 +++++++ info.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/control.lua b/control.lua index 2b9366b..a9aa30d 100644 --- a/control.lua +++ b/control.lua @@ -339,6 +339,12 @@ local function on_configuration_changed(event) end end +local function on_entity_cloned(event) + if event.destination.name == "bottleneck-stoplight" then + event.destination.destroy() + end +end + --[[ Hotkey ]]-- local function on_hotkey(event) @@ -370,6 +376,7 @@ local add_events = {e.on_built_entity, e.on_robot_built_entity, e.script_raised_ script.on_event(remove_events, remove_signal) script.on_event(add_events, built) script.on_event("bottleneck-hotkey", on_hotkey) +script.on_event({e.on_entity_cloned}, on_entity_cloned) --[[ Setup remote interface]]-- local interface = {} diff --git a/info.json b/info.json index 59fb63a..96eec4a 100644 --- a/info.json +++ b/info.json @@ -1,7 +1,7 @@ { "name":"Bottleneck", "author":"Troels Bjerre Lund", - "version":"0.10.1", + "version":"0.10.2", "factorio_version": "0.17", "title":"Bottleneck", "homepage":"https://forums.factorio.com/viewtopic.php?f=144&t=28817",