From e819b95ea2e90374cafced31c2a7ea010451e7b8 Mon Sep 17 00:00:00 2001 From: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> Date: Fri, 8 Dec 2023 11:46:38 +0530 Subject: [PATCH] Cups end their attack chain early when attacked with specific items (#80140) ## About The Pull Request - Fixes #80132 The problem lies in `/obj/item/reagent_containers/cup/attackby()` proc. We want this to return TRUE when dealing with specific items(like eggs, fire extinguishers) so that the attack chain ends early and subtypes like the soup pot has the correct behaviour ## Changelog :cl: fix: Eggs don't leave behind their shells when cracked into a soup pot. Cups end their attack chain early when dealing with specific items /:cl: --- .../reagents/reagent_containers/cups/_cup.dm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/modules/reagents/reagent_containers/cups/_cup.dm b/code/modules/reagents/reagent_containers/cups/_cup.dm index 55feb60aac5..1c53c68ab21 100644 --- a/code/modules/reagents/reagent_containers/cups/_cup.dm +++ b/code/modules/reagents/reagent_containers/cups/_cup.dm @@ -167,34 +167,34 @@ if(hotness && reagents) reagents.expose_temperature(hotness) to_chat(user, span_notice("You heat [name] with [attacking_item]!")) - return + return TRUE //Cooling method if(istype(attacking_item, /obj/item/extinguisher)) var/obj/item/extinguisher/extinguisher = attacking_item if(extinguisher.safety) - return + return TRUE if (extinguisher.reagents.total_volume < 1) to_chat(user, span_warning("\The [extinguisher] is empty!")) - return + return TRUE var/cooling = (0 - reagents.chem_temp) * extinguisher.cooling_power * 2 reagents.expose_temperature(cooling) to_chat(user, span_notice("You cool the [name] with the [attacking_item]!")) playsound(loc, 'sound/effects/extinguish.ogg', 75, TRUE, -3) extinguisher.reagents.remove_all(1) - return + return TRUE if(istype(attacking_item, /obj/item/food/egg)) //breaking eggs var/obj/item/food/egg/attacking_egg = attacking_item if(!reagents) - return - if(reagents.total_volume >= reagents.maximum_volume) + return TRUE + if(reagents.holder_full()) to_chat(user, span_notice("[src] is full.")) else to_chat(user, span_notice("You break [attacking_egg] in [src].")) attacking_egg.reagents.trans_to(src, attacking_egg.reagents.total_volume, transferred_by = user) qdel(attacking_egg) - return + return TRUE return ..()