Merge pull request #3655 from VampyrBytes/washrefactor

refactors washing items
This commit is contained in:
Fox McCloud
2016-02-20 17:41:53 -05:00
6 changed files with 52 additions and 42 deletions
+8 -1
View File
@@ -71,4 +71,11 @@
for (var/datum/reagent/R in snack.reagents.reagent_list) //no reagents will be left behind
data += "[R.id]([R.volume] units); " //Using IDs because SOME chemicals(I'm looking at you, chlorhydrate-beer) have the same names as other chemicals.
return data
else return "No reagents"
else return "No reagents"
/obj/item/weapon/reagent_containers/wash(mob/user, atom/source)
if(is_open_container())
reagents.add_reagent("water", min(volume - reagents.total_volume, amount_per_transfer_from_this))
user << "<span class='notice'>You fill [src] from [source].</span>"
return
..()
@@ -1674,6 +1674,13 @@
if(volume >= 5)
return Expand()
/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wash(mob/user, atom/source)
if(wrapped)
..()
return
if(do_after(user, 40, target = source))
return 1
/obj/item/weapon/reagent_containers/food/snacks/monkeycube/proc/Expand()
if(isnull(gcDestroyed))
visible_message("<span class='notice'>[src] expands!</span>")