diff --git a/code/__defines/misc_vr.dm b/code/__defines/misc_vr.dm index 9495a44187e..e6a71a36144 100644 --- a/code/__defines/misc_vr.dm +++ b/code/__defines/misc_vr.dm @@ -14,6 +14,8 @@ #define VANTAG_KIDNAP "vantag_kidnap" #define VANTAG_KILL "vantag_kill" +#define DEPARTMENT_OFFDUTY "Off-Duty" + #define ANNOUNCER_NAME "Facility PA" //For custom species diff --git a/code/controllers/subsystems/persist_vr.dm b/code/controllers/subsystems/persist_vr.dm index 0b021fefe9c..41811a2a6a5 100644 --- a/code/controllers/subsystems/persist_vr.dm +++ b/code/controllers/subsystems/persist_vr.dm @@ -36,13 +36,13 @@ SUBSYSTEM_DEF(persist) // Try and detect job and department of mob var/datum/job/J = detect_job(M) - if(!istype(J) || !J.pto_earning || !J.timeoff_factor) + if(!istype(J) || !J.pto_type || !J.timeoff_factor) if (MC_TICK_CHECK) return continue // Do not collect useless PTO - var/department_earning = J.pto_earning + var/department_earning = J.pto_type clear_unused_pto(M) // Update client whatever diff --git a/code/game/jobs/job/captain_vr.dm b/code/game/jobs/job/captain_vr.dm index c8faa4662e2..ea9f8ebed9b 100644 --- a/code/game/jobs/job/captain_vr.dm +++ b/code/game/jobs/job/captain_vr.dm @@ -1,10 +1,10 @@ /datum/job/captain disallow_jobhop = TRUE - pto_earning = PTO_CIVILIAN + pto_type = PTO_CIVILIAN /datum/job/hop disallow_jobhop = TRUE - pto_earning = PTO_CIVILIAN + pto_type = PTO_CIVILIAN alt_titles = list("Crew Resources Officer" = /datum/alt_title/cro, "Deputy Director" = /datum/alt_title/deputy_director) @@ -27,4 +27,4 @@ /datum/job/secretary disallow_jobhop = TRUE - pto_earning = PTO_CIVILIAN \ No newline at end of file + pto_type = PTO_CIVILIAN \ No newline at end of file diff --git a/code/game/jobs/job/civilian_vr.dm b/code/game/jobs/job/civilian_vr.dm index a028d334974..28441081875 100644 --- a/code/game/jobs/job/civilian_vr.dm +++ b/code/game/jobs/job/civilian_vr.dm @@ -1,33 +1,33 @@ /datum/job/bartender - pto_earning = PTO_CIVILIAN + pto_type = PTO_CIVILIAN /datum/job/chef total_positions = 2 //IT TAKES A LOT TO MAKE A STEW spawn_positions = 2 //A PINCH OF SALT AND LAUGHTER, TOO - pto_earning = PTO_CIVILIAN + pto_type = PTO_CIVILIAN /datum/job/hydro spawn_positions = 2 - pto_earning = PTO_CIVILIAN + pto_type = PTO_CIVILIAN /datum/job/qm - pto_earning = PTO_CARGO + pto_type = PTO_CARGO /datum/job/cargo_tech total_positions = 3 spawn_positions = 3 - pto_earning = PTO_CARGO + pto_type = PTO_CARGO /datum/job/mining total_positions = 4 spawn_positions = 4 - pto_earning = PTO_CARGO + pto_type = PTO_CARGO /datum/job/janitor //Lots of janitor substations on station. total_positions = 3 spawn_positions = 3 alt_titles = list("Custodian" = /datum/alt_title/custodian, "Sanitation Technician" = /datum/alt_title/sanitation_tech, "Maid" = /datum/alt_title/maid) - pto_earning = PTO_CIVILIAN + pto_type = PTO_CIVILIAN /datum/alt_title/sanitation_tech title = "Sanitation Technician" @@ -39,7 +39,7 @@ total_positions = 2 spawn_positions = 2 alt_titles = list("Journalist" = /datum/alt_title/journalist, "Writer" = /datum/alt_title/writer, "Historian" = /datum/alt_title/historian) - pto_earning = PTO_CIVILIAN + pto_type = PTO_CIVILIAN /datum/alt_title/historian title = "Historian" @@ -47,8 +47,8 @@ /datum/job/lawyer disallow_jobhop = TRUE - pto_earning = PTO_CIVILIAN + pto_type = PTO_CIVILIAN /datum/job/chaplain - pto_earning = PTO_CIVILIAN + pto_type = PTO_CIVILIAN diff --git a/code/game/jobs/job/department_vr.dm b/code/game/jobs/job/department_vr.dm new file mode 100644 index 00000000000..2af1d8e94fe --- /dev/null +++ b/code/game/jobs/job/department_vr.dm @@ -0,0 +1,6 @@ +/datum/department/misc + name = "Off-Duty" + short_name = "Offduty" + color = "#666666" + sorting_order = -5 + assignable = FALSE \ No newline at end of file diff --git a/code/game/jobs/job/engineering_vr.dm b/code/game/jobs/job/engineering_vr.dm index 99ebb0c06b4..10337d98813 100644 --- a/code/game/jobs/job/engineering_vr.dm +++ b/code/game/jobs/job/engineering_vr.dm @@ -1,10 +1,10 @@ /datum/job/chief_engineer disallow_jobhop = TRUE - pto_earning = PTO_ENGINEERING + pto_type = PTO_ENGINEERING /datum/job/engineer - pto_earning = PTO_ENGINEERING + pto_type = PTO_ENGINEERING /datum/job/atmos spawn_positions = 3 - pto_earning = PTO_ENGINEERING \ No newline at end of file + pto_type = PTO_ENGINEERING \ No newline at end of file diff --git a/code/game/jobs/job/job_vr.dm b/code/game/jobs/job/job_vr.dm index adb3390ed19..ce982aaab96 100644 --- a/code/game/jobs/job/job_vr.dm +++ b/code/game/jobs/job/job_vr.dm @@ -9,11 +9,11 @@ var/timeoff_factor = 3 //What type of PTO is that job earning? - var/pto_earning + var/pto_type //Disallow joining as this job midround from off-duty position via going on-duty var/disallow_jobhop = FALSE // Check client-specific availability rules. /datum/job/proc/player_has_enough_pto(client/C) - return timeoff_factor >= 0 || (C && LAZYACCESS(C.department_hours, pto_earning) > 0) + return timeoff_factor >= 0 || (C && LAZYACCESS(C.department_hours, pto_type) > 0) diff --git a/code/game/jobs/job/medical_vr.dm b/code/game/jobs/job/medical_vr.dm index c20c87d2134..306fe9acaab 100644 --- a/code/game/jobs/job/medical_vr.dm +++ b/code/game/jobs/job/medical_vr.dm @@ -1,16 +1,16 @@ /datum/job/cmo disallow_jobhop = TRUE - pto_earning = PTO_MEDICAL + pto_type = PTO_MEDICAL /datum/job/doctor spawn_positions = 5 - pto_earning = PTO_MEDICAL + pto_type = PTO_MEDICAL /datum/job/chemist - pto_earning = PTO_MEDICAL + pto_type = PTO_MEDICAL /datum/job/psychiatrist - pto_earning = PTO_MEDICAL + pto_type = PTO_MEDICAL /datum/job/paramedic - pto_earning = PTO_MEDICAL \ No newline at end of file + pto_type = PTO_MEDICAL \ No newline at end of file diff --git a/code/game/jobs/job/offduty_vr.dm b/code/game/jobs/job/offduty_vr.dm index e965f938cb7..416543956c5 100644 --- a/code/game/jobs/job/offduty_vr.dm +++ b/code/game/jobs/job/offduty_vr.dm @@ -8,14 +8,14 @@ timeoff_factor = -1 total_positions = -1 faction = "Station" - departments = list(DEPARTMENT_CIVILIAN) + departments = list(DEPARTMENT_OFFDUTY) supervisors = "nobody! Enjoy your time off" selection_color = "#9b633e" access = list(access_maint_tunnels) minimal_access = list(access_maint_tunnels) outfit_type = /decl/hierarchy/outfit/job/assistant/worker job_description = "Off-duty crew has no responsibilities or authority and is just there to spend their well-deserved time off." - pto_earning = PTO_CIVILIAN + pto_type = PTO_CIVILIAN /datum/alt_title/offduty_civ title = "Off-duty Worker" @@ -26,14 +26,14 @@ timeoff_factor = -1 total_positions = -1 faction = "Station" - departments = list(DEPARTMENT_CARGO) + departments = list(DEPARTMENT_OFFDUTY) supervisors = "nobody! Enjoy your time off" selection_color = "#9b633e" access = list(access_maint_tunnels) minimal_access = list(access_maint_tunnels) outfit_type = /decl/hierarchy/outfit/job/assistant/cargo job_description = "Off-duty crew has no responsibilities or authority and is just there to spend their well-deserved time off." - pto_earning = PTO_CARGO + pto_type = PTO_CARGO /datum/alt_title/offduty_crg title = "Off-duty Cargo" @@ -44,14 +44,14 @@ timeoff_factor = -1 total_positions = -1 faction = "Station" - departments = list(DEPARTMENT_ENGINEERING) + departments = list(DEPARTMENT_OFFDUTY) supervisors = "nobody! Enjoy your time off" selection_color = "#5B4D20" access = list(access_maint_tunnels, access_external_airlocks, access_construction) minimal_access = list(access_maint_tunnels, access_external_airlocks) outfit_type = /decl/hierarchy/outfit/job/assistant/engineer job_description = "Off-duty crew has no responsibilities or authority and is just there to spend their well-deserved time off." - pto_earning = PTO_ENGINEERING + pto_type = PTO_ENGINEERING /datum/alt_title/offduty_eng title = "Off-duty Engineer" @@ -62,14 +62,14 @@ timeoff_factor = -1 total_positions = -1 faction = "Station" - departments = list(DEPARTMENT_MEDICAL) + departments = list(DEPARTMENT_OFFDUTY) supervisors = "nobody! Enjoy your time off" selection_color = "#013D3B" access = list(access_maint_tunnels, access_external_airlocks) minimal_access = list(access_maint_tunnels, access_external_airlocks) outfit_type = /decl/hierarchy/outfit/job/assistant/medic job_description = "Off-duty crew has no responsibilities or authority and is just there to spend their well-deserved time off." - pto_earning = PTO_MEDICAL + pto_type = PTO_MEDICAL /datum/alt_title/offduty_med title = "Off-duty Medic" @@ -80,14 +80,14 @@ timeoff_factor = -1 total_positions = -1 faction = "Station" - departments = list(DEPARTMENT_RESEARCH) + departments = list(DEPARTMENT_OFFDUTY) supervisors = "nobody! Enjoy your time off" selection_color = "#633D63" access = list(access_maint_tunnels) minimal_access = list(access_maint_tunnels) outfit_type = /decl/hierarchy/outfit/job/assistant/scientist job_description = "Off-duty crew has no responsibilities or authority and is just there to spend their well-deserved time off." - pto_earning = PTO_SCIENCE + pto_type = PTO_SCIENCE /datum/alt_title/offduty_sci title = "Off-duty Scientist" @@ -98,14 +98,14 @@ timeoff_factor = -1 total_positions = -1 faction = "Station" - departments = list(DEPARTMENT_SECURITY) + departments = list(DEPARTMENT_OFFDUTY) supervisors = "nobody! Enjoy your time off" selection_color = "#601C1C" access = list(access_maint_tunnels) minimal_access = list(access_maint_tunnels) outfit_type = /decl/hierarchy/outfit/job/assistant/officer job_description = "Off-duty crew has no responsibilities or authority and is just there to spend their well-deserved time off." - pto_earning = PTO_SECURITY + pto_type = PTO_SECURITY /datum/alt_title/offduty_sec title = "Off-duty Officer" diff --git a/code/game/jobs/job/science_vr.dm b/code/game/jobs/job/science_vr.dm index 0c32f736de5..007a8625fb8 100644 --- a/code/game/jobs/job/science_vr.dm +++ b/code/game/jobs/job/science_vr.dm @@ -1,6 +1,6 @@ /datum/job/rd disallow_jobhop = TRUE - pto_earning = PTO_SCIENCE + pto_type = PTO_SCIENCE access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue, access_tox_storage, access_teleporter, access_sec_doors, @@ -13,7 +13,7 @@ /datum/job/scientist spawn_positions = 5 - pto_earning = PTO_SCIENCE + pto_type = PTO_SCIENCE alt_titles = list("Xenoarchaeologist" = /datum/alt_title/xenoarch, "Anomalist" = /datum/alt_title/anomalist, \ "Phoron Researcher" = /datum/alt_title/phoron_research, "Circuit Designer" = /datum/alt_title/circuit_designer) @@ -24,8 +24,8 @@ /datum/job/xenobiologist spawn_positions = 3 - pto_earning = PTO_SCIENCE + pto_type = PTO_SCIENCE /datum/job/roboticist total_positions = 3 - pto_earning = PTO_SCIENCE \ No newline at end of file + pto_type = PTO_SCIENCE \ No newline at end of file diff --git a/code/game/jobs/job/security_vr.dm b/code/game/jobs/job/security_vr.dm index 937b1529b3f..e969dcff564 100644 --- a/code/game/jobs/job/security_vr.dm +++ b/code/game/jobs/job/security_vr.dm @@ -1,6 +1,6 @@ /datum/job/hos disallow_jobhop = TRUE - pto_earning = PTO_SECURITY + pto_type = PTO_SECURITY access = list(access_security, access_eva, access_sec_doors, access_brig, access_armory, access_forensics_lockers, access_morgue, access_maint_tunnels, access_all_personal_lockers, @@ -12,12 +12,12 @@ access_heads, access_hos, access_RC_announce, access_keycard_auth, access_gateway, access_external_airlocks) /datum/job/warden - pto_earning = PTO_SECURITY + pto_type = PTO_SECURITY /datum/job/detective - pto_earning = PTO_SECURITY + pto_type = PTO_SECURITY /datum/job/officer total_positions = 5 spawn_positions = 5 - pto_earning = PTO_SECURITY \ No newline at end of file + pto_type = PTO_SECURITY \ No newline at end of file diff --git a/code/game/jobs/job/special_vr.dm b/code/game/jobs/job/special_vr.dm index 89951b6bb98..99ea67cca2f 100644 --- a/code/game/jobs/job/special_vr.dm +++ b/code/game/jobs/job/special_vr.dm @@ -1,6 +1,6 @@ /datum/job/centcom_officer //For Business title = "CentCom Officer" - departments = list(DEPARTMENT_COMMAND) + departments = list("Central Command") department_accounts = list(DEPARTMENT_COMMAND, DEPARTMENT_ENGINEERING, DEPARTMENT_MEDICAL, DEPARTMENT_RESEARCH, DEPARTMENT_SECURITY, DEPARTMENT_CARGO, DEPARTMENT_PLANET, DEPARTMENT_CIVILIAN) faction = "Station" total_positions = 2 @@ -19,7 +19,7 @@ minimum_character_age = 25 ideal_character_age = 40 - pto_earning = PTO_CIVILIAN + pto_type = PTO_CIVILIAN get_access() return get_all_accesses().Copy() @@ -84,7 +84,7 @@ whitelist_only = 1 latejoin_only = 1 outfit_type = /decl/hierarchy/outfit/job/clown - pto_earning = PTO_CIVILIAN + pto_type = PTO_CIVILIAN /datum/alt_title/clown title = "Clown" @@ -119,7 +119,7 @@ whitelist_only = 1 latejoin_only = 1 outfit_type = /decl/hierarchy/outfit/job/mime - pto_earning = PTO_CIVILIAN + pto_type = PTO_CIVILIAN /datum/alt_title/mime title = "Mime" diff --git a/code/game/machinery/computer/timeclock_vr.dm b/code/game/machinery/computer/timeclock_vr.dm index 9264f31361f..d339e903590 100644 --- a/code/game/machinery/computer/timeclock_vr.dm +++ b/code/game/machinery/computer/timeclock_vr.dm @@ -88,12 +88,12 @@ "selection_color" = job.selection_color, "economic_modifier" = job.economic_modifier, "timeoff_factor" = job.timeoff_factor, - "pto_department" = job.pto_earning + "pto_department" = job.pto_type ) if(config.time_off && config.pto_job_change) data["allow_change_job"] = TRUE if(job && job.timeoff_factor < 0) // Currently are Off Duty, so gotta lookup what on-duty jobs are open - data["job_choices"] = getOpenOnDutyJobs(user, job.pto_earning) + data["job_choices"] = getOpenOnDutyJobs(user, job.pto_type) ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) @@ -142,7 +142,7 @@ var/list/available_jobs = list() for(var/datum/job/job in job_master.occupations) if(job && job.is_position_available() && !job.whitelist_only && !jobban_isbanned(user,job.title) && job.player_old_enough(user.client)) - if(job.pto_earning == department && !job.disallow_jobhop && job.timeoff_factor > 0) + if(job.pto_type == department && !job.disallow_jobhop && job.timeoff_factor > 0) available_jobs += job.title if(job.alt_titles) for(var/alt_job in job.alt_titles) @@ -152,7 +152,7 @@ /obj/machinery/computer/timeclock/proc/makeOnDuty(var/newjob) var/datum/job/foundjob = job_master.GetJob(card.rank) - if(!newjob in getOpenOnDutyJobs(usr, foundjob.pto_earning)) + if(!newjob in getOpenOnDutyJobs(usr, foundjob.pto_type)) return if(foundjob && card) card.access = foundjob.get_access() @@ -173,10 +173,10 @@ var/datum/job/foundjob = job_master.GetJob(card.rank) if(!foundjob) return - var/new_dept = foundjob.pto_earning || PTO_CIVILIAN + var/new_dept = foundjob.pto_type || PTO_CIVILIAN var/datum/job/ptojob = null for(var/datum/job/job in job_master.occupations) - if(job.pto_earning == new_dept && job.timeoff_factor < 0) + if(job.pto_type == new_dept && job.timeoff_factor < 0) ptojob = job break if(ptojob && card) diff --git a/maps/southern_cross/southern_cross_jobs_vr.dm b/maps/southern_cross/southern_cross_jobs_vr.dm index 1d465f2d59a..ca117281896 100644 --- a/maps/southern_cross/southern_cross_jobs_vr.dm +++ b/maps/southern_cross/southern_cross_jobs_vr.dm @@ -43,7 +43,7 @@ var/const/SAR =(1<<14) selection_color = "#d6d05c" economic_modifier = 7 minimal_player_age = 7 - pto_earning = PTO_EXPLORATION + pto_type = PTO_EXPLORATION access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot, access_explorer, access_research, access_gateway) minimal_access = list(access_eva, access_maint_tunnels, access_external_airlocks, access_pilot, access_explorer, access_research, access_gateway) @@ -65,7 +65,7 @@ var/const/SAR =(1<<14) selection_color = "#999440" economic_modifier = 5 minimal_player_age = 3 - pto_earning = PTO_EXPLORATION + pto_type = PTO_EXPLORATION access = list(access_pilot) minimal_access = list(access_pilot) outfit_type = /decl/hierarchy/outfit/job/pilot @@ -85,7 +85,7 @@ var/const/SAR =(1<<14) supervisors = "the pathfinder and the research director" selection_color = "#999440" economic_modifier = 6 - pto_earning = PTO_EXPLORATION + pto_type = PTO_EXPLORATION access = list(access_explorer, access_research) minimal_access = list(access_explorer, access_research) outfit_type = /decl/hierarchy/outfit/job/explorer2 @@ -106,7 +106,7 @@ var/const/SAR =(1<<14) selection_color = "#999440" economic_modifier = 6 minimal_player_age = 3 - pto_earning = PTO_EXPLORATION + pto_type = PTO_EXPLORATION access = list(access_medical, access_medical_equip, access_morgue, access_surgery, access_chemistry, access_eva, access_maint_tunnels, access_external_airlocks, access_pilot) minimal_access = list(access_medical, access_medical_equip, access_morgue, access_pilot) outfit_type = /decl/hierarchy/outfit/job/medical/sar @@ -121,14 +121,14 @@ var/const/SAR =(1<<14) timeoff_factor = -1 total_positions = -1 faction = "Station" - departments = list(DEPARTMENT_PLANET) + departments = list(DEPARTMENT_OFFDUTY) supervisors = "nobody! Enjoy your time off" selection_color = "#999440" access = list(access_maint_tunnels, access_external_airlocks) minimal_access = list(access_maint_tunnels, access_external_airlocks) outfit_type = /decl/hierarchy/outfit/job/assistant/explorer job_description = "Off-duty crew has no responsibilities or authority and is just there to spend their well-deserved time off." - pto_earning = PTO_EXPLORATION + pto_type = PTO_EXPLORATION /datum/alt_title/offduty_exp title = "Off-duty Explorer" \ No newline at end of file diff --git a/vorestation.dme b/vorestation.dme index 45e9abd654d..b2390f99987 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -718,6 +718,7 @@ #include "code\game\jobs\job\civilian_chaplain.dm" #include "code\game\jobs\job\civilian_vr.dm" #include "code\game\jobs\job\department.dm" +#include "code\game\jobs\job\department_vr.dm" #include "code\game\jobs\job\engineering.dm" #include "code\game\jobs\job\engineering_vr.dm" #include "code\game\jobs\job\job.dm"