diff --git a/code/__DEFINES/departments_defines.dm b/code/__DEFINES/departments_defines.dm index f2a5a7ed927..698123e51b7 100644 --- a/code/__DEFINES/departments_defines.dm +++ b/code/__DEFINES/departments_defines.dm @@ -5,6 +5,30 @@ #define DEPARTMENT_SUPPLY "Supply" #define DEPARTMENT_SERVICE "Service" #define DEPARTMENT_SECURITY "Security" -#define DEPARTMENT_ASSISTANT "Assistant" -#define DEPARTMENT_SILICON "Silicon" +#define DEPARTMENT_ASSISTANT "Assistant" // Does not have a corresponding bitflag +#define DEPARTMENT_SILICON "Silicon" // Does not have a corresponding bitflag #define DEPARTMENT_COMMAND "Command" + +#define DEP_FLAG_SUPPLY (1<<0) +#define DEP_FLAG_SERVICE (1<<1) +#define DEP_FLAG_COMMAND (1<<2) +#define DEP_FLAG_LEGAL (1<<3) +#define DEP_FLAG_ENGINEERING (1<<4) +#define DEP_FLAG_MEDICAL (1<<5) +#define DEP_FLAG_SCIENCE (1<<6) +#define DEP_FLAG_SECURITY (1<<7) + + +// ---- Unused, but here is an easy way to transfer from the department string, +// to the corresponding bitflag if it has one. + +// GLOBAL_LIST_INIT(department_str_to_flag, list( +// DEPARTMENT_ENGINEERING = DEP_FLAG_ENGINEERING, +// DEPARTMENT_MEDICAL = DEP_FLAG_MEDICAL, +// DEPARTMENT_SCIENCE = DEP_FLAG_SCIENCE, +// DEPARTMENT_SUPPLY = DEP_FLAG_SUPPLY, +// DEPARTMENT_SERVICE = DEP_FLAG_SERVICE, +// DEPARTMENT_SECURITY = DEP_FLAG_SECURITY, +// DEPARTMENT_COMMAND = DEP_FLAG_COMMAND +// ) +// ) diff --git a/code/controllers/subsystem/SSjobs.dm b/code/controllers/subsystem/SSjobs.dm index b720526e60a..e23b25a0741 100644 --- a/code/controllers/subsystem/SSjobs.dm +++ b/code/controllers/subsystem/SSjobs.dm @@ -74,6 +74,8 @@ SUBSYSTEM_DEF(jobs) var/datum/job/job = GetJob(rank) if(!job) return FALSE + if(job.job_banned_gamemode) + return FALSE if(jobban_isbanned(player, rank)) return FALSE if(!job.player_old_enough(player.client)) @@ -105,12 +107,17 @@ SUBSYSTEM_DEF(jobs) Debug("AR has failed, Player: [player], Rank: [rank]") return 0 -/datum/controller/subsystem/jobs/proc/FreeRole(rank) //making additional slot on the fly +/datum/controller/subsystem/jobs/proc/FreeRole(rank, force = FALSE) //making additional slot on the fly var/datum/job/job = GetJob(rank) + if(job.job_banned_gamemode) + if(!force) + return FALSE + job.job_banned_gamemode = FALSE // If admins want to force it, they can reopen banned job slots + if(job && job.current_positions >= job.total_positions && job.total_positions != -1) job.total_positions++ - return 1 - return 0 + return TRUE + return FALSE /datum/controller/subsystem/jobs/proc/FindOccupationCandidates(datum/job/job, level, flag) Debug("Running FOC, Job: [job], Level: [level], Flag: [flag]") @@ -426,21 +433,21 @@ SUBSYSTEM_DEF(jobs) L.Add("Your role on the station is: [alt_title ? alt_title : rank].") L.Add("You answer directly to [job.supervisors]. Special circumstances may change this.") L.Add("For more information on how the station works, see Standard Operating Procedure (SOP).") - if(job.is_service) + if(job.job_department_flags & DEP_FLAG_SERVICE) L.Add("As a member of Service, make sure to read up on your Department SOP.") - if(job.is_supply) + if(job.job_department_flags & DEP_FLAG_SUPPLY) L.Add("As a member of Supply, make sure to read up on your Department SOP.") - if(job.is_command) + if(job.job_department_flags == DEP_FLAG_COMMAND) // Check if theyre only command, like captain/hop/bs/ntrep, to not spam their chatbox L.Add("As an important member of Command, read up on your Department SOP.") - if(job.is_legal) + if(job.job_department_flags & DEP_FLAG_LEGAL) L.Add("Your job requires complete knowledge of Space Law and Legal Standard Operating Procedure.") - if(job.is_engineering) + if(job.job_department_flags & DEP_FLAG_ENGINEERING) L.Add("As a member of Engineering, make sure to read up on your Department SOP.") - if(job.is_medical) + if(job.job_department_flags & DEP_FLAG_MEDICAL) L.Add("As a member of Medbay, make sure to read up on your Department SOP.") - if(job.is_science) + if(job.job_department_flags & DEP_FLAG_SCIENCE) // geneticist gets both, yeah sure why not L.Add("As a member of Science, make sure to read up on your Department SOP.") - if(job.is_security) + if(job.job_department_flags & DEP_FLAG_SECURITY) L.Add("As a member of Security, you are to know Space Law, Legal Standard Operating Procedure, as well as your Department SOP.") if(job.req_admin_notify) L.Add("You are playing a job that is important for the game progression. If you have to disconnect, please go to cryo and inform command. If you are unable to do so, please notify the admins via adminhelp.") diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 914ae3b18f7..8dabb97a2e5 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -319,11 +319,6 @@ synd_mob.update_icons() return 1 -/datum/game_mode/nuclear/check_win() - if(nukes_left == 0) - return 1 - return ..() - /datum/game_mode/proc/is_operatives_are_dead() for(var/datum/mind/operative_mind in syndicates) diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 30b841c9ccb..3d95e5a5839 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -3,7 +3,6 @@ // Just make sure the converter is a head before you call it! // To remove a rev (from brainwashing or w/e), call SSticker.mode.remove_revolutionary(_THE_PLAYERS_MIND_), // this will also check they're not a head, so it can just be called freely -// If the game somtimes isn't registering a win properly, then SSticker.mode.check_win() isn't being called somewhere. #define REV_VICTORY 1 #define STATION_VICTORY 2 @@ -76,7 +75,7 @@ check_counter++ if(check_counter >= 5) if(!finished) - rev_team.update_team_objectives() + rev_team.check_all_victory() check_counter = 0 return FALSE @@ -128,6 +127,7 @@ conversion_target.Silence(10 SECONDS) conversion_target.Stun(10 SECONDS) return TRUE + ////////////////////////////////////////////////////////////////////////////// //Deals with players being converted from the revolution (Not a rev anymore)// // Modified to handle borged MMIs. Accepts another var if the target is being borged at the time -- Polymorph. ////////////////////////////////////////////////////////////////////////////// diff --git a/code/game/jobs/job/engineering_jobs.dm b/code/game/jobs/job/engineering_jobs.dm index 0a72e59cfea..e3081f425b2 100644 --- a/code/game/jobs/job/engineering_jobs.dm +++ b/code/game/jobs/job/engineering_jobs.dm @@ -4,7 +4,7 @@ department_flag = JOBCAT_ENGSEC total_positions = 1 spawn_positions = 1 - is_engineering = TRUE + job_department_flags = DEP_FLAG_COMMAND | DEP_FLAG_ENGINEERING supervisors = "the captain" department_head = list("Captain") selection_color = "#ffeeaa" @@ -54,7 +54,7 @@ department_flag = JOBCAT_ENGSEC total_positions = 5 spawn_positions = 5 - is_engineering = 1 + job_department_flags = DEP_FLAG_ENGINEERING supervisors = "the chief engineer" department_head = list("Chief Engineer") selection_color = "#fff5cc" @@ -91,7 +91,7 @@ department_flag = JOBCAT_ENGSEC total_positions = 3 spawn_positions = 2 - is_engineering = 1 + job_department_flags = DEP_FLAG_ENGINEERING supervisors = "the chief engineer" department_head = list("Chief Engineer") selection_color = "#fff5cc" diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index bd3535753e8..5336b7861a3 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -41,15 +41,8 @@ //If this is set to 1, a text is printed to the player when jobs are assigned, telling him that he should let admins know that he has to disconnect. var/req_admin_notify - //Various Departmental identifiers - var/is_supply - var/is_service - var/is_command - var/is_legal - var/is_engineering - var/is_medical - var/is_science - var/is_security + /// Flags for identifying by department, because we need other shit that isnt for the database + var/job_department_flags //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/minimal_player_age = 0 @@ -74,6 +67,9 @@ ///Job Objectives that crew with this job will have a roundstart var/required_objectives = list() + /// Boolean detailing if this job has been banned because of a gamemode restriction i.e. The revolution has won, no more command + var/job_banned_gamemode = FALSE + //Only override this proc /datum/job/proc/after_spawn(mob/living/carbon/human/H) @@ -142,9 +138,13 @@ return FALSE /datum/job/proc/is_position_available() + if(job_banned_gamemode) + return FALSE return (current_positions < total_positions) || (total_positions == -1) /datum/job/proc/is_spawn_position_available() + if(job_banned_gamemode) + return FALSE return (current_positions < spawn_positions) || (spawn_positions == -1) /datum/outfit/job diff --git a/code/game/jobs/job/medical_jobs.dm b/code/game/jobs/job/medical_jobs.dm index 76b8e1cfbaa..3449f62a653 100644 --- a/code/game/jobs/job/medical_jobs.dm +++ b/code/game/jobs/job/medical_jobs.dm @@ -4,7 +4,7 @@ department_flag = JOBCAT_MEDSCI total_positions = 1 spawn_positions = 1 - is_medical = 1 + job_department_flags = DEP_FLAG_COMMAND | DEP_FLAG_MEDICAL supervisors = "the captain" department_head = list("Captain") selection_color = "#ffddf0" @@ -48,7 +48,7 @@ department_flag = JOBCAT_MEDSCI total_positions = 5 spawn_positions = 3 - is_medical = 1 + job_department_flags = DEP_FLAG_MEDICAL supervisors = "the chief medical officer" department_head = list("Chief Medical Officer") selection_color = "#ffeef0" @@ -82,7 +82,7 @@ department_flag = JOBCAT_MEDSCI total_positions = 1 spawn_positions = 1 - is_medical = 1 + job_department_flags = DEP_FLAG_MEDICAL supervisors = "the chief medical officer" department_head = list("Chief Medical Officer") selection_color = "#ffeef0" @@ -143,7 +143,7 @@ department_flag = JOBCAT_MEDSCI total_positions = 2 spawn_positions = 2 - is_medical = 1 + job_department_flags = DEP_FLAG_MEDICAL supervisors = "the chief medical officer" department_head = list("Chief Medical Officer") selection_color = "#ffeef0" @@ -176,7 +176,7 @@ department_flag = JOBCAT_MEDSCI total_positions = 2 spawn_positions = 2 - is_medical = 1 + job_department_flags = DEP_FLAG_MEDICAL | DEP_FLAG_SCIENCE supervisors = "the chief medical officer and the research director" department_head = list("Chief Medical Officer", "Research Director") selection_color = "#ffeef0" @@ -209,7 +209,7 @@ department_flag = JOBCAT_MEDSCI total_positions = 1 spawn_positions = 1 - is_medical = 1 + job_department_flags = DEP_FLAG_MEDICAL supervisors = "the chief medical officer" department_head = list("Chief Medical Officer") selection_color = "#ffeef0" @@ -243,7 +243,7 @@ department_flag = JOBCAT_MEDSCI total_positions = 1 spawn_positions = 1 - is_medical = 1 + job_department_flags = DEP_FLAG_MEDICAL supervisors = "the chief medical officer" department_head = list("Chief Medical Officer") selection_color = "#ffeef0" @@ -281,7 +281,7 @@ department_flag = JOBCAT_MEDSCI total_positions = 1 spawn_positions = 1 - is_medical = 1 + job_department_flags = DEP_FLAG_MEDICAL supervisors = "the chief medical officer" department_head = list("Chief Medical Officer") selection_color = "#ffeef0" diff --git a/code/game/jobs/job/science_jobs.dm b/code/game/jobs/job/science_jobs.dm index 0ec12ca261c..d6e468418fc 100644 --- a/code/game/jobs/job/science_jobs.dm +++ b/code/game/jobs/job/science_jobs.dm @@ -4,7 +4,7 @@ department_flag = JOBCAT_MEDSCI total_positions = 1 spawn_positions = 1 - is_science = 1 + job_department_flags = DEP_FLAG_COMMAND | DEP_FLAG_SCIENCE supervisors = "the captain" department_head = list("Captain") selection_color = "#ffddff" @@ -55,7 +55,7 @@ department_flag = JOBCAT_MEDSCI total_positions = 6 spawn_positions = 6 - is_science = 1 + job_department_flags = DEP_FLAG_SCIENCE supervisors = "the research director" department_head = list("Research Director") selection_color = "#ffeeff" @@ -93,7 +93,7 @@ department_flag = JOBCAT_MEDSCI total_positions = 2 spawn_positions = 2 - is_science = 1 + job_department_flags = DEP_FLAG_SCIENCE supervisors = "the research director" department_head = list("Research Director") selection_color = "#ffeeff" diff --git a/code/game/jobs/job/security_jobs.dm b/code/game/jobs/job/security_jobs.dm index 4cb6f8026c8..f7c1a83c16f 100644 --- a/code/game/jobs/job/security_jobs.dm +++ b/code/game/jobs/job/security_jobs.dm @@ -4,7 +4,7 @@ department_flag = JOBCAT_ENGSEC total_positions = 1 spawn_positions = 1 - is_security = 1 + job_department_flags = DEP_FLAG_COMMAND | DEP_FLAG_SECURITY supervisors = "the captain" department_head = list("Captain") selection_color = "#ffdddd" @@ -58,7 +58,7 @@ department_flag = JOBCAT_ENGSEC total_positions = 1 spawn_positions = 1 - is_security = 1 + job_department_flags = DEP_FLAG_SECURITY supervisors = "the head of security" department_head = list("Head of Security") selection_color = "#ffeeee" @@ -103,7 +103,7 @@ department_flag = JOBCAT_ENGSEC total_positions = 1 spawn_positions = 1 - is_security = 1 + job_department_flags = DEP_FLAG_SECURITY supervisors = "the head of security" department_head = list("Head of Security") selection_color = "#ffeeee" @@ -163,7 +163,7 @@ department_flag = JOBCAT_ENGSEC total_positions = 7 spawn_positions = 7 - is_security = 1 + job_department_flags = DEP_FLAG_SECURITY supervisors = "the head of security" department_head = list("Head of Security") selection_color = "#ffeeee" diff --git a/code/game/jobs/job/supervisor.dm b/code/game/jobs/job/supervisor.dm index 1fa31414131..c16aa06f36a 100644 --- a/code/game/jobs/job/supervisor.dm +++ b/code/game/jobs/job/supervisor.dm @@ -8,7 +8,7 @@ department_head = list("Nanotrasen Navy Officer") selection_color = "#ccccff" req_admin_notify = 1 - is_command = TRUE + job_department_flags = DEP_FLAG_COMMAND department_account_access = TRUE access = list() //See get_access() minimal_access = list() //See get_access() @@ -66,7 +66,7 @@ department_head = list("Captain") selection_color = "#ddddff" req_admin_notify = 1 - is_command = 1 + job_department_flags = DEP_FLAG_COMMAND minimal_player_age = 21 department_account_access = TRUE exp_map = list(EXP_TYPE_SERVICE = 1200) @@ -115,7 +115,7 @@ department_head = list("Captain") selection_color = "#ddddff" req_admin_notify = TRUE - is_command = TRUE + job_department_flags = DEP_FLAG_COMMAND transfer_allowed = FALSE minimal_player_age = 21 exp_map = list(EXP_TYPE_COMMAND = 3000) // 50 hours baby @@ -163,7 +163,7 @@ department_head = list("Captain") selection_color = "#ddddff" req_admin_notify = TRUE - is_command = TRUE + job_department_flags = DEP_FLAG_COMMAND transfer_allowed = FALSE minimal_player_age = 21 exp_map = list(EXP_TYPE_COMMAND = 3000) // 50 hours baby @@ -211,7 +211,7 @@ department_head = list("Captain") selection_color = "#ddddff" req_admin_notify = TRUE - is_legal = TRUE + job_department_flags = DEP_FLAG_LEGAL transfer_allowed = FALSE minimal_player_age = 30 exp_map = list(EXP_TYPE_SECURITY = 6000) // 100 hours baby @@ -255,7 +255,7 @@ department_flag = JOBCAT_SUPPORT total_positions = 2 spawn_positions = 2 - is_legal = 1 + job_department_flags = DEP_FLAG_LEGAL supervisors = "the magistrate" department_head = list("Captain") selection_color = "#ddddff" diff --git a/code/game/jobs/job/support.dm b/code/game/jobs/job/support.dm index 4cac8cc1453..fda0554f2ea 100644 --- a/code/game/jobs/job/support.dm +++ b/code/game/jobs/job/support.dm @@ -5,7 +5,7 @@ department_flag = JOBCAT_SUPPORT total_positions = 1 spawn_positions = 1 - is_supply = 1 + job_department_flags = DEP_FLAG_SUPPLY | DEP_FLAG_COMMAND supervisors = "the captain" department_head = list("Captain") department_account_access = TRUE @@ -42,7 +42,7 @@ department_flag = JOBCAT_SUPPORT total_positions = 2 spawn_positions = 2 - is_supply = 1 + job_department_flags = DEP_FLAG_SUPPLY supervisors = "the quartermaster" department_head = list("Quartermaster") selection_color = "#eeddbe" @@ -70,7 +70,7 @@ department_flag = JOBCAT_SUPPORT total_positions = 6 spawn_positions = 8 - is_supply = 1 + job_department_flags = DEP_FLAG_SUPPLY supervisors = "the quartermaster" department_head = list("Quartermaster") selection_color = "#eeddbe" @@ -141,7 +141,7 @@ department_flag = JOBCAT_SUPPORT total_positions = 1 spawn_positions = 1 - is_service = 1 + job_department_flags = DEP_FLAG_SERVICE supervisors = "the head of personnel" department_head = list("Head of Personnel") selection_color = "#dddddd" @@ -185,7 +185,7 @@ department_flag = JOBCAT_SUPPORT total_positions = 1 spawn_positions = 1 - is_service = 1 + job_department_flags = DEP_FLAG_SERVICE supervisors = "the head of personnel" department_head = list("Head of Personnel") selection_color = "#dddddd" @@ -226,7 +226,7 @@ department_flag = JOBCAT_SUPPORT total_positions = 3 spawn_positions = 2 - is_service = 1 + job_department_flags = DEP_FLAG_SERVICE supervisors = "the head of personnel" department_head = list("Head of Personnel") selection_color = "#dddddd" @@ -261,7 +261,7 @@ department_flag = JOBCAT_SUPPORT total_positions = 1 spawn_positions = 1 - is_service = 1 + job_department_flags = DEP_FLAG_SERVICE supervisors = "the head of personnel" department_head = list("Head of Personnel") selection_color = "#dddddd" @@ -351,7 +351,7 @@ department_flag = JOBCAT_SUPPORT total_positions = 1 spawn_positions = 1 - is_service = 1 + job_department_flags = DEP_FLAG_SERVICE supervisors = "the head of personnel" department_head = list("Head of Personnel") selection_color = "#dddddd" @@ -402,7 +402,7 @@ department_flag = JOBCAT_SUPPORT total_positions = 1 spawn_positions = 1 - is_service = 1 + job_department_flags = DEP_FLAG_SERVICE supervisors = "the head of personnel" department_head = list("Head of Personnel") selection_color = "#dddddd" @@ -430,7 +430,7 @@ department_flag = JOBCAT_SUPPORT total_positions = 1 spawn_positions = 1 - is_service = 1 + job_department_flags = DEP_FLAG_SERVICE supervisors = "the head of personnel" department_head = list("Head of Personnel") selection_color = "#dddddd" @@ -460,7 +460,7 @@ department_flag = JOBCAT_SUPPORT total_positions = 1 spawn_positions = 1 - is_service = TRUE + job_department_flags = DEP_FLAG_SERVICE supervisors = "the head of personnel" department_head = list("Head of Personnel") selection_color = "#dddddd" diff --git a/code/game/jobs/job/support_chaplain.dm b/code/game/jobs/job/support_chaplain.dm index ea6d3ae79c3..39d66aa46ea 100644 --- a/code/game/jobs/job/support_chaplain.dm +++ b/code/game/jobs/job/support_chaplain.dm @@ -5,7 +5,7 @@ department_flag = JOBCAT_SUPPORT total_positions = 1 spawn_positions = 1 - is_service = TRUE + job_department_flags = DEP_FLAG_SERVICE supervisors = "the head of personnel" department_head = list("Head of Personnel") selection_color = "#dddddd" diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 425ca4ef9e5..481d2ab5c54 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -181,6 +181,8 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) return FALSE if(!job_in_department(job, FALSE)) return FALSE + if(job.job_banned_gamemode) // you cannot open a slot for more sec/legal after revs win + return FALSE if((job.total_positions > GLOB.player_list.len * (max_relative_positions / 100))) return FALSE if(opened_positions[job.title] < 0) @@ -199,6 +201,8 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) return FALSE if(!job_in_department(job, FALSE)) return FALSE + if(job.job_banned_gamemode) // you cannot edit this slot after revs win + return FALSE if(job in SSjobs.prioritized_jobs) // different to above return FALSE if(job.total_positions <= job.current_positions) // different to above diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 53cddf617d3..6dfda9d3270 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -875,7 +875,7 @@ GLOBAL_LIST_INIT(view_runtimes_verbs, list( return var/job = input("Please select job slot to free", "Free Job Slot") as null|anything in jobs if(job) - SSjobs.FreeRole(job) + SSjobs.FreeRole(job, force = TRUE) log_admin("[key_name(usr)] has freed a job slot for [job].") message_admins("[key_name_admin(usr)] has freed a job slot for [job].") diff --git a/code/modules/antagonists/revolutionary/team_revolution.dm b/code/modules/antagonists/revolutionary/team_revolution.dm index b11b5b74d19..061140cd20b 100644 --- a/code/modules/antagonists/revolutionary/team_revolution.dm +++ b/code/modules/antagonists/revolutionary/team_revolution.dm @@ -53,6 +53,7 @@ . = TRUE /datum/team/revolution/proc/check_all_victory() + update_team_objectives() check_rev_victory() check_heads_victory() @@ -62,6 +63,16 @@ return FALSE SSshuttle.clearHostileEnvironment(src) // revs can take the shuttle too if they want + + log_admin("Revolutionary win conditions met. All command, security, and legal jobs are now closed.") + message_admins("The revolutionaries have won! All command, security, and legal jobs have been closed. You can change this with the \"Free Job Slot\" verb.") + // HOP can still technically alter some roles, but Nanotrasen wouldn't send heads/sec under threat to the station after revs win + var/banned_departments = DEP_FLAG_COMMAND | DEP_FLAG_SECURITY | DEP_FLAG_LEGAL + for(var/datum/job/job in SSjobs.occupations) + if(!(job.job_department_flags & banned_departments)) + continue + job.total_positions = 0 + job.job_banned_gamemode = TRUE return TRUE /datum/team/revolution/proc/check_heads_victory() diff --git a/code/modules/mob/living/carbon/human/species/grey.dm b/code/modules/mob/living/carbon/human/species/grey.dm index 9c38ee94acc..fc7afd064ce 100644 --- a/code/modules/mob/living/carbon/human/species/grey.dm +++ b/code/modules/mob/living/carbon/human/species/grey.dm @@ -60,7 +60,7 @@ /datum/species/grey/after_equip_job(datum/job/J, mob/living/carbon/human/H) var/translator_pref = H.client.prefs.active_character.speciesprefs - if(translator_pref || ((ismindshielded(H) || J.is_command || J.supervisors == "the captain") && HAS_TRAIT(H, TRAIT_WINGDINGS))) + if(translator_pref || ((ismindshielded(H) || J.job_department_flags & DEP_FLAG_COMMAND) && HAS_TRAIT(H, TRAIT_WINGDINGS))) if(J.title == "Mime") return if(J.title == "Clown") diff --git a/code/modules/newscaster/obj/newscaster.dm b/code/modules/newscaster/obj/newscaster.dm index f079deb792e..00602b238aa 100644 --- a/code/modules/newscaster/obj/newscaster.dm +++ b/code/modules/newscaster/obj/newscaster.dm @@ -262,22 +262,22 @@ if(job.is_position_available()) var/list/opening_data = list("title" = job.title) // Is the job a command job? - if(job.title in GLOB.command_positions) + if(job.job_department_flags & DEP_FLAG_COMMAND) opening_data["is_command"] = TRUE // Add the job opening to the corresponding categories // Ugly! opening_data = list(opening_data) - if(job.is_security) + if(job.job_department_flags & DEP_FLAG_SECURITY) jobs["security"] += opening_data - if(job.is_engineering) + if(job.job_department_flags & DEP_FLAG_ENGINEERING) jobs["engineering"] += opening_data - if(job.is_medical) + if(job.job_department_flags & DEP_FLAG_MEDICAL) jobs["medical"] += opening_data - if(job.is_science) + if(job.job_department_flags & DEP_FLAG_SCIENCE) jobs["science"] += opening_data - if(job.is_service) + if(job.job_department_flags & DEP_FLAG_SERVICE) jobs["service"] += opening_data - if(job.is_supply) + if(job.job_department_flags & DEP_FLAG_SUPPLY) jobs["supply"] += opening_data // Append temp photo