mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Optimize a couple things
This commit is contained in:
@@ -52,12 +52,12 @@ GLOBAL_LIST_INIT(design_datums, list())
|
||||
|
||||
/datum/research/New() //Insert techs into possible_tech here. Known_tech automatically updated.
|
||||
if(!LAZYLEN(GLOB.design_datums))
|
||||
for(var/T in typesof(/datum/design) - /datum/design)
|
||||
for(var/T in subtypesof(/datum/design))
|
||||
GLOB.design_datums += new T
|
||||
possible_designs = GLOB.design_datums
|
||||
|
||||
if(!LAZYLEN(known_tech))
|
||||
for(var/T in typesof(/datum/tech) - /datum/tech)
|
||||
for(var/T in subtypesof(/datum/tech))
|
||||
known_tech += new T
|
||||
RefreshResearch()
|
||||
|
||||
@@ -120,8 +120,7 @@ GLOBAL_LIST_INIT(design_datums, list())
|
||||
|
||||
// A simple helper proc to find the name of a tech with a given ID.
|
||||
/proc/CallTechName(var/ID)
|
||||
for(var/T in subtypesof(/datum/tech))
|
||||
var/datum/tech/check_tech = T
|
||||
for(var/datum/tech/check_tech as anything in subtypesof(/datum/tech))
|
||||
if(initial(check_tech.id) == ID)
|
||||
return initial(check_tech.name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user