Fix donuts always overriding species-level taste reaction (#55349)

Fixes #55302.

The donut `check_liked` callback would return null if its conditions 
weren't met, so the `food_taste_reaction` checks would be totally 
skipped over.

No donuts for you, carnivore.
This commit is contained in:
prodirus
2020-12-10 23:34:30 -08:00
committed by GitHub
parent 1a25918a43
commit 70bf7e6d90
+8 -7
View File
@@ -377,15 +377,16 @@ Behavior that's still missing from this component that original food items had t
var/food_taste_reaction
if(check_liked) //Callback handling; use this as an override for special food like donuts
food_taste_reaction = check_liked.Invoke(fraction, H)
else if(foodtypes & H.dna.species.toxic_food)
food_taste_reaction = FOOD_TOXIC
else if(foodtypes & H.dna.species.disliked_food)
food_taste_reaction = FOOD_DISLIKED
else if(foodtypes & H.dna.species.liked_food)
food_taste_reaction = FOOD_LIKED
if(!food_taste_reaction)
if(foodtypes & H.dna.species.toxic_food)
food_taste_reaction = FOOD_TOXIC
else if(foodtypes & H.dna.species.disliked_food)
food_taste_reaction = FOOD_DISLIKED
else if(foodtypes & H.dna.species.liked_food)
food_taste_reaction = FOOD_LIKED
switch(food_taste_reaction)
if(FOOD_TOXIC)