From 45899124a40d9e9337d0f73b0c638a897f0dc4cf Mon Sep 17 00:00:00 2001 From: GrayRachnid Date: Sun, 25 Mar 2018 15:14:21 -0400 Subject: [PATCH 1/2] makes both defines and path tools display properly in the tooltip --- code/modules/crafting/craft.dm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/code/modules/crafting/craft.dm b/code/modules/crafting/craft.dm index 1a11ac98170..af4ed3ab5b2 100644 --- a/code/modules/crafting/craft.dm +++ b/code/modules/crafting/craft.dm @@ -396,6 +396,7 @@ data["ref"] = "[REF(R)]" var/req_text = "" var/tool_text = "" + var/tool_addafter = "" // this exists because tools use both paths and defines var/catalyst_text = "" for(var/a in R.reqs) @@ -413,7 +414,12 @@ data["catalyst_text"] = catalyst_text for(var/a in R.tools) - tool_text += " [a]," + if(ispath(a, /obj/item)) + var/obj/item/b = a + tool_addafter += " [initial(b.name)]," + else + tool_text += " [a]," + tool_text += tool_addafter tool_text = replacetext(tool_text,",","",-1) data["tool_text"] = tool_text From 6972812ccf3d045f16b9ffedd6e1468a46cd7c1c Mon Sep 17 00:00:00 2001 From: GrayRachnid Date: Thu, 29 Mar 2018 23:10:06 -0400 Subject: [PATCH 2/2] tunnel vision is a bitch --- code/modules/crafting/craft.dm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/modules/crafting/craft.dm b/code/modules/crafting/craft.dm index af4ed3ab5b2..7df7c90dc9e 100644 --- a/code/modules/crafting/craft.dm +++ b/code/modules/crafting/craft.dm @@ -396,7 +396,6 @@ data["ref"] = "[REF(R)]" var/req_text = "" var/tool_text = "" - var/tool_addafter = "" // this exists because tools use both paths and defines var/catalyst_text = "" for(var/a in R.reqs) @@ -416,10 +415,9 @@ for(var/a in R.tools) if(ispath(a, /obj/item)) var/obj/item/b = a - tool_addafter += " [initial(b.name)]," + tool_text += " [initial(b.name)]," else tool_text += " [a]," - tool_text += tool_addafter tool_text = replacetext(tool_text,",","",-1) data["tool_text"] = tool_text