CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.68k stars 4.19k forks source link

[MoM] Electron Overflow charges disposable batteries #75282

Open Terrorforge opened 4 months ago

Terrorforge commented 4 months ago

Describe the bug

If a disposable battery is loaded into a device with one of the flags Electron Overflow checks for, such as ELECTROKINETIC_CHARGEABLE, Electron Overflow will recharge that battery.

I presume this is also true of other non-rechargeable batteries, such as dry cells.

Attach save file

New Mind-trimmed.tar.gz

Steps to reproduce

  1. Learn Electron Overflow
  2. Discharge a disposable battery
  3. Load the battery into a device with RECHARGE, ELECTRONIC or ELECTROKINETIC_CHARGEABLE
  4. Activate Electron Overflow
  5. Wait

Expected behavior

Non-rechargeable batteries cannot be recharged.

Screenshots

image Note that both the battery in the headlamp and in the inventory are at less than 300

image After waiting 5 minutes with Electron overflow active, the loose disposable battery hasn't gained any charge, as expected, but the one in the headlamp is fully charged.

Versions and configuration

Additional context

The ideal solution here would be if Electron Overflow acted directly on the battery in the magazine well instead of having to bother checking if the tool itself is rechargeable, as that would also mean there was no need to extend items with the ELECTROKINETIC_CHARGEABLE flag, but I presume the reason it's set up the way it is is because that's not possible.

Standing-Storm commented 4 months ago

I presume the reason it's set up the way it is is because that's not possible.

Unfortunately (as far as I know) you are correct.