diff --git a/code/_globalvars/lists/mobs.dm b/code/_globalvars/lists/mobs.dm index 32969dd5d8..e378970225 100644 --- a/code/_globalvars/lists/mobs.dm +++ b/code/_globalvars/lists/mobs.dm @@ -11,6 +11,7 @@ GLOBAL_LIST_EMPTY(stealthminID) //reference list with IDs that store ckeys, GLOBAL_LIST_EMPTY(player_list) //all mobs **with clients attached**. Excludes /mob/dead/new_player GLOBAL_LIST_EMPTY(mob_list) //all mobs, including clientless +GLOBAL_LIST_EMPTY(mob_directory) //mob_id -> mob GLOBAL_LIST_EMPTY(living_mob_list) //all alive mobs, including clientless. Excludes /mob/dead/new_player 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. diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 4712594179..24b4d228cc 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -3,6 +3,7 @@ GLOB.dead_mob_list -= src GLOB.living_mob_list -= src GLOB.all_clockwork_mobs -= src + GLOB.mob_directory -= tag if(observers && observers.len) for(var/M in observers) var/mob/dead/observe = M @@ -22,6 +23,7 @@ /mob/Initialize() tag = "mob_[next_mob_id++]" GLOB.mob_list += src + GLOB.mob_directory[tag] = src if(stat == DEAD) GLOB.dead_mob_list += src else