-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathmobs.dm
90 lines (74 loc) · 3.65 KB
/
mobs.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
GLOBAL_LIST_EMPTY(clients) //all clients
GLOBAL_LIST_EMPTY(directory) //all ckeys with associated client
GLOBAL_LIST_EMPTY(stealthminID) //reference list with IDs that store ckeys, for stealthmins
//Since it didn't really belong in any other category, I'm putting this here
//This is for procs to replace all the goddamn 'in world's that are chilling around the code
GLOBAL_LIST_EMPTY(player_list) //all mobs **with clients attached**.
GLOBAL_LIST_EMPTY(keyloop_list) //as above but can be limited to boost performance
GLOBAL_LIST_EMPTY(mob_list) //all mobs, including clientless
GLOBAL_LIST_EMPTY(mob_directory) //mob_id -> mob
GLOBAL_LIST_EMPTY(alive_mob_list) //all alive mobs, including clientless. Excludes /mob/dead/new_player
GLOBAL_LIST_EMPTY(suicided_mob_list) //contains a list of all mobs that suicided, including their associated ghosts.
GLOBAL_LIST_EMPTY(drones_list)
GLOBAL_LIST_EMPTY(dead_mob_list) //all dead mobs, including clientless. Excludes /mob/dead/new_player
GLOBAL_LIST_EMPTY(joined_player_list) //all clients that have joined the game at round-start or as a latejoin.
GLOBAL_LIST_EMPTY(new_player_list) //all /mob/dead/new_player, in theory all should have clients and those that don't are in the process of spawning and get deleted when done.
GLOBAL_LIST_EMPTY(silicon_mobs) //all silicon mobs
GLOBAL_LIST_EMPTY(mob_living_list) //all instances of /mob/living and subtypes
GLOBAL_LIST_EMPTY(carbon_list) //all instances of /mob/living/carbon and subtypes, notably does not contain brains or simple animals
GLOBAL_LIST_EMPTY(ai_list)
GLOBAL_LIST_EMPTY(pai_list)
GLOBAL_LIST_EMPTY(available_ai_shells)
GLOBAL_LIST_INIT(simple_animals, list(list(),list(),list(),list())) // One for each AI_* status define
GLOBAL_LIST_EMPTY(spidermobs) //all sentient spider mobs
GLOBAL_LIST_EMPTY(bots_list)
GLOBAL_LIST_EMPTY(aiEyes)
///underages who have been reported to security for trying to buy things they shouldn't, so they can't spam
GLOBAL_LIST_EMPTY(narcd_underages)
GLOBAL_LIST_EMPTY(language_datum_instances)
GLOBAL_LIST_EMPTY(all_languages)
GLOBAL_LIST_EMPTY(sentient_disease_instances)
GLOBAL_LIST_EMPTY(latejoin_ai_cores)
GLOBAL_LIST_EMPTY(mob_config_movespeed_type_lookup)
GLOBAL_LIST_EMPTY(emote_list)
GLOBAL_LIST_INIT(blood_types, generate_blood_types())
/proc/generate_blood_types()
. = list()
for(var/path in subtypesof(/datum/blood_type))
var/datum/blood_type/new_type = new path()
.[new_type.name] = new_type
/// Keys are the names of the accents, values are the name of their .json file.
GLOBAL_LIST_INIT(accents_name2file, strings("accents.json", "accent_file_names", directory = "strings/accents"))
/// List of all accents
GLOBAL_LIST_INIT(accents_names, list(ACCENT_NONE) + assoc_to_keys(GLOB.accents_name2file))
/// Holds some complex data regarding accents
GLOBAL_LIST_EMPTY(accents_name2regexes)
GLOBAL_LIST_EMPTY(walkingmushroom)
/proc/update_config_movespeed_type_lookup(update_mobs = TRUE)
var/list/mob_types = list()
var/list/entry_value = CONFIG_GET(keyed_list/multiplicative_movespeed)
for(var/path in entry_value)
var/value = entry_value[path]
if(!value)
continue
for(var/subpath in typesof(path))
mob_types[subpath] = value
GLOB.mob_config_movespeed_type_lookup = mob_types
if(update_mobs)
update_mob_config_movespeeds()
/proc/update_mob_config_movespeeds()
for(var/i in GLOB.mob_list)
var/mob/M = i
M.update_config_movespeed()
/proc/init_emote_list()
. = list()
for(var/path in subtypesof(/datum/emote))
var/datum/emote/E = new path()
if(!.[E.key])
.[E.key] = list(E)
else
.[E.key] += E
if(!.[E.key_third_person])
.[E.key_third_person] = list(E)
else
.[E.key_third_person] |= E