-
Notifications
You must be signed in to change notification settings - Fork 269
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
fix: Grenade rework #5297
fix: Grenade rework #5297
Conversation
Redoes the logic used by grenade/incendiary/granade iuse actions. Stuck on the inability to destroy a grenade item in the `iuse_actor` functions
Reworks how `process_tool` handles items running out of charges. It's a bit hacky, so a comment has been applied Should work once I merge from upstream, right now it's coming up with curious blocking errors I've never seen in my life
I screwed something up somehow. |
Oh, never mind, I was building on a test build for reworking our active item cache. Look forward to that next PR. |
Oh hecc, lemme see... |
I live. I can test this then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compiled, tested, it does what it says it does. Screenshots in previous comment.
I got interrupted by offline errands before I could fully playtest, but can at least confirm compile-test worked fine, so. :> |
Checklist
Required
main
so it won't cause conflict when updatingmain
branch later.Purpose of change
active_item_cache
is handled, it's had an issue apparently for at least 5/6 years that made it process an extra item on it's "list" every turn, desyncing the active list and meaning that if a single active explosive was on a tile it would be processed twice per turn.Describe the solution
process_tool
code.This has hit a snag that I am commiserating with @joveeater on, as theReworked so that for now it doesn't require this, but it's a hack, detailed in the code.explosion_iuse::use
function is incapable of destroying the item it is called on due to howprocess_internal
code functions.get_for_processing()
wherenum_to_process
is checking for>= 0
instead of> 0
Apparently this was used for food item processing, but that has been updated to not be broken by me.Describe alternatives you've considered
Testing
Additional context