From 6d11ef07fb3fdad989ab36bb4a47dade204160e1 Mon Sep 17 00:00:00 2001 From: Denesta Date: Thu, 31 Aug 2023 02:04:53 -0400 Subject: [PATCH] Bucket edit Added return values to attackby_secondary to prevent the default action of calling attackby. Added a message for wringing out dry mop. --- code/modules/reagents/reagent_containers/cups/_cup.dm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/modules/reagents/reagent_containers/cups/_cup.dm b/code/modules/reagents/reagent_containers/cups/_cup.dm index 16416a1d190a..8ef591bf6b6e 100644 --- a/code/modules/reagents/reagent_containers/cups/_cup.dm +++ b/code/modules/reagents/reagent_containers/cups/_cup.dm @@ -425,11 +425,18 @@ if(istype(weapon, /obj/item/mop)) if(reagents.total_volume == volume) to_chat(user, "The [src.name] can't hold anymore liquids") - return + return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN + var/obj/item/mop/attacked_mop = weapon + + if(attacked_mop.reagents.total_volume < 0.1) + to_chat(user, span_warning("Your [attacked_mop.name] is already dry!")) + return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN + to_chat(user, "You wring out the [attacked_mop.name] into the [src.name].") attacked_mop.reagents.trans_to(src, attacked_mop.max_reagent_volume * 0.25) attacked_mop.reagents.remove_all(attacked_mop.max_reagent_volume) + return SECONDARY_ATTACK_CONTINUE_CHAIN /obj/item/reagent_containers/cup/bucket/equipped(mob/user, slot) . = ..()