diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm
index 2d9181dbc9f..c92d11925cd 100644
--- a/code/modules/mob/new_player/new_player.dm
+++ b/code/modules/mob/new_player/new_player.dm
@@ -415,20 +415,62 @@
else if(shuttle_master.emergency.mode >= SHUTTLE_CALL)
dat += "The station is currently undergoing evacuation procedures.
"
- dat += "Choose from the following open positions:
"
+ dat += "Choose from the following open positions:
"
+
+ var/list/activePlayers = list()
+ var/list/categorizedJobs = list(
+ "Command" = list(jobs = list(), titles = command_positions, color = "#aac1ee"),
+ "Engineering" = list(jobs = list(), titles = engineering_positions, color = "#ffd699"),
+ "Security" = list(jobs = list(), titles = security_positions, color = "#ff9999"),
+ "Miscellaneous" = list(jobs = list(), titles = list(), color = "#ffffff", colBreak = 1),
+ "Synthetic" = list(jobs = list(), titles = nonhuman_positions, color = "#ccffcc"),
+ "Support / Service" = list(jobs = list(), titles = service_positions, color = "#cccccc"),
+ "Medical" = list(jobs = list(), titles = medical_positions, color = "#99ffe6", colBreak = 1),
+ "Science" = list(jobs = list(), titles = science_positions, color = "#e6b3e6"),
+ "Supply" = list(jobs = list(), titles = supply_positions, color = "#ead4ae"),
+ )
for(var/datum/job/job in job_master.occupations)
if(job && IsJobAvailable(job.title))
- var/active = 0
+ activePlayers[job] = 0
+ var/categorized = 0
// Only players with the job assigned and AFK for less than 10 minutes count as active
- for(var/mob/M in player_list) if(M.mind && M.client && M.mind.assigned_role == job.title && M.client.inactivity <= 10 * 60 * 10)
- active++
- dat += "[job.title] ([job.current_positions]) (Active: [active])
"
+ for(var/mob/M in player_list) if(M.mind && M.client && M.mind.assigned_role == job.title && M.client.inactivity <= 10 MINUTES)
+ activePlayers[job]++
+ for(var/jobcat in categorizedJobs)
+ var/list/jobs = categorizedJobs[jobcat]["jobs"]
+ if(job.title in categorizedJobs[jobcat]["titles"])
+ categorized = 1
+ if(jobcat == "Command") // Put captain at top of command jobs
+ if(job.title == "Captain")
+ jobs.Insert(1, job)
+ else
+ jobs += job
+ else // Put heads at top of non-command jobs
+ if(job.title in command_positions)
+ jobs.Insert(1, job)
+ else
+ jobs += job
+ if(!categorized)
+ categorizedJobs["Miscellaneous"]["jobs"] += job
- dat += ""
+ dat += "
| " + for(var/jobcat in categorizedJobs) + if(categorizedJobs[jobcat]["colBreak"]) + dat += " | "
+ if(length(categorizedJobs[jobcat]["jobs"]) < 1)
+ continue
+ var/color = categorizedJobs[jobcat]["color"]
+ dat += " " + + dat += " |