-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UPS-modded lights do not work #31377
Comments
Root cause of the bug appears to be that item::ammo_remaining() doesn't take the USE_UPS flag into account when doing the initial ammo check. Curious, since many other UPS powered tools work, but my guess is that because flashlights don't have a special iuse, they're treated differently. I'll have to be careful here. |
Probably related -UPS toolmod fails to work with not only things such as lights, but also things like mp3 player, thermal electric outfit or soldering iron (and probably many others), saying that there are no charges... at least when using UPS bionic. Haven't tested with UPS wearable battery yet. Yet electric jackhammer or guns with pre-installed UPS work just fine. |
Am encountering the same issue with wearable UPS. Also in the latest build (9170), the game crashes if I examine a vehicle recharging station with a UPS modded tool in it. |
That crash is likely not directly related to this bug, but is likely to be more due to the ammo changes going around. Please file a seperate report on that. |
A heads-up: I have not forgotten about this issue. It looks like there is an existing function that should work for the situations that we need called |
Also, for my own reference, because I forgot earlier. For flashlights specifically, look at the iuse_actor's transform method for an entry point for this fix. |
Someone on reddit claims to have solved this. Will investigate. |
Describe the bug
Lighting tools that have been modded to use UPS charges don't work. In 0.D stable, this wasn't so much an issue, as they'd slowly recharge. Now they just plain do not work.
Steps To Reproduce
Expected behavior
The flashlight shines and drains the UPS
Screenshots
If applicable, add screenshots to help explain your problem.
Versions and configuration
Dark Days Ahead [dda],
Disable NPC Needs [no_npc_food]
]
Additional context
So, I was toodling around with UPS modded tools in an effort to try to understand how they work, and it looks like flashlights are some sort of black sheep. I don't understand how flashlights work in the game code at all.
The text was updated successfully, but these errors were encountered: