remijouannet / graftorio2

(fork of graftorio) factorio mod for creating grafana dashboard
MIT License
77 stars 21 forks source link

Power poles do not restore copper connections after being destroyed #20

Closed anpavlov closed 1 year ago

anpavlov commented 1 year ago

When power pole get destroyed by biter or weapon and ghost entity is created, the ghost entity does not show previously existing connections of copper cable and thus not restoring them when pole is built again

https://user-images.githubusercontent.com/10996983/197990503-37141f43-d1fb-4c65-af4b-168f972063fc.mp4

anpavlov commented 1 year ago

By deactivating mods one by one, found it is a graftorio2 issue

marimelon commented 1 year ago

https://github.com/remijouannet/graftorio2/blob/fb0b352fd8a215db335fa1a1e99454f5ee6c40fc/power.lua#L113-L116

remijouannet commented 1 year ago

i think the bug is on_power_destroy should not treat the entity the same way if it was "kill" or "destroy", i need to find something in the Lua API that tells me if the entity was kill or destroy

remijouannet commented 1 year ago

should be fix in 0.0.18

Capture d’écran 2022-11-18 à 19 03 09