Page 1 of 1

[1.1.94] Passive battery drain while modular armor is unequipped (modded)

Posted: Wed Nov 08, 2023 6:33 pm
by Oryalo
Hello,

This issue only manifests when using equipment that has passive power drain. There is no such equipment in the base game and so this problem is not visible, but when using modded equipment (such as energy shields in Space Exploration), the problem appears and, to my understanding, is caused by base game behavior.

I've provided a sandbox mode save to help reproduce this. It contains the mod required to manifest the behavior.

Steps to reproduce:
1. Equip a Modular Armor.
2. In the Modular Armor grid, equip one Personal Battery, one Energy Shield Mk3 (modded Space Exploration item with passive power drain), and 19 Portable Solar Panels to generate power.
3. Wait until the shield and battery are charged to 100%.
4. Unequip Modular Armor, leave it in inventory, and wait idle and un-paused for 2 minutes.
5. Re-equip Modular Armor.

Expected behavior: Battery is at 100%, the same level it was before unequipping it.
Observed behavior: Battery is already discharged to 60%. Discharge is proportional to wait time, indicating that the battery has been discharging while unequipped.

Thank you in advance! :D

Re: [1.1.94] Passive battery drain while modular armor is unequipped (modded)

Posted: Wed Nov 08, 2023 6:47 pm
by Wiwiweb
The thing that made me think this was unintended Factorio behavior is that it's inconsistent with energy generators.

Equipments with passive energy generation in unequipped armors stop producing energy.
But equipments with passive energy drain in unequipped armors continue draining energy.

Re: [1.1.94] Passive battery drain while modular armor is unequipped (modded)

Posted: Thu Nov 09, 2023 7:41 pm
by Rseding91
Thanks for the report. I've changed it for 2.0 so it won't do the electric drain/transfer logic when armor is not equipped.

Re: [1.1.94] Passive battery drain while modular armor is unequipped (modded)

Posted: Fri Nov 10, 2023 12:32 pm
by Oryalo
Thank you very much for the speedy fix :)

Have a great day.