Merge pull request #6770 from Mechoid/ReadyUpNotice

High-priority Job Display
This commit is contained in:
Atermonera
2020-03-03 01:37:00 -05:00
committed by VirgoBot
parent e3e6370884
commit 2af53022fe
2 changed files with 24 additions and 1 deletions
+3 -1
View File
@@ -91,8 +91,10 @@
stat("Players: [totalPlayers]", "Players Ready: [totalPlayersReady]")
totalPlayers = 0
totalPlayersReady = 0
var/datum/job/refJob = null
for(var/mob/new_player/player in player_list)
stat("[player.key]", (player.ready)?("(Playing)"):(null))
refJob = player.client.prefs.get_highest_job()
stat("[player.key]", (player.ready)?("(Playing as: [(refJob)?(refJob.title):("Unknown")])"):(null))
totalPlayers++
if(player.ready)totalPlayersReady++
@@ -266,3 +266,24 @@
preview_icon.Blend(stamp, ICON_OVERLAY, 49, 1)
preview_icon.Scale(preview_icon.Width() * 2, preview_icon.Height() * 2) // Scaling here to prevent blurring in the browser.
/datum/preferences/proc/get_highest_job()
var/datum/job/highJob
// Determine what job is marked as 'High' priority, and dress them up as such.
if(job_civilian_low & ASSISTANT)
highJob = job_master.GetJob("Assistant")
else
for(var/datum/job/job in job_master.occupations)
var/job_flag
switch(job.department_flag)
if(CIVILIAN)
job_flag = job_civilian_high
if(MEDSCI)
job_flag = job_medsci_high
if(ENGSEC)
job_flag = job_engsec_high
if(job.flag == job_flag)
highJob = job
break
return highJob