mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-02 21:11:57 +00:00
* Fixed several Foodening taste issues. (#78481) ## About The Pull Request Fixes a number of issues with taste that arose from the Foodening: - Foods with special `check_liked` callbacks were having these thrown out without effect. This made food with special "liked" conditions get ignored - for example, security lizards didn't like donuts anymore. - Ageusia was completely ignored when determining taste reactions (the entire point of the quirk!). - Foods with a toxic ingredient still gave the normal toxic reaction, but would not always show up as inedible on examine if they were very complex or had several liked foodtypes. These issues have been fixed through a rewrite of the `get_perceived_food_quality()` proc - all relevant checks are now made within this proc rather than some coming before (and being partly discarded). Food quality checks take on the following hierarchy: `silver slime toxicity > check_liked > toxic foodtypes > ageusia > liked + disliked foodtypes` - **Silver slime toxicity** is about the same as before, except it will return a toxic result early if the eater is not a jellyperson, or increase the perceived quality by 2 if they are. - **check_liked** will return early with a value based on the result of the callback: -8 (toxic) if toxic, -2 (disliked) if disliked, and 2 (a nice meal) if liked. As before, these ignore all further foodtype calculations. - **Toxic foodtypes** will return the toxic threshold if present. - **Ageusia** will always return 0 - you can't taste anything, so if it doesn't poison you it tastes completely neutral. - **Liked + disliked foodtypes** are how things already work - save for toxic foodtypes no longer being needlessly factored into the math. As part of unifying two disparate sets of checks, perceived food quality of -8 or lower now gives the toxic reaction rather than the disliked one. This threshold would be incredibly difficult to reach via disliked food alone, requiring four different disliked foodtypes at once in a non-handcrafted food. This could potentially be set to a less extreme value, like -4, if you wanted disliked-enough food to act as toxic - but, as this would be a minor balance change, I haven't done that here. Finally, as a miscellaneous change, a vestigial "fraction" field has been removed from the invocation of check_liked - this was not used, and was inconvenient for the rewritten code. ## Why It's Good For The Game Restores several features that were lost or muddled in the Foodening, and should not have been. Note that, while this change generally preserves old behavior, it diverges somewhat from the _intended_ design of the Foodening. Namely, toxic foodtypes will _always_ give the toxic disgust/moodlet (unless superseded by the above hierarchy), rather than being weighed against the other foodtypes. I personally think this is fine, as I disagree with the notion that wrapping poison in nice ingredients will make them edible. ## Changelog 🆑 fix: Foods that have special conditions for liking/disliking them (such as donuts for sec officers) have these conditions again. fix: Characters with ageusia properly ignore non-toxic food types that they eat. fix: If you examine toxic food, it can no longer appear to you as edible. /🆑 * Fixed several Foodening taste issues. --------- Co-authored-by: lizardqueenlexi <105025397+lizardqueenlexi@users.noreply.github.com>