mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Tweak CallTechName()
This commit is contained in:
@@ -124,17 +124,10 @@ research holder datum.
|
|||||||
|
|
||||||
// A simple helper proc to find the name of a tech with a given ID.
|
// A simple helper proc to find the name of a tech with a given ID.
|
||||||
/proc/CallTechName(var/ID)
|
/proc/CallTechName(var/ID)
|
||||||
var/datum/tech/check_tech
|
for(var/T in typesof(/datum/tech))
|
||||||
var/return_name = null
|
var/datum/tech/check_tech = T
|
||||||
for(var/T in typesof(/datum/tech) - /datum/tech)
|
if(initial(check_tech.id) == ID)
|
||||||
check_tech = null
|
return initial(check_tech.name)
|
||||||
check_tech = new T()
|
|
||||||
if(check_tech.id == ID)
|
|
||||||
return_name = check_tech.name
|
|
||||||
qdel(check_tech)
|
|
||||||
check_tech = null
|
|
||||||
break
|
|
||||||
return return_name
|
|
||||||
|
|
||||||
/***************************************************************
|
/***************************************************************
|
||||||
** Technology Datums **
|
** Technology Datums **
|
||||||
|
|||||||
Reference in New Issue
Block a user