Proper name extraction

Uses the Protolathe procs to obtain the correct tech and material names!
This commit is contained in:
GunHog
2015-10-09 19:44:18 -05:00
parent e76411cd50
commit 839d22f842
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -175,7 +175,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
msg += "<span class='notice'>Testing potentials:</span><BR>"
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]] <BR>"
msg += "Tech: [CallTechName(T)] | magnitude: [techlvls[T]] <BR>"
msg += "Research reliability: [reliability]% <BR>"
if(crit_fail)
msg += "<span class='danger'>Critical failure detected in subject!</span><BR>"
@@ -186,7 +186,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
if(materials.len)
msg += "<span class='notice'>Extractable materials:<BR>"
for(var/mat in materials)
msg += "[capitalize(copytext(mat, 2))]<BR>" //Capitize first word, remove the "$"
msg += "[CallMaterialName(mat)]<BR>" //Capitize first word, remove the "$"
else
msg += "<span class='danger'>No extractable materials detected.</span><BR>"
msg += "*--------*"
+2 -2
View File
@@ -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) == "$")