diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm index 8fefbe4a921..6985d300abb 100644 --- a/code/game/jobs/job/captain.dm +++ b/code/game/jobs/job/captain.dm @@ -7,6 +7,7 @@ spawn_positions = 1 supervisors = "Nanotrasen officials and Space law" selection_color = "#ccccff" + idtype = /obj/item/weapon/card/id/gold equip(var/mob/living/carbon/human/H) @@ -42,6 +43,7 @@ spawn_positions = 1 supervisors = "the captain" selection_color = "#ddddff" + idtype = /obj/item/weapon/card/id/silver equip(var/mob/living/carbon/human/H) diff --git a/code/game/jobs/job/engineering.dm b/code/game/jobs/job/engineering.dm index 738d41683e3..1342930800f 100644 --- a/code/game/jobs/job/engineering.dm +++ b/code/game/jobs/job/engineering.dm @@ -7,6 +7,7 @@ spawn_positions = 1 supervisors = "the captain" selection_color = "#ffeeaa" + idtype = /obj/item/weapon/card/id/silver equip(var/mob/living/carbon/human/H) diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index dc320cbbab2..907994efdef 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -25,5 +25,8 @@ //Sellection screen color var/selection_color = "#ffffff" + //the type of the ID the player will have + var/idtype = /obj/item/weapon/card/id + /datum/job/proc/equip(var/mob/living/carbon/human/H) return 1 diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm index fc5d1e94a9a..4edc9418260 100644 --- a/code/game/jobs/job/medical.dm +++ b/code/game/jobs/job/medical.dm @@ -7,6 +7,7 @@ spawn_positions = 1 supervisors = "the captain" selection_color = "#ffddf0" + idtype = /obj/item/weapon/card/id/silver equip(var/mob/living/carbon/human/H) diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm index f62138b5150..739e68c6df9 100644 --- a/code/game/jobs/job/science.dm +++ b/code/game/jobs/job/science.dm @@ -7,6 +7,7 @@ spawn_positions = 1 supervisors = "the captain" selection_color = "#ffddff" + idtype = /obj/item/weapon/card/id/silver equip(var/mob/living/carbon/human/H) diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index 4e07e155857..ded3875298a 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -7,6 +7,7 @@ spawn_positions = 1 supervisors = "the captain" selection_color = "#ffdddd" + idtype = /obj/item/weapon/card/id/silver equip(var/mob/living/carbon/human/H) diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 7bda7734832..5f7079362d5 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -251,15 +251,20 @@ var/global/datum/controller/occupations/job_master proc/spawnId(var/mob/living/carbon/human/H, rank) if(!H) return 0 var/obj/item/weapon/card/id/C = null - switch(rank) - if("Cyborg") + + var/datum/job/job = null + for(var/datum/job/J in occupations) + if(J.title == rank) + job = J + break + + if(job) + if(job.title == "Cyborg") return - if("Captain") - C = new /obj/item/weapon/card/id/gold(H) - if("Head of Personnel" , "Head of Security" , "Chief Engineer" , "Research Director" , "Chief Medical Officer") // You get an ugly ID - C = new /obj/item/weapon/card/id/silver(H) else - C = new /obj/item/weapon/card/id(H) + C = new job.idtype(H) + else + C = new /obj/item/weapon/card/id(H) if(C) C.registered = H.real_name C.assignment = rank