From 0293d2674c6ee02f2a8054e07d0572fca4751a6b Mon Sep 17 00:00:00 2001
From: AzuleUtama <44248086+AzuleUtama@users.noreply.github.com>
Date: Tue, 22 Jan 2019 10:32:44 +0000
Subject: [PATCH] the rerefactor
---
code/modules/detective_work/footprints_and_rag.dm | 2 +-
code/modules/reagents/reagent_containers.dm | 9 +++++++++
.../reagents/reagent_containers/glass_containers.dm | 13 +------------
3 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/code/modules/detective_work/footprints_and_rag.dm b/code/modules/detective_work/footprints_and_rag.dm
index af266649e3f..b3c45c0f4a1 100644
--- a/code/modules/detective_work/footprints_and_rag.dm
+++ b/code/modules/detective_work/footprints_and_rag.dm
@@ -21,7 +21,7 @@
can_be_placed_into = null
flags = NOBLUDGEON
container_type = OPENCONTAINER
- no_lid = TRUE
+ has_lid = FALSE
var/wipespeed = 30
/obj/item/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag)
diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm
index 258bf98468d..6d58e42d539 100644
--- a/code/modules/reagents/reagent_containers.dm
+++ b/code/modules/reagents/reagent_containers.dm
@@ -10,6 +10,7 @@
var/list/list_reagents = null
var/spawned_disease = null
var/disease_amount = 20
+ var/has_lid = FALSE // Used for containers where we want to put lids on and off
/obj/item/reagent_containers/verb/set_APTFT() //set amount_per_transfer_from_this
set name = "Set transfer amount"
@@ -49,6 +50,14 @@
..()
/obj/item/reagent_containers/attack_self(mob/user)
+ if(has_lid)
+ if(is_open_container())
+ to_chat(usr, "You put the lid on [src].")
+ container_type ^= REFILLABLE | DRAINABLE
+ else
+ to_chat(usr, "You take the lid off [src].")
+ container_type |= REFILLABLE | DRAINABLE
+ update_icon()
return
// this prevented pills, food, and other things from being picked up by bags.
diff --git a/code/modules/reagents/reagent_containers/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm
index f3ff5095cb2..23ec5f5cadb 100644
--- a/code/modules/reagents/reagent_containers/glass_containers.dm
+++ b/code/modules/reagents/reagent_containers/glass_containers.dm
@@ -12,7 +12,7 @@
possible_transfer_amounts = list(5,10,15,25,30,50)
volume = 50
container_type = OPENCONTAINER
- var/no_lid = FALSE // Stops certain containers having lids, mainly for damp rag
+ has_lid = TRUE
var/label_text = ""
// the fucking asshole who designed this can go die in a fire - Iamgoofball
@@ -56,17 +56,6 @@
if(!is_open_container())
to_chat(user, "Airtight lid seals it completely.")
-/obj/item/reagent_containers/glass/attack_self()
- ..()
- if(!no_lid)
- if(is_open_container())
- to_chat(usr, "You put the lid on [src].")
- container_type ^= REFILLABLE | DRAINABLE
- else
- to_chat(usr, "You take the lid off [src].")
- container_type |= REFILLABLE | DRAINABLE
- update_icon()
-
/obj/item/reagent_containers/glass/afterattack(obj/target, mob/user, proximity)
if(!proximity)
return