mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-03-27 14:43:42 +00:00
105 lines
3.4 KiB
Plaintext
105 lines
3.4 KiB
Plaintext
|
|
//////////////////////////
|
|
/////Initial Building/////
|
|
//////////////////////////
|
|
|
|
/proc/makeDatumRefLists()
|
|
var/list/paths
|
|
|
|
//Hair - Initialise all /datum/sprite_accessory/hair into an list indexed by hair-style name
|
|
paths = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair
|
|
for(var/path in paths)
|
|
var/datum/sprite_accessory/hair/H = new path()
|
|
hair_styles_list[H.name] = H
|
|
switch(H.gender)
|
|
if(MALE) hair_styles_male_list += H.name
|
|
if(FEMALE) hair_styles_female_list += H.name
|
|
else
|
|
hair_styles_male_list += H.name
|
|
hair_styles_female_list += H.name
|
|
|
|
//Facial Hair - Initialise all /datum/sprite_accessory/facial_hair into an list indexed by facialhair-style name
|
|
paths = typesof(/datum/sprite_accessory/facial_hair) - /datum/sprite_accessory/facial_hair
|
|
for(var/path in paths)
|
|
var/datum/sprite_accessory/facial_hair/H = new path()
|
|
facial_hair_styles_list[H.name] = H
|
|
switch(H.gender)
|
|
if(MALE) facial_hair_styles_male_list += H.name
|
|
if(FEMALE) facial_hair_styles_female_list += H.name
|
|
else
|
|
facial_hair_styles_male_list += H.name
|
|
facial_hair_styles_female_list += H.name
|
|
|
|
//Surgery Steps - Initialize all /datum/surgery_step into a list
|
|
paths = typesof(/datum/surgery_step)-/datum/surgery_step
|
|
for(var/T in paths)
|
|
var/datum/surgery_step/S = new T
|
|
surgery_steps += S
|
|
sort_surgeries()
|
|
|
|
//List of job. I can't believe this was calculated multiple times per tick!
|
|
paths = typesof(/datum/job) -list(/datum/job,/datum/job/ai,/datum/job/cyborg)
|
|
for(var/T in paths)
|
|
var/datum/job/J = new T
|
|
joblist[J.title] = J
|
|
|
|
paths = typesof(/datum/nations)-/datum/nations
|
|
for(var/T in paths)
|
|
var/datum/nations/N = new T
|
|
all_nations[N.name] = N
|
|
|
|
paths = typesof(/datum/superheroes)-/datum/superheroes
|
|
for(var/T in paths)
|
|
var/datum/superheroes/S = new T
|
|
all_superheroes[S.name] = S
|
|
|
|
//Languages and species.
|
|
paths = typesof(/datum/language)-/datum/language
|
|
for(var/T in paths)
|
|
var/datum/language/L = new T
|
|
all_languages[L.name] = L
|
|
|
|
for (var/language_name in all_languages)
|
|
var/datum/language/L = all_languages[language_name]
|
|
if(!(L.flags & NONGLOBAL))
|
|
language_keys[":[lowertext(L.key)]"] = L
|
|
language_keys[".[lowertext(L.key)]"] = L
|
|
language_keys["#[lowertext(L.key)]"] = L
|
|
|
|
var/rkey = 0
|
|
paths = typesof(/datum/species)-/datum/species
|
|
for(var/T in paths)
|
|
rkey++
|
|
var/datum/species/S = new T
|
|
S.race_key = rkey //Used in mob icon caching.
|
|
all_species[S.name] = S
|
|
|
|
if(S.flags & IS_WHITELISTED)
|
|
whitelisted_species += S.name
|
|
|
|
init_subtypes(/datum/table_recipe, table_recipes)
|
|
|
|
return 1
|
|
|
|
/* // Uncomment to debug chemical reaction list.
|
|
/client/verb/debug_chemical_list()
|
|
|
|
for (var/reaction in chemical_reactions_list)
|
|
. += "chemical_reactions_list\[\"[reaction]\"\] = \"[chemical_reactions_list[reaction]]\"\n"
|
|
if(islist(chemical_reactions_list[reaction]))
|
|
var/list/L = chemical_reactions_list[reaction]
|
|
for(var/t in L)
|
|
. += " has: [t]\n"
|
|
world << .
|
|
*/
|
|
|
|
|
|
//creates every subtype of prototype (excluding prototype) and adds it to list L.
|
|
//if no list/L is provided, one is created.
|
|
/proc/init_subtypes(prototype, list/L)
|
|
if(!istype(L)) L = list()
|
|
for(var/path in typesof(prototype))
|
|
if(path == prototype) continue
|
|
L += new path()
|
|
return L
|