Files
Bubberstation/code/game/gamemodes/setupgame.dm
Incoming 1f9f0dfc40 Adds subtypesof(). It's shorthand for typesof(path) - path.
Replaces typesof(path) - path with subtypesof(path) in obvious places. I was a bit conservative, there's probably a few more places that could use this.
2015-11-16 18:55:57 -05:00

32 lines
910 B
Plaintext

/datum/subsystem/objects/proc/setupGenetics()
var/list/avnums = new /list(DNA_STRUC_ENZYMES_BLOCKS)
for(var/i=1, i<=DNA_STRUC_ENZYMES_BLOCKS, i++)
avnums[i] = i
for(var/A in subtypesof(/datum/mutation/human))
var/datum/mutation/human/B = new A()
if(B.dna_block == NON_SCANNABLE)
continue
B.dna_block = pick_n_take(avnums)
if(B.quality == POSITIVE)
good_mutations |= B
else if(B.quality == NEGATIVE)
bad_mutations |= B
else if(B.quality == MINOR_NEGATIVE)
not_good_mutations |= B
/datum/subsystem/ticker/proc/setupFactions()
// Populate the factions list:
for(var/typepath in typesof(/datum/faction))
var/datum/faction/F = new typepath()
if(!F.name)
qdel(F)
continue
else
factions.Add(F)
availablefactions.Add(F)
// Populate the syndicate coalition:
for(var/datum/faction/syndicate/S in factions)
syndicate_coalition.Add(S)