From 6fbfe6cd3551950dd19ac3289ace91798becea85 Mon Sep 17 00:00:00 2001 From: Ansari Date: Sat, 19 May 2018 20:13:45 +0800 Subject: [PATCH] Fixes reagentlist so you are not locked to src and can use it to check something else's reagent list. It defaults to src. And make it so that your username is shown when putting stuffs in cryo --- code/game/machinery/cryo.dm | 2 +- code/modules/reagents/reagent_containers.dm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 98b916d5240..219d37ce627 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -280,7 +280,7 @@ return B.forceMove(src) beaker = B - log_game("[user] added [B] containing [B.reagentlist()] to a cryo cell at [COORD(src)]") + log_game("[key_name(user)] added [B] containing [B.reagentlist()] to a cryo cell at [COORD(src)]") user.visible_message("[user] adds \a [B] to [src]!", "You add \a [B] to [src]!") diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index ea098259af0..1ce02e2cffe 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -61,9 +61,9 @@ /obj/item/reagent_containers/afterattack(obj/target, mob/user , flag) return -/obj/item/reagent_containers/proc/reagentlist(obj/item/reagent_containers = src) //Attack logs for regents in pills +/obj/item/reagent_containers/proc/reagentlist(obj/item/reagent_containers/C = src) //Return reagents in a reagent_container, default to source var/data - if(src && src.reagents && src.reagents.reagent_list && src.reagents.reagent_list.len) //find a reagent list if there is and check if it has entries + if(C && C.reagents && C.reagents.reagent_list && C.reagents.reagent_list.len) //find a reagent list if there is and check if it has entries for(var/datum/reagent/R in src.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