Skip to content

Prevent Garlic Oil from being poison#5314

Open
Typhin wants to merge 1 commit intoNebulaSS13:devfrom
Typhin:stable
Open

Prevent Garlic Oil from being poison#5314
Typhin wants to merge 1 commit intoNebulaSS13:devfrom
Typhin:stable

Conversation

@Typhin
Copy link
Contributor

@Typhin Typhin commented Mar 22, 2026

Description of changes

Tags garlic oil as injectable_nutrition. Because this causes adjust_mob_nutrition() to get called twice, nutriment/hydration factors are cut in half to compensate.

Why and what will this PR improve

Garlic Oil now can be used as an antibiotic without dealing 1.2 TOX damage per unit ingested (due to a food substance being present in the bloodstream).

Authorship

Changelog

🆑
tweak: Prevented Garlic Oil from dealing TOX damage
/:cl:

Tags garlic oil as `injectable_nutrition`.  Because this causes `adjust_mob_nutrition()` to get called twice, nutriment/hydration factors are cut in half to compensate.
@MistakeNot4892
Copy link
Contributor

MistakeNot4892 commented Mar 22, 2026

Hmmm I don't much like having it process twice, it means immunity and such will be adjusted twice. Not sure of a better fix short of duplicating the logic into affect_ingest on garlic juice specifically, which is gross too.

@Typhin
Copy link
Contributor Author

Typhin commented Mar 22, 2026

The only other thing I can think of to do is have affect_ingest() basically skip all processing if it has both injectable_nutrition and affect_blood_on_ingest so it only processes once. (And since affect_blood_on_ingest is a ratio value rather than simple true/false, it could do something like digest_amount = (1 - affect_blood_on_ingest) and then use that to multiply the effects of digestion. Basically it only processes the total amount but in two passes, but an ingest portion and an inject portion.)

The "duplicating logic into affect_ingest()" unpleasantness is why I went with the affect_blood_on_ingest route, only to run into the "food in bloodstream deals TOX damage" problem.

@MistakeNot4892 MistakeNot4892 added the ready for review This PR is ready for review and merge. label Mar 25, 2026
Copy link
Contributor

@MistakeNot4892 MistakeNot4892 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to approve this for now but I might revisit it with another solution in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review This PR is ready for review and merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants