-
-
Notifications
You must be signed in to change notification settings - Fork 452
/
traitor.dm
35 lines (31 loc) · 1.14 KB
/
traitor.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/// Associative list of /datum/traitor_backstory path strings to datums
GLOBAL_LIST_INIT(traitor_backstories, generate_traitor_backstories())
/// Associative list of /datum/traitor_faction keys to datums
GLOBAL_LIST_INIT(traitor_factions_to_datum, generate_traitor_factions())
GLOBAL_LIST_INIT(traitor_factions, assoc_to_keys(GLOB.traitor_factions_to_datum))
/proc/generate_traitor_backstories()
var/list/result = list()
for(var/datum/traitor_backstory/path as anything in subtypesof(/datum/traitor_backstory))
if(isnull(initial(path.name)))
continue
result["[path]"] = new path()
return result
/proc/generate_traitor_factions()
var/list/result = list()
for(var/datum/traitor_faction/path as anything in subtypesof(/datum/traitor_faction))
var/key = initial(path.key)
if(!istext(key))
continue
result[key] = new path()
return result
GLOBAL_LIST_INIT(traitor_motivations, list(
TRAITOR_MOTIVATION_FORCED,
TRAITOR_MOTIVATION_NOT_FORCED,
TRAITOR_MOTIVATION_MONEY,
TRAITOR_MOTIVATION_POLITICAL,
TRAITOR_MOTIVATION_LOVE,
TRAITOR_MOTIVATION_REPUTATION,
TRAITOR_MOTIVATION_DEATH_THREAT,
TRAITOR_MOTIVATION_AUTHORITY,
TRAITOR_MOTIVATION_FUN,
))