mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
@@ -492,21 +492,27 @@ proc/get_all_job_icons() //For all existing HUD icons
|
|||||||
return joblist + list("Prisoner")
|
return joblist + list("Prisoner")
|
||||||
|
|
||||||
/obj/proc/GetJobName() //Used in secHUD icon generation
|
/obj/proc/GetJobName() //Used in secHUD icon generation
|
||||||
if (!istype(src, /obj/item/device/pda) && !istype(src,/obj/item/weapon/card/id))
|
var/obj/item/weapon/card/id/I
|
||||||
return
|
|
||||||
|
|
||||||
var/jobName
|
|
||||||
|
|
||||||
if(istype(src, /obj/item/device/pda))
|
if(istype(src, /obj/item/device/pda))
|
||||||
var/obj/item/device/pda/P = src
|
var/obj/item/device/pda/P = src
|
||||||
if(P.id)
|
I = P.id
|
||||||
jobName = P.id.rank
|
else if(istype(src, /obj/item/weapon/card/id))
|
||||||
if(istype(src, /obj/item/weapon/card/id))
|
I = src
|
||||||
var/obj/item/weapon/card/id/I = src
|
|
||||||
jobName = I.rank
|
if(I)
|
||||||
|
var/job_icons = get_all_job_icons()
|
||||||
|
var/centcom = get_all_centcom_jobs()
|
||||||
|
|
||||||
|
if(I.assignment in job_icons) //Check if the job has a hud icon
|
||||||
|
return I.assignment
|
||||||
|
if(I.rank in job_icons)
|
||||||
|
return I.rank
|
||||||
|
|
||||||
|
if(I.assignment in centcom) //Return with the NT logo if it is a Centcom job
|
||||||
|
return "Centcom"
|
||||||
|
if(I.rank in centcom)
|
||||||
|
return "Centcom"
|
||||||
|
else
|
||||||
|
return
|
||||||
|
|
||||||
if(jobName in get_all_job_icons()) //Check if the job has a hud icon
|
|
||||||
return jobName
|
|
||||||
if(jobName in get_all_centcom_jobs()) //Return with the NT logo if it is a Centcom job
|
|
||||||
return "Centcom"
|
|
||||||
return "Unknown" //Return unknown if none of the above apply
|
return "Unknown" //Return unknown if none of the above apply
|
||||||
|
|||||||
Reference in New Issue
Block a user