diff --git a/Makefile b/Makefile index 2430b76..81a2c0f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ #factorio/bin/x64/factorio --graphics-quality low --video-memory-usage low --load-game factoriofast/saves/_autosave2.zip --threads 4 +#/Applications/Factorio.app/Contents/MacOS/factorio --graphics-quality low --video-memory-usage low --threads 4 VERSION=$$(git describe --abbrev=0 --tags) diff --git a/power.lua b/power.lua index e6e3e5d..73f724a 100644 --- a/power.lua +++ b/power.lua @@ -111,8 +111,8 @@ function on_power_destroy(event) local networks = script_data.networks local current_idx = entity.electric_network_id -- Make sure to create the new network ids before collecting new info - if entity.neighbours.copper then - entity.disconnect_neighbour() + if entity.neighbours.copper and event.damage_type == nil then + entity.disconnect_neighbour() end local finds = surface.find_entities_filtered({type = "electric-pole", area = area}) for _, new_entity in pairs(finds) do