Quickfixing latejoin ghost roles, I'm sorry.
This commit is contained in:
@@ -71,13 +71,14 @@
|
||||
|
||||
/obj/effect/mob_spawn/Destroy()
|
||||
GLOB.poi_list -= src
|
||||
LAZYREMOVE(GLOB.mob_spawners[job_description ? job_description : name], src)
|
||||
if(!LAZYLEN(GLOB.mob_spawners[job_description ? job_description : name]))
|
||||
GLOB.mob_spawners -= job_description ? job_description : name
|
||||
var/job_name = job_description ? job_description : name
|
||||
GLOB.mob_spawners -= job_name
|
||||
if(!LAZYLEN(GLOB.mob_spawners[job_name]))
|
||||
LAZYREMOVE(GLOB.mob_spawners[job_name], src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/mob_spawn/proc/can_latejoin() //If it can be taken from the lobby.
|
||||
return TRUE
|
||||
return ghost_usable
|
||||
|
||||
/obj/effect/mob_spawn/proc/special(mob/M)
|
||||
return
|
||||
|
||||
@@ -443,10 +443,12 @@
|
||||
for(var/datum/job/job in SSjob.occupations)
|
||||
if(job && IsJobUnavailable(job.title, TRUE) == JOB_AVAILABLE)
|
||||
available_job_count++
|
||||
for(var/obj/effect/mob_spawn/spawner in GLOB.mob_spawners)
|
||||
if(spawner.can_latejoin())
|
||||
available_job_count++
|
||||
break
|
||||
for(var/spawner in GLOB.mob_spawners)
|
||||
var/obj/effect/mob_spawn/S = GLOB.mob_spawners[spawner]
|
||||
if(!istype(S) || !S.can_latejoin())
|
||||
continue
|
||||
available_job_count++
|
||||
break
|
||||
|
||||
if(!available_job_count)
|
||||
dat += "<div class='notice red'>There are currently no open positions!</div>"
|
||||
@@ -465,9 +467,11 @@
|
||||
"Science" = list(jobs = list(), titles = GLOB.science_positions, color = "#e6b3e6"),
|
||||
"Security" = list(jobs = list(), titles = GLOB.security_positions, color = "#ff9999"),
|
||||
)
|
||||
for(var/obj/effect/mob_spawn/spawner in GLOB.mob_spawners)
|
||||
if(spawner.can_latejoin())
|
||||
categorizedJobs["Ghost Role"]["jobs"] += spawner
|
||||
for(var/spawner in GLOB.mob_spawners)
|
||||
var/obj/effect/mob_spawn/S = GLOB.mob_spawners[spawner]
|
||||
if(!istype(S) || !S.can_latejoin())
|
||||
continue
|
||||
categorizedJobs["Ghost Role"]["jobs"] += S
|
||||
|
||||
for(var/datum/job/job in SSjob.occupations)
|
||||
if(job && IsJobUnavailable(job.title, TRUE) == JOB_AVAILABLE)
|
||||
|
||||
Reference in New Issue
Block a user