Page 1 of 1

[1.1.27] cross-surface electric networks with solar panels produce wrong energy

Posted: Thu Mar 11, 2021 3:23 pm
by Honktown
Weird behavior: Daytime changes on either (any?) surface seems to modify the solar panel production for a cross-surface network.

Steps to reproduce:
1. two surfaces, one small-electric-pole on each for simplicity
2. connect:
command
3. place solar panels on one surface
4. accumulators on other
5. Change daytime on either surface e.g.:

Code: Select all

/c game.surfaces.nauvis2.daytime = .5
Result:
If you are on surface 2:
Changing surface 1, the solar panels stop producing power on the entity. (switched back to surface with editor) The network is still producing power.
Changing surface 2, the network shows 0 solar power even though the solar panels aren't there, and the panels on surface 1 still show power.

If you are on surface 1:
Same as above, so maybe there's a build-order dependence to the behavior?

Save prepared:
solar_surfaces.zip
(640.13 KiB) Downloaded 96 times
weird_solar.jpg
weird_solar.jpg (473.86 KiB) Viewed 4304 times

Re: [1.1.27] cross-surface electric networks with solar panels produce wrong energy

Posted: Thu Mar 11, 2021 4:11 pm
by Rseding91
Thanks for the report. Unfortunately that's a side effect of using this feature that isn't likely to ever change.

Re: [1.1.27] cross-surface electric networks with solar panels produce wrong energy

Posted: Fri Apr 15, 2022 9:33 am
by boskid
This issue will be fixed in 1.2

Re: [1.1.27] cross-surface electric networks with solar panels produce wrong energy

Posted: Fri Apr 15, 2022 9:53 am
by Qon
Is this a clue for what will come in the expansion? ;)

I'm happy for improved surface connection support. It's such a cool feature and the mods it has brought are some of the coolest ones ever :)
Thanks anyways for always making Factorio better and better! <3

Re: [1.1.27] cross-surface electric networks with solar panels produce wrong energy

Posted: Fri Apr 15, 2022 10:10 am
by boskid
No, i was simply doing code cleanup because an ElectricNetwork had a surfaceIndex and i wanted to get rid of this. There were exactly 3 places that were using the surfaceIndex and all 3 of them were broken: solar panels were using that surfaceIndex to obtain a daytime, lamps were using that surfaceIndex to also obtain daytime, and drawing of electric network lines in chart view was using this to filter which networks to draw.

Re: [1.1.27] cross-surface electric networks with solar panels produce wrong energy

Posted: Thu Mar 30, 2023 2:17 pm
by boskid
Ok. Fixes for all 3 issues (solar panels, lamps, electric wires on chart) were backported and will be available in 1.1.79.