Fixes new player runtime that makes people unable to join rounds.
This commit is contained in:
@@ -21,8 +21,9 @@
|
||||
|
||||
/obj/item/clockwork/construct_chassis/Destroy()
|
||||
GLOB.poi_list -= src
|
||||
var/list/spawners = GLOB.mob_spawners[name]
|
||||
LAZYREMOVE(spawners, src)
|
||||
LAZYREMOVE(GLOB.mob_spawners[name], src)
|
||||
if(!LAZYLEN(GLOB.mob_spawners[name]))
|
||||
GLOB.mob_spawners -= name
|
||||
. = ..()
|
||||
|
||||
/obj/item/clockwork/construct_chassis/examine(mob/user)
|
||||
|
||||
@@ -72,9 +72,9 @@
|
||||
/obj/effect/mob_spawn/Destroy()
|
||||
GLOB.poi_list -= src
|
||||
var/job_name = job_description ? job_description : name
|
||||
GLOB.mob_spawners -= job_name
|
||||
LAZYREMOVE(GLOB.mob_spawners[job_name], src)
|
||||
if(!LAZYLEN(GLOB.mob_spawners[job_name]))
|
||||
LAZYREMOVE(GLOB.mob_spawners[job_name], src)
|
||||
GLOB.mob_spawners -= job_name
|
||||
return ..()
|
||||
|
||||
/obj/effect/mob_spawn/proc/can_latejoin() //If it can be taken from the lobby.
|
||||
|
||||
@@ -444,6 +444,8 @@
|
||||
if(job && IsJobUnavailable(job.title, TRUE) == JOB_AVAILABLE)
|
||||
available_job_count++
|
||||
for(var/spawner in GLOB.mob_spawners)
|
||||
if(!LAZYLEN(spawner))
|
||||
continue
|
||||
var/obj/effect/mob_spawn/S = pick(GLOB.mob_spawners[spawner])
|
||||
if(!istype(S) || !S.can_latejoin())
|
||||
continue
|
||||
@@ -468,6 +470,8 @@
|
||||
"Security" = list(jobs = list(), titles = GLOB.security_positions, color = "#ff9999"),
|
||||
)
|
||||
for(var/spawner in GLOB.mob_spawners)
|
||||
if(!LAZYLEN(spawner))
|
||||
continue
|
||||
var/obj/effect/mob_spawn/S = pick(GLOB.mob_spawners[spawner])
|
||||
if(!istype(S) || !S.can_latejoin())
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user