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
This commit is contained in:
Irafas
2018-06-26 21:33:28 +01:00
committed by letterjay
parent 0029919b80
commit feb01437d6
@@ -286,10 +286,16 @@
/obj/item/reagent_containers/glass/bucket/equipped(mob/user, slot)
..()
if(slot == SLOT_HEAD && reagents.total_volume)
to_chat(user, "<span class='userdanger'>[src]'s contents spill all over you!</span>")
reagents.reaction(user, TOUCH)
reagents.clear_reagents()
if (slot == SLOT_HEAD)
if(reagents.total_volume)
to_chat(user, "<span class='userdanger'>[src]'s contents spill all over you!</span>")
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