Skip to content

Commit

Permalink
v0.10.2: heavy handed destroying cloned signals
Browse files Browse the repository at this point in the history
  • Loading branch information
Troels Bjerre Lund committed Mar 22, 2019
1 parent 787197f commit f6f19c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 = {}
Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit f6f19c1

Please sign in to comment.