CleverRaven / Cataclysm-DDA

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

Survivor headlamp does not work when converted to UPS #42349

Closed ektoplazm closed 4 years ago

ektoplazm commented 4 years ago

Describe the bug

Survivor headlamp does not work when converted to UPS power source, the non-converted option (with a light battery) works fine

Steps To Reproduce

  1. Spawn a survivor headlamp
  2. Convert it to UPS
  3. Activate the headlamp
  4. The headlamp is shown as activated, but there does not actually become a light source

Expected behavior

The headlamp works

Screenshots

image

Versions and configuration

Additional context

andrei8l commented 4 years ago

Part of the reason is that the UPS mod doesn't add a battery well. I've solved that issue but noticed that player::process_items is actually a mess so I'm trying to simplify that. You can use the commit above in the meantime