Open Quintovir opened 3 years ago
I can confirm the issue.
Without UPS:
With UPS:
The problem appears to be in how UPS charges are consumed: via the crafting inventory, that currently has to be recreated every turn, and which is based on the inventory
class that copies items:
I think the solution would be to replace crafting inventory with the new lightweight class temp_crafting_inventory
(introduced in #46286). To reduce the scope, as a temporary solution, instead of replacing crafting_inventory
everywhere, it can only be replaced inside the Character::use_charges
method.
Alternative approach could be to add separate cache for USP items near the player that could be used by Character::use_charges
method.
Seems to be caused by/related to #45781
Describe the bug
Time compressed activities are slower when carrying/wearing switched on tools and clothes (does not matter if you are wearing them) that have been modified with UPS conversion mods compared to ones using removable batteries for: cellphone (UPS) combat exoskeleton field combat exoskeleton flashlight (UPS) electric blanket (UPS) geiger counter (UPS) "turn continuous scan on" headlamp (UPS) heavy duty exoskeleton heavy duty flashlight (UPS) mp3 player (UPS) laptop computer (UPS) pair of thermal electric gloves (UPS) radio (UPS) "the UPS radio lost the ability to scan for stations" reading light (UPS) smart lamp (UPS) smartphone (UPS) "music and/or light" survivor headlamp (UPS) thermal electric balaclava (UPS) thermal electric outfit (UPS) thermal electric suit (UPS)
All these items share the ability to be manually switched on/off. Using UPS items that are used as needed (soldering iron, arc welder, etc) don't seem to affect the speed of time compressed activities. There's probably other UPS converted/powered items with manual switches that I missed that also cause time compressed activities to slow down.
Steps To Reproduce
Expected behavior
Compressed activities while carrying/wearing switched on UPS converted tools and clothes should progress the time about as fast as when using switched on tools/clothes using removable batteries.
Screenshots
N/A
Versions and configuration
Additional context
Save game with the mentioned tools in the inventory or on the floor. There are plenty of materials in the vicinity to use.
Champlin.zip