From 839d22f842e54dc912cc423b0d62f03c2ac04da8 Mon Sep 17 00:00:00 2001 From: GunHog Date: Fri, 9 Oct 2015 19:44:18 -0500 Subject: [PATCH] Proper name extraction Uses the Protolathe procs to obtain the correct tech and material names! --- code/game/objects/items.dm | 4 ++-- code/modules/research/rdconsole.dm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index b6f5ec56cd5..6b8961c9769 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -175,7 +175,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s msg += "Testing potentials:
" var/list/techlvls = params2list(origin_tech) for(var/T in techlvls) //This needs to use the better names. - msg += "Tech: [capitalize(T)] | magnitude: [techlvls[T]]
" + msg += "Tech: [CallTechName(T)] | magnitude: [techlvls[T]]
" msg += "Research reliability: [reliability]%
" if(crit_fail) msg += "Critical failure detected in subject!
" @@ -186,7 +186,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s if(materials.len) msg += "Extractable materials:
" for(var/mat in materials) - msg += "[capitalize(copytext(mat, 2))]
" //Capitize first word, remove the "$" + msg += "[CallMaterialName(mat)]
" //Capitize first word, remove the "$" else msg += "No extractable materials detected.
" msg += "*--------*" diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index b15c8600c3c..9da2e98d9da 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -52,7 +52,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, var/list/datum/design/matching_designs = list() //for the search function -/obj/machinery/computer/rdconsole/proc/CallTechName(ID) //A simple helper proc to find the name of a tech with a given ID. +/proc/CallTechName(ID) //A simple helper proc to find the name of a tech with a given ID. var/datum/tech/check_tech var/return_name = null for(var/T in typesof(/datum/tech) - /datum/tech) @@ -66,7 +66,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, return return_name -/obj/machinery/computer/rdconsole/proc/CallMaterialName(ID) +proc/CallMaterialName(ID) var/datum/reagent/temp_reagent var/return_name = null if (copytext(ID, 1, 2) == "$")