Fixes milk runtime in on_mob_life() (and maybe other reagents) #5327
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About the pull request
Seen this runtime a couple of times now with milk specifically. But this situation I believe could also occur in other
reagent/on_mob_life()
holder
being null can occur if we qdel the reagent duringremove_reagent()
and we then try to call procs on the now null holder further down the thread ofon_mob_life()
. We now check again if!holder
after callingremove_reagent()
at/datum/reagent
level which will cause us to return early inon_mob_life()
which should call parent when implemented and not operate on a nullholder
Explain why it's good for the game
Testing Photographs and Procedure
Screenshots & Videos
Put screenshots and videos here with an empty line between the screenshots and the
<details>
tags.Changelog
🆑
fix: Runtime with milk and possibly other reagent's on_mob_life()
/:cl: