From feb01437d69210a857c7e2c5b73d5ba3c7333f89 Mon Sep 17 00:00:00 2001 From: Irafas Date: Tue, 26 Jun 2018 21:33:28 +0100 Subject: [PATCH 1/2] Prevents reagents being transferred to a bucket while its worn on a head (#38727) * Fixed bucket hat bug Stopped the user from pouring reagents into a bucket while worn as a hat. Does so by changing the bucket to not have a container type until its removed * Should work * Works better * ExcessiveUseOfCobblestone is right, this better * As per recommendation --- code/modules/reagents/reagent_containers/glass.dm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 3a64da8f04..596973a2c4 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -286,10 +286,16 @@ /obj/item/reagent_containers/glass/bucket/equipped(mob/user, slot) ..() - if(slot == SLOT_HEAD && reagents.total_volume) - to_chat(user, "[src]'s contents spill all over you!") - reagents.reaction(user, TOUCH) - reagents.clear_reagents() + if (slot == SLOT_HEAD) + if(reagents.total_volume) + to_chat(user, "[src]'s contents spill all over you!") + reagents.reaction(user, TOUCH) + reagents.clear_reagents() + container_type = NONE + +/obj/item/reagent_containers/glass/bucket/dropped(mob/user) + . = ..() + container_type = initial(container_type) /obj/item/reagent_containers/glass/bucket/equip_to_best_slot(var/mob/M) if(reagents.total_volume) //If there is water in a bucket, don't quick equip it to the head