From 10c34f4ce9e666d2989a4fd3052b642c4610983f Mon Sep 17 00:00:00 2001 From: Ansari Date: Sat, 19 May 2018 18:45:14 +0800 Subject: [PATCH] Remove two \the. Refactors reagentlist while at it so that its default argument is src --- code/game/machinery/cryo.dm | 6 +++--- code/modules/food_and_drinks/food/condiment.dm | 2 +- code/modules/mob/living/carbon/carbon.dm | 2 +- code/modules/reagents/reagent_containers.dm | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 4fbd5a6ff1e..98b916d5240 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -276,12 +276,12 @@ to_chat(user, "A beaker is already loaded into the machine.") return if(!user.drop_item()) - to_chat(user, "The [B] is stuck to you!") + to_chat(user, "[B] is stuck to you!") return B.forceMove(src) beaker = B - log_game("[user] added [B] containing [B.reagentlist(B)] to a cryo cell at [COORD(src)]") - user.visible_message("[user] adds \a [B] to \the [src]!", "You add \a [B] to \the [src]!") + log_game("[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]!") if(istype(G, /obj/item/screwdriver)) diff --git a/code/modules/food_and_drinks/food/condiment.dm b/code/modules/food_and_drinks/food/condiment.dm index f9ec698f196..c40e47e213a 100644 --- a/code/modules/food_and_drinks/food/condiment.dm +++ b/code/modules/food_and_drinks/food/condiment.dm @@ -47,7 +47,7 @@ if(!reagents || !reagents.total_volume) return // The condiment might be empty after the delay. user.visible_message("[user] feeds [M] from [src].") - add_attack_logs(user, M, "Fed [src] containing [reagentlist(src)]") + add_attack_logs(user, M, "Fed [src] containing [reagentlist()]") var/fraction = min(10/reagents.total_volume, 1) reagents.reaction(M, INGEST, fraction) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index a1e4b555412..8a6c501186e 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -1020,7 +1020,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, return 1 /mob/living/carbon/proc/forceFedAttackLog(var/obj/item/reagent_containers/food/toEat, mob/user) - add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagentlist(toEat)]") + add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagentlist()]") if(!iscarbon(user)) LAssailant = null else diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 28d8857efe1..ea098259af0 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -61,10 +61,10 @@ /obj/item/reagent_containers/afterattack(obj/target, mob/user , flag) return -/obj/item/reagent_containers/proc/reagentlist(obj/item/reagent_containers/snack) //Attack logs for regents in pills +/obj/item/reagent_containers/proc/reagentlist(obj/item/reagent_containers = src) //Attack logs for regents in pills var/data - if(snack && snack.reagents && snack.reagents.reagent_list && snack.reagents.reagent_list.len) //find a reagent list if there is and check if it has entries - for(var/datum/reagent/R in snack.reagents.reagent_list) //no reagents will be left behind + 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 + 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 else return "No reagents"