diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index d447e9fdb1c..1c105e523c9 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -39,4 +39,11 @@ #define PARALLAX_DELAY_DEFAULT world.tick_lag #define PARALLAX_DELAY_MED 1 -#define PARALLAX_DELAY_LOW 2 \ No newline at end of file +#define PARALLAX_DELAY_LOW 2 + +#define SEC_DEPT_NONE "None" +#define SEC_DEPT_RANDOM "Random" +#define SEC_DEPT_ENGINEERING "Engineering" +#define SEC_DEPT_MEDICAL "Medical" +#define SEC_DEPT_SCIENCE "Science" +#define SEC_DEPT_SUPPLY "Supply" \ No newline at end of file diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index b2448a401f7..94828b680da 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -38,6 +38,8 @@ var/global/list/r_wings_list = list() var/global/list/ghost_forms_with_directions_list = list("ghost") //stores the ghost forms that support directional sprites var/global/list/ghost_forms_with_accessories_list = list("ghost") //stores the ghost forms that support hair and other such things +var/global/list/security_depts_prefs = list(SEC_DEPT_RANDOM, SEC_DEPT_NONE, SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, SEC_DEPT_SCIENCE, SEC_DEPT_SUPPLY) + //Backpacks #define GBACKPACK "Grey Backpack" #define GSATCHEL "Grey Satchel" diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 368dbbf793e..d4014602ac2 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -64,7 +64,7 @@ var/list/preferences_datums = list() var/list/features = list("mcolor" = "FFF", "tail_lizard" = "Smooth", "tail_human" = "None", "snout" = "Round", "horns" = "None", "ears" = "None", "wings" = "None", "frills" = "None", "spines" = "None", "body_markings" = "None", "legs" = "Normal Legs") var/list/custom_names = list("clown", "mime", "ai", "cyborg", "religion", "deity") - var/prefered_security_department = "Random" + var/prefered_security_department = SEC_DEPT_RANDOM //Mob preview var/icon/preview_icon = null @@ -1086,8 +1086,7 @@ var/list/preferences_datums = list() else user << "Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and ." if("sec_dept") - var/list/depts = list("Random", "None", "Engineering", "Medical", "Science", "Supply") - var/department = input(user, "Choose your prefered security department:", "Security Departments") as null|anything in depts + var/department = input(user, "Choose your prefered security department:", "Security Departments") as null|anything in security_depts_prefs if(department) prefered_security_department = department if ("preferred_map") diff --git a/code/modules/jobs/job_types/security.dm b/code/modules/jobs/job_types/security.dm index b3768635d46..eb9d0e8214b 100644 --- a/code/modules/jobs/job_types/security.dm +++ b/code/modules/jobs/job_types/security.dm @@ -199,27 +199,26 @@ var/list/available_depts = list("Engineering", "Supply", "Medical", "Science") var/list/dep_access = null var/destination = null var/spawn_point = null - switch(department) - if("Supply") + if(SEC_DEPT_SUPPLY) ears = /obj/item/device/radio/headset/headset_sec/alt/department/supply dep_access = list(access_mailsorting, access_mining, access_mining_station) destination = /area/security/checkpoint/supply spawn_point = locate(/obj/effect/landmark/start/depsec/supply) in department_security_spawns tie = /obj/item/clothing/tie/armband/cargo - if("Engineering") + if(SEC_DEPT_ENGINEERING) ears = /obj/item/device/radio/headset/headset_sec/alt/department/engi dep_access = list(access_construction, access_engine) destination = /area/security/checkpoint/engineering spawn_point = locate(/obj/effect/landmark/start/depsec/engineering) in department_security_spawns tie = /obj/item/clothing/tie/armband/engine - if("Medical") + if(SEC_DEPT_MEDICAL) ears = /obj/item/device/radio/headset/headset_sec/alt/department/med dep_access = list(access_medical) destination = /area/security/checkpoint/medical spawn_point = locate(/obj/effect/landmark/start/depsec/medical) in department_security_spawns tie = /obj/item/clothing/tie/armband/medblue - if("Science") + if(SEC_DEPT_SCIENCE) ears = /obj/item/device/radio/headset/headset_sec/alt/department/sci dep_access = list(access_research) destination = /area/security/checkpoint/science