diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm index 6e3cf88e77..bd4336506c 100644 --- a/code/game/jobs/job/captain.dm +++ b/code/game/jobs/job/captain.dm @@ -9,7 +9,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) flag = CAPTAIN departments = list(DEPARTMENT_COMMAND) sorting_order = 3 // Above everyone. - head_position = 1 + departments_managed = list(DEPARTMENT_COMMAND) department_flag = ENGSEC faction = "Station" total_positions = 1 @@ -61,7 +61,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) flag = HOP departments = list(DEPARTMENT_CIVILIAN, DEPARTMENT_CARGO, DEPARTMENT_COMMAND) sorting_order = 2 // Above the QM, below captain. - head_position = 1 + departments_managed = list(DEPARTMENT_CIVILIAN, DEPARTMENT_CARGO) department_flag = CIVILIAN faction = "Station" total_positions = 1 @@ -109,7 +109,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) title = "Command Secretary" flag = BRIDGE departments = list(DEPARTMENT_COMMAND) - head_position = 1 + department_accounts = list(DEPARTMENT_COMMAND) department_flag = CIVILIAN faction = "Station" total_positions = 2 diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm index 3fa836f8d3..571ef67efd 100644 --- a/code/game/jobs/job/civilian.dm +++ b/code/game/jobs/job/civilian.dm @@ -98,7 +98,7 @@ flag = QUARTERMASTER departments = list(DEPARTMENT_CARGO) sorting_order = 1 // QM is above the cargo techs, but below the HoP. - head_position = 1 + departments_managed = list(DEPARTMENT_CARGO) department_flag = CIVILIAN faction = "Station" total_positions = 1 diff --git a/code/game/jobs/job/engineering.dm b/code/game/jobs/job/engineering.dm index ec64cce53d..4ac1c08367 100644 --- a/code/game/jobs/job/engineering.dm +++ b/code/game/jobs/job/engineering.dm @@ -4,7 +4,7 @@ /datum/job/chief_engineer title = "Chief Engineer" flag = CHIEF - head_position = 1 + departments_managed = list(DEPARTMENT_ENGINEERING) departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_COMMAND) sorting_order = 2 department_flag = ENGSEC diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index be6096870d..05cad33ca9 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -18,7 +18,8 @@ var/minimal_player_age = 0 // If you have use_age_restriction_for_jobs config option enabled and the database set up, this option will add a requirement for players to be at least minimal_player_age days old. (meaning they first signed in at least that many days before.) var/list/departments = list() // List of departments this job belongs to, if any. The first one on the list will be the 'primary' department. var/sorting_order = 0 // Used for sorting jobs so boss jobs go above regular ones, and their boss's boss is above that. Higher numbers = higher in sorting. - var/head_position = 0 // Is this position Command? + var/departments_managed = null // Is this a management position? If yes, list of departments managed. Otherwise null. + var/department_accounts = null // Which department accounts should people with this position be given the pin for? var/assignable = TRUE // Should it show up on things like the ID computer? var/minimum_character_age = 0 var/ideal_character_age = 30 @@ -32,6 +33,10 @@ // Description of the job's role and minimum responsibilities. var/job_description = "This Job doesn't have a description! Please report it!" +/datum/job/New() + . = ..() + department_accounts = department_accounts || departments_managed + /datum/job/proc/equip(var/mob/living/carbon/human/H, var/alt_title) var/decl/hierarchy/outfit/outfit = get_outfit(H, alt_title) if(!outfit) diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm index 50f3a1c2f4..43e59b8663 100644 --- a/code/game/jobs/job/medical.dm +++ b/code/game/jobs/job/medical.dm @@ -4,7 +4,7 @@ /datum/job/cmo title = "Chief Medical Officer" flag = CMO - head_position = 1 + departments_managed = list(DEPARTMENT_MEDICAL) departments = list(DEPARTMENT_MEDICAL, DEPARTMENT_COMMAND) sorting_order = 2 department_flag = MEDSCI diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm index 97f608a7a1..4f90d1622b 100644 --- a/code/game/jobs/job/science.dm +++ b/code/game/jobs/job/science.dm @@ -4,7 +4,7 @@ /datum/job/rd title = "Research Director" flag = RD - head_position = 1 + departments_managed = list(DEPARTMENT_RESEARCH) departments = list(DEPARTMENT_RESEARCH, DEPARTMENT_COMMAND) sorting_order = 2 department_flag = MEDSCI diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index 6771f331d6..6a3954f9f0 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -4,7 +4,7 @@ /datum/job/hos title = "Head of Security" flag = HOS - head_position = 1 + departments_managed = list(DEPARTMENT_SECURITY) departments = list(DEPARTMENT_SECURITY, DEPARTMENT_COMMAND) sorting_order = 2 department_flag = ENGSEC diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index c528cf895e..682df8495f 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -422,14 +422,14 @@ var/global/datum/controller/occupations/job_master log_game("JOINED [key_name(H)] as \"[rank]\"") // If they're head, give them the account info for their department - if(H.mind && job.head_position && LAZYLEN(job.departments)) + if(H.mind && job.department_accounts) var/remembered_info = "" - var/datum/money_account/department_account = department_accounts[job.departments[1]] - - if(department_account) - remembered_info += "Your department's account number is: #[department_account.account_number]
" - remembered_info += "Your department's account pin is: [department_account.remote_access_pin]
" - remembered_info += "Your department's account funds are: $[department_account.money]
" + for(var/D in job.department_accounts) + var/datum/money_account/department_account = department_accounts[D] + if(department_account) + remembered_info += "Department account number ([D]): #[department_account.account_number]
" + remembered_info += "Department account pin ([D]): [department_account.remote_access_pin]
" + remembered_info += "Department account funds ([D]): $[department_account.money]
" H.mind.store_memory(remembered_info) diff --git a/code/modules/client/preference_setup/occupation/occupation.dm b/code/modules/client/preference_setup/occupation/occupation.dm index 3114b4962c..fea4b5ec51 100644 --- a/code/modules/client/preference_setup/occupation/occupation.dm +++ b/code/modules/client/preference_setup/occupation/occupation.dm @@ -179,10 +179,10 @@ dat += "Alternate titles: [english_list(job.alt_titles)]." send_rsc(user, job.get_job_icon(), "job[ckey(rank)].png") dat += "" - if(job.department) - dat += "Department: [job.department]." - if(job.head_position) - dat += "You manage this department." + if(job.departments) + dat += "Departments: [english_list(job.departments)]." + if(LAZYLEN(job.departments_managed)) + dat += "You manage these departments: [english_list(job.departments_managed)]" dat += "You answer to [job.supervisors] normally."