From 9bef7edd0f43f59721afd5a0bc43cbbc333724fd Mon Sep 17 00:00:00 2001
From: Ghommie <42542238+Ghommie@users.noreply.github.com>
Date: Thu, 28 Nov 2019 19:59:34 +0100
Subject: [PATCH 1/3] Rags are no longer transparent reagent containers.
---
code/modules/reagents/reagent_containers/rags.dm | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/code/modules/reagents/reagent_containers/rags.dm b/code/modules/reagents/reagent_containers/rags.dm
index 8d44a2a406..a1596a4a04 100644
--- a/code/modules/reagents/reagent_containers/rags.dm
+++ b/code/modules/reagents/reagent_containers/rags.dm
@@ -5,7 +5,7 @@
icon = 'icons/obj/toy.dmi'
icon_state = "rag"
item_flags = NOBLUDGEON
- reagent_flags = OPENCONTAINER
+ reagent_flags = REFILLABLE | DRAINABLE
amount_per_transfer_from_this = 5
possible_transfer_amounts = list()
volume = 5
@@ -23,7 +23,7 @@
/obj/item/reagent_containers/rag/examine(mob/user)
. = ..()
if(reagents.total_volume)
- . += "Alt-Click to squeeze the liquids out of it."
+ . += "It's soaked. Alt-Click to squeeze it dry."
/obj/item/reagent_containers/rag/afterattack(atom/A as obj|turf|area, mob/user,proximity)
. = ..()
@@ -89,8 +89,6 @@
if(do_after(user, action_speed, TRUE, src))
to_chat(user, "You squeeze \the [src] dry.")
var/atom/react_loc = get_turf(src)
- if(ismob(react_loc))
- react_loc = react_loc.loc
if(react_loc)
reagents.reaction(react_loc, TOUCH)
reagents.clear_reagents()
From f2d6e6b78f645a8562d93b5d37f2ca2c9b80ef14 Mon Sep 17 00:00:00 2001
From: Ghommie <42542238+Ghommie@users.noreply.github.com>
Date: Thu, 28 Nov 2019 20:31:30 +0100
Subject: [PATCH 2/3] Allows people to squeeze it into another container.
---
.../reagents/reagent_containers/rags.dm | 25 +++++++++++++------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/code/modules/reagents/reagent_containers/rags.dm b/code/modules/reagents/reagent_containers/rags.dm
index a1596a4a04..8e2f7283c2 100644
--- a/code/modules/reagents/reagent_containers/rags.dm
+++ b/code/modules/reagents/reagent_containers/rags.dm
@@ -23,7 +23,7 @@
/obj/item/reagent_containers/rag/examine(mob/user)
. = ..()
if(reagents.total_volume)
- . += "It's soaked. Alt-Click to squeeze it dry."
+ . += "It's soaked. Alt-Click to squeeze it dry, and perhaps gather the liquids into another held open container."
/obj/item/reagent_containers/rag/afterattack(atom/A as obj|turf|area, mob/user,proximity)
. = ..()
@@ -85,13 +85,24 @@
/obj/item/reagent_containers/rag/AltClick(mob/user)
. = ..()
if(reagents.total_volume && user.canUseTopic(src, BE_CLOSE))
- to_chat(user, "You start squeezing the liquids out of \the [src]...")
+ to_chat(user, "You start squeezing \the [src] dry...")
if(do_after(user, action_speed, TRUE, src))
- to_chat(user, "You squeeze \the [src] dry.")
- var/atom/react_loc = get_turf(src)
- if(react_loc)
- reagents.reaction(react_loc, TOUCH)
- reagents.clear_reagents()
+ var/msg = "You squeeze \the [src]"
+ var/obj/item/target
+ if(Adjacent(user)) //Allows the user to drain the reagents into a beaker if adjacent (no telepathy).
+ for(var/obj/item/I in user.held_items)
+ if(I.is_open_container() && !I.reagents.holder_full())
+ target = I
+ break
+ if(!target)
+ msg += " dry"
+ reagents.reaction(get_turf(src), TOUCH)
+ reagents.clear_reagents()
+ else
+ msg += "'s liquids into \the [target]"
+ reagents.trans_to(target, reagents.total_volume)
+ to_chat(user, "[msg].")
+
/obj/item/reagent_containers/rag/towel
name = "towel"
From c8d3856d73b841950083b3ca7a7d24dccc69b39e Mon Sep 17 00:00:00 2001
From: Ghommie <42542238+Ghommie@users.noreply.github.com>
Date: Thu, 28 Nov 2019 20:34:41 +0100
Subject: [PATCH 3/3] Sanity
---
code/modules/reagents/reagent_containers/rags.dm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/code/modules/reagents/reagent_containers/rags.dm b/code/modules/reagents/reagent_containers/rags.dm
index 8e2f7283c2..414208d0bf 100644
--- a/code/modules/reagents/reagent_containers/rags.dm
+++ b/code/modules/reagents/reagent_containers/rags.dm
@@ -91,6 +91,8 @@
var/obj/item/target
if(Adjacent(user)) //Allows the user to drain the reagents into a beaker if adjacent (no telepathy).
for(var/obj/item/I in user.held_items)
+ if(I == src)
+ continue
if(I.is_open_container() && !I.reagents.holder_full())
target = I
break