Skip to content
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

[MIRROR] Splits reagent metabolization from reagent effects. #733

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

Steals-The-PRs
Copy link
Collaborator

Mirrored on Skyrat: Skyrat-SS13/Skyrat-tg#25125
Original PR: tgstation/tgstation#79314

About The Pull Request

I've separated the instructions responsible for gradually removing reagents from a living holder from the main on_mob_life and on_mob_dead procs, and made sure they're run after them.

I've done a fair bit of early returns as well.

Why It's Good For The Game

The problem here is that most reagents will eventually be deleted before on_mob_life and on_mob_dead have finished running, since the statements that handle the reagent removal are found within parent calls that are often called at the start of the different definitions of the proc . To make it easier to understand, here's a simplified chain of events:

holder.metabolize_reagent -> the parent call of reagent.on_mob_life -> holder.remove_reagent -> holder.update_total -> reagent.on_mob_end_metabolizate -> reagent.on_mob_delete -> qdel(reagent) -> the actual reagent.on_mob_life

Basically, the reagent is getting deleted before it has finished "ticking", and that's bad, simple as that.

Also, by separating these instructions from the rest, we won't have to enforce any such nuisance as return ..() || need_mob_update.

TL;DR: This fixes #79267.

Changelog

🆑 Ghommie
fix: Fixed the infinite growth serum exploit.
fix: Fixed generic nutriment processing even when dead.
/:cl:

…ORE] (#25125)

* Splits reagent metabolization from reagent effects.

* Update alcohol_reagents.dm

---------

Co-authored-by: Ghom <[email protected]>
Co-authored-by: Giz <[email protected]>
@Iajret Iajret merged commit 8681f06 into master Nov 20, 2023
24 checks passed
@Iajret Iajret deleted the upstream-mirror-25125 branch November 20, 2023 13:20
AnywayFarus added a commit that referenced this pull request Nov 20, 2023
Iajret pushed a commit that referenced this pull request Feb 1, 2024
* Exosuit-mounted RCD now works like the handheld version (#81162)

## About The Pull Request

This gives the mounted RCD the same functionality as the handheld
version, from upgrades to destruction scanning. Upgrades can be
installed by using them on either the mech or the equipment item, and
both the scanner and RCD menu can be accessed in the equipment's menu.
Because mechs don't have different left/right click actions,
deconstructing is toggled in the menu as well.


![image](https://github.com/tgstation/tgstation/assets/93578146/8cdc4ddb-4741-4128-8f95-167c165fd670)

## Why It's Good For The Game

Gives exosuits more things to do that aren't combat-related, which I
feel is lacking currently.

## Changelog
:cl:
add: Exosuit-mounted RCDs now have the same functionality as the
handheld version.
/:cl:

* Exosuit-mounted RCD now works like the handheld version

---------

Co-authored-by: SapphicOverload <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants