diff --git a/code/__DEFINES/jobs.dm b/code/__DEFINES/jobs.dm index dc4080a789..e6eb9f313e 100644 --- a/code/__DEFINES/jobs.dm +++ b/code/__DEFINES/jobs.dm @@ -48,3 +48,41 @@ #define JOB_UNAVAILABLE_PLAYTIME 3 #define JOB_UNAVAILABLE_ACCOUNTAGE 4 #define JOB_UNAVAILABLE_SLOTFULL 5 + +#define DEFAULT_RELIGION "Christianity" +#define DEFAULT_DEITY "Space Jesus" + +#define JOB_DISPLAY_ORDER_DEFAULT 0 + +#define JOB_DISPLAY_ORDER_ASSISTANT 1 +#define JOB_DISPLAY_ORDER_CAPTAIN 2 +#define JOB_DISPLAY_ORDER_HEAD_OF_PERSONNEL 3 +#define JOB_DISPLAY_ORDER_BARTENDER 4 +#define JOB_DISPLAY_ORDER_COOK 5 +#define JOB_DISPLAY_ORDER_BOTANIST 6 +#define JOB_DISPLAY_ORDER_JANITOR 7 +#define JOB_DISPLAY_ORDER_CLOWN 8 +#define JOB_DISPLAY_ORDER_MIME 9 +#define JOB_DISPLAY_ORDER_CURATOR 10 +#define JOB_DISPLAY_ORDER_LAWYER 11 +#define JOB_DISPLAY_ORDER_CHAPLAIN 12 +#define JOB_DISPLAY_ORDER_QUARTERMASTER 13 +#define JOB_DISPLAY_ORDER_CARGO_TECHNICIAN 14 +#define JOB_DISPLAY_ORDER_SHAFT_MINER 15 +#define JOB_DISPLAY_ORDER_CHIEF_ENGINEER 16 +#define JOB_DISPLAY_ORDER_STATION_ENGINEER 17 +#define JOB_DISPLAY_ORDER_ATMOSPHERIC_TECHNICIAN 18 +#define JOB_DISPLAY_ORDER_CHIEF_MEDICAL_OFFICER 19 +#define JOB_DISPLAY_ORDER_MEDICAL_DOCTOR 20 +#define JOB_DISPLAY_ORDER_CHEMIST 21 +#define JOB_DISPLAY_ORDER_GENETICIST 22 +#define JOB_DISPLAY_ORDER_VIROLOGIST 23 +#define JOB_DISPLAY_ORDER_RESEARCH_DIRECTOR 24 +#define JOB_DISPLAY_ORDER_SCIENTIST 25 +#define JOB_DISPLAY_ORDER_ROBOTICIST 26 +#define JOB_DISPLAY_ORDER_HEAD_OF_SECURITY 27 +#define JOB_DISPLAY_ORDER_WARDEN 28 +#define JOB_DISPLAY_ORDER_DETECTIVE 29 +#define JOB_DISPLAY_ORDER_SECURITY_OFFICER 30 +#define JOB_DISPLAY_ORDER_AI 31 +#define JOB_DISPLAY_ORDER_CYBORG 32 diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index 02f151dcd9..0992b2e586 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -69,4 +69,9 @@ //Flags in the players table in the db #define DB_FLAG_EXEMPT 1 -#define DEFAULT_CYBORG_NAME "Default Cyborg Name" \ No newline at end of file +#define DEFAULT_CYBORG_NAME "Default Cyborg Name" + +//Job preferences levels +#define JP_LOW 1 +#define JP_MEDIUM 2 +#define JP_HIGH 3 diff --git a/code/__HELPERS/cmp.dm b/code/__HELPERS/cmp.dm index e09ebcb10c..37f36a7e0d 100644 --- a/code/__HELPERS/cmp.dm +++ b/code/__HELPERS/cmp.dm @@ -81,3 +81,6 @@ GLOBAL_VAR_INIT(cmp_field, "name") /proc/cmp_advdisease_resistance_asc(datum/disease/advance/A, datum/disease/advance/B) return A.totalResistance() - B.totalResistance() + +/proc/cmp_job_display_asc(datum/job/A, datum/job/B) + return A.display_order - B.display_order diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index 4001c666ee..5983fa3ae5 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -116,7 +116,7 @@ SUBSYSTEM_DEF(job) if(player.mind && job.title in player.mind.restricted_roles) JobDebug("FOC incompatible with antagonist role, Player: [player]") continue - if(player.client.prefs.GetJobDepartment(job, level) & job.flag) + if(player.client.prefs.job_preferences[job.title] == level) JobDebug("FOC pass, Player: [player], Level:[level]") candidates += player return candidates @@ -228,7 +228,7 @@ SUBSYSTEM_DEF(job) * fills var "assigned_role" for all ready players. * This proc must not have any side effect besides of modifying "assigned_role". **/ -/datum/controller/subsystem/job/proc/DivideOccupations() +/datum/controller/subsystem/job/proc/DivideOccupations(list/required_jobs) //Setup new player list and get the jobs list JobDebug("Running DO") @@ -241,14 +241,14 @@ SUBSYSTEM_DEF(job) //Get the players who are ready for(var/mob/dead/new_player/player in GLOB.player_list) - if(player.ready == PLAYER_READY_TO_PLAY && player.mind && !player.mind.assigned_role) + if(player.ready == PLAYER_READY_TO_PLAY && player.check_preferences() && player.mind && !player.mind.assigned_role) unassigned += player initial_players_to_assign = unassigned.len JobDebug("DO, Len: [unassigned.len]") if(unassigned.len == 0) - return 0 + return validate_required_jobs(required_jobs) //Scale number of open security officer slots to population setup_officer_positions() @@ -269,7 +269,7 @@ SUBSYSTEM_DEF(job) //People who wants to be the overflow role, sure, go on. JobDebug("DO, Running Overflow Check 1") var/datum/job/overflow = GetJob(SSjob.overflow_role) - var/list/overflow_candidates = FindOccupationCandidates(overflow, 3) + var/list/overflow_candidates = FindOccupationCandidates(overflow, JP_LOW) JobDebug("AC1, Candidates: [overflow_candidates.len]") for(var/mob/dead/new_player/player in overflow_candidates) JobDebug("AC1 pass, Player: [player]") @@ -297,7 +297,8 @@ SUBSYSTEM_DEF(job) // Loop through all levels from high to low var/list/shuffledoccupations = shuffle(occupations) - for(var/level = 1 to 3) + var/list/levels = list(JP_HIGH,JP_MEDIUM,JP_LOW) + for(var/level in levels) //Check the head jobs first each level CheckHeadPositions(level) @@ -332,7 +333,7 @@ SUBSYSTEM_DEF(job) continue // If the player wants that job on this level, then try give it to him. - if(player.client.prefs.GetJobDepartment(job, level) & job.flag) + if(player.client.prefs.job_preferences[job.title] == level) // If the job isn't filled if((job.current_positions < job.spawn_positions) || job.spawn_positions == -1) JobDebug("DO pass, Player: [player], Level:[level], Job:[job.title]") @@ -351,9 +352,28 @@ SUBSYSTEM_DEF(job) //Mop up people who can't leave. for(var/mob/dead/new_player/player in unassigned) //Players that wanted to back out but couldn't because they're antags (can you feel the edge case?) if(!GiveRandomJob(player)) - AssignRole(player, SSjob.overflow_role) //If everything is already filled, make them an assistant + if(!AssignRole(player, SSjob.overflow_role)) //If everything is already filled, make them an assistant + return FALSE //Living on the edge, the forced antagonist couldn't be assigned to overflow role (bans, client age) - just reroll - return 1 + return validate_required_jobs(required_jobs) + +/datum/controller/subsystem/job/proc/validate_required_jobs(list/required_jobs) + if(!required_jobs.len) + return TRUE + for(var/required_group in required_jobs) + var/group_ok = TRUE + for(var/rank in required_group) + var/datum/job/J = GetJob(rank) + if(!J) + SSticker.mode.setup_error = "Invalid job [rank] in gamemode required jobs." + return FALSE + if(J.current_positions < required_group[rank]) + group_ok = FALSE + break + if(group_ok) + return TRUE + SSticker.mode.setup_error = "Required jobs not present." + return FALSE //We couldn't find a job from prefs for this guy. /datum/controller/subsystem/job/proc/HandleUnassigned(mob/dead/new_player/player) @@ -406,7 +426,7 @@ SUBSYSTEM_DEF(job) if(length(GLOB.jobspawn_overrides[rank])) S = pick(GLOB.jobspawn_overrides[rank]) if(S) - SendToAtom(H, S, buckle = FALSE) + S.JoinPlayerHere(H, FALSE) if(!S) //if there isn't a spawnpoint send them to latejoin, if there's no latejoin go yell at your mapper log_world("Couldn't find a round start spawn point for [rank]") SendToLateJoin(H) @@ -418,7 +438,7 @@ SUBSYSTEM_DEF(job) if(job) if(!job.dresscodecompliant)// CIT CHANGE - dress code compliance equip_loadout(N, H) // CIT CHANGE - allows players to spawn with loadout items - var/new_mob = job.equip(H, null, null, joined_late) + var/new_mob = job.equip(H, null, null, joined_late , null, M.client) if(ismob(new_mob)) H = new_mob if(!joined_late) @@ -428,12 +448,18 @@ SUBSYSTEM_DEF(job) SSpersistence.antag_rep_change[M.client.ckey] += job.GetAntagRep() +/* if(M.client.holder) + if(CONFIG_GET(flag/auto_deadmin_players) || (M.client.prefs?.toggles & DEADMIN_ALWAYS)) + M.client.holder.auto_deadmin() + else + handle_auto_deadmin_roles(M.client, rank) */ + to_chat(M, "You are the [rank].") if(job) to_chat(M, "As the [rank] you answer directly to [job.supervisors]. Special circumstances may change this.") - to_chat(M, "To speak on your departments radio, use the :h button. To see others, look closely at your headset.") + job.radio_help_message(M) if(job.req_admin_notify) - to_chat(M, "You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.") + to_chat(M, "You are playing a job that is important for Game Progression. If you have to disconnect immediately, please notify the admins via adminhelp. Otherwise put your locker gear back into the locker and cryo out.") if(job.custom_spawn_text) to_chat(M, "[job.custom_spawn_text]") if(CONFIG_GET(number/minimal_access_threshold)) @@ -446,12 +472,24 @@ SUBSYSTEM_DEF(job) equip_loadout(N, H, TRUE)//CIT CHANGE - makes players spawn with in-backpack loadout items properly. A little hacky but it works return H - +/* +/datum/controller/subsystem/job/proc/handle_auto_deadmin_roles(client/C, rank) + if(!C?.holder) + return TRUE + var/datum/job/job = GetJob(rank) + if(!job) + return + if((job.auto_deadmin_role_flags & DEADMIN_POSITION_HEAD) && (CONFIG_GET(flag/auto_deadmin_heads) || (C.prefs?.toggles & DEADMIN_POSITION_HEAD))) + return C.holder.auto_deadmin() + else if((job.auto_deadmin_role_flags & DEADMIN_POSITION_SECURITY) && (CONFIG_GET(flag/auto_deadmin_security) || (C.prefs?.toggles & DEADMIN_POSITION_SECURITY))) + return C.holder.auto_deadmin() + else if((job.auto_deadmin_role_flags & DEADMIN_POSITION_SILICON) && (CONFIG_GET(flag/auto_deadmin_silicons) || (C.prefs?.toggles & DEADMIN_POSITION_SILICON))) //in the event there's ever psuedo-silicon roles added, ie synths. + return C.holder.auto_deadmin()*/ /datum/controller/subsystem/job/proc/setup_officer_positions() var/datum/job/J = SSjob.GetJob("Security Officer") if(!J) - throw EXCEPTION("setup_officer_positions(): Security officer job is missing") + CRASH("setup_officer_positions(): Security officer job is missing") var/ssc = CONFIG_GET(number/security_scaling_coeff) if(ssc > 0) @@ -502,13 +540,15 @@ SUBSYSTEM_DEF(job) if(job.required_playtime_remaining(player.client)) young++ continue - if(player.client.prefs.GetJobDepartment(job, 1) & job.flag) - high++ - else if(player.client.prefs.GetJobDepartment(job, 2) & job.flag) - medium++ - else if(player.client.prefs.GetJobDepartment(job, 3) & job.flag) - low++ - else never++ //not selected + switch(player.client.prefs.job_preferences[job.title]) + if(JP_HIGH) + high++ + if(JP_MEDIUM) + medium++ + if(JP_LOW) + low++ + else + never++ SSblackbox.record_feedback("nested tally", "job_preferences", high, list("[job.title]", "high")) SSblackbox.record_feedback("nested tally", "job_preferences", medium, list("[job.title]", "medium")) SSblackbox.record_feedback("nested tally", "job_preferences", low, list("[job.title]", "low")) @@ -551,51 +591,61 @@ SUBSYSTEM_DEF(job) newjob.spawn_positions = J.spawn_positions newjob.current_positions = J.current_positions -/datum/controller/subsystem/job/proc/SendToAtom(mob/M, atom/A, buckle) - if(buckle && isliving(M) && istype(A, /obj/structure/chair)) - var/obj/structure/chair/C = A - if(C.buckle_mob(M, FALSE, FALSE)) - return - M.forceMove(get_turf(A)) +/atom/proc/JoinPlayerHere(mob/M, buckle) + // By default, just place the mob on the same turf as the marker or whatever. + M.forceMove(get_turf(src)) + +/obj/structure/chair/JoinPlayerHere(mob/M, buckle) + // Placing a mob in a chair will attempt to buckle it, or else fall back to default. + if (buckle && isliving(M) && buckle_mob(M, FALSE, FALSE)) + return + ..() /datum/controller/subsystem/job/proc/SendToLateJoin(mob/M, buckle = TRUE) + var/atom/destination if(M.mind && M.mind.assigned_role && length(GLOB.jobspawn_overrides[M.mind.assigned_role])) //We're doing something special today. - SendToAtom(M,pick(GLOB.jobspawn_overrides[M.mind.assigned_role]),FALSE) + destination = pick(GLOB.jobspawn_overrides[M.mind.assigned_role]) + destination.JoinPlayerHere(M, FALSE) return if(latejoin_trackers.len) - SendToAtom(M, pick(latejoin_trackers), buckle) - else - //bad mojo - var/area/shuttle/arrival/A = GLOB.areas_by_type[/area/shuttle/arrival] - if(A) - //first check if we can find a chair - var/obj/structure/chair/C = locate() in A - if(C) - SendToAtom(M, C, buckle) - return - else //last hurrah - var/list/avail = list() - for(var/turf/T in A) - if(!is_blocked_turf(T, TRUE)) - avail += T - if(avail.len) - SendToAtom(M, pick(avail), FALSE) - return + destination = pick(latejoin_trackers) + destination.JoinPlayerHere(M, buckle) + return - //pick an open spot on arrivals and dump em - var/list/arrivals_turfs = shuffle(get_area_turfs(/area/shuttle/arrival)) - if(arrivals_turfs.len) - for(var/turf/T in arrivals_turfs) - if(!is_blocked_turf(T, TRUE)) - SendToAtom(M, T, FALSE) - return - //last chance, pick ANY spot on arrivals and dump em - SendToAtom(M, arrivals_turfs[1], FALSE) - else - var/msg = "Unable to send mob [M] to late join!" - message_admins(msg) - CRASH(msg) + //bad mojo + var/area/shuttle/arrival/A = GLOB.areas_by_type[/area/shuttle/arrival] + if(A) + //first check if we can find a chair + var/obj/structure/chair/C = locate() in A + if(C) + C.JoinPlayerHere(M, buckle) + return + + //last hurrah + var/list/avail = list() + for(var/turf/T in A) + if(!is_blocked_turf(T, TRUE)) + avail += T + if(avail.len) + destination = pick(avail) + destination.JoinPlayerHere(M, FALSE) + return + + //pick an open spot on arrivals and dump em + var/list/arrivals_turfs = shuffle(get_area_turfs(/area/shuttle/arrival)) + if(arrivals_turfs.len) + for(var/turf/T in arrivals_turfs) + if(!is_blocked_turf(T, TRUE)) + T.JoinPlayerHere(M, FALSE) + return + //last chance, pick ANY spot on arrivals and dump em + destination = arrivals_turfs[1] + destination.JoinPlayerHere(M, FALSE) + else + var/msg = "Unable to send mob [M] to late join!" + message_admins(msg) + CRASH(msg) /////////////////////////////////// @@ -637,4 +687,4 @@ SUBSYSTEM_DEF(job) . |= player.mind /datum/controller/subsystem/job/proc/JobDebug(message) - log_job_debug(message) \ No newline at end of file + log_job_debug(message) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index f2469e8f7d..14e1e86f7d 100755 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -255,7 +255,7 @@ SUBSYSTEM_DEF(ticker) var/can_continue = 0 can_continue = src.mode.pre_setup() //Choose antagonists CHECK_TICK - SSjob.DivideOccupations() //Distribute jobs + can_continue = can_continue && SSjob.DivideOccupations(mode.required_jobs) //Distribute jobs CHECK_TICK if(!GLOB.Debug2) diff --git a/code/datums/outfit.dm b/code/datums/outfit.dm index 1f5c28d3c2..68165af956 100755 --- a/code/datums/outfit.dm +++ b/code/datums/outfit.dm @@ -21,6 +21,7 @@ var/l_hand = null var/internals_slot = null //ID of slot containing a gas tank var/list/backpack_contents = null // In the list(path=count,otherpath=count) format + var/box // Internals box. Will be inserted at the start of backpack_contents var/list/implants = null var/accessory = null @@ -83,6 +84,13 @@ H.equip_to_slot_or_del(new l_pocket(H),SLOT_L_STORE) if(r_pocket) H.equip_to_slot_or_del(new r_pocket(H),SLOT_R_STORE) + + if(box) + if(!backpack_contents) + backpack_contents = list() + backpack_contents.Insert(1, box) + backpack_contents[box] = 1 + if(backpack_contents) for(var/path in backpack_contents) var/number = backpack_contents[path] diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index cc992fefbc..f790053863 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -24,6 +24,7 @@ var/list/datum/mind/antag_candidates = list() // List of possible starting antags goes here var/list/restricted_jobs = list() // Jobs it doesn't make sense to be. I.E chaplain or AI cultist var/list/protected_jobs = list() // Jobs that can't be traitors because + var/list/required_jobs = list() // alternative required job groups eg list(list(cap=1),list(hos=1,sec=2)) translates to one captain OR one hos and two secmans var/required_players = 0 var/maximum_players = -1 // -1 is no maximum, positive numbers limit the selection of a mode on overstaffed stations var/required_enemies = 0 @@ -355,7 +356,7 @@ // Ultimate randomizing code right here for(var/mob/dead/new_player/player in GLOB.player_list) - if(player.client && player.ready == PLAYER_READY_TO_PLAY) + if(player.client && player.ready == PLAYER_READY_TO_PLAY && player.check_preferences()) players += player // Shuffling, the players list is now ping-independent!!! diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 88fd142c1e..cab7f1687b 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -172,18 +172,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/list/all_quirks = list() var/list/character_quirks = list() - //Jobs, uses bitflags - var/job_civilian_high = 0 - var/job_civilian_med = 0 - var/job_civilian_low = 0 - - var/job_medsci_high = 0 - var/job_medsci_med = 0 - var/job_medsci_low = 0 - - var/job_engsec_high = 0 - var/job_engsec_med = 0 - var/job_engsec_low = 0 + //Job preferences 2.0 - indexed by job title , no key or value implies never + var/list/job_preferences = list() // Want randomjob if preferences already filled - Donkie var/joblessrole = BERANDOMJOB //defaults to 1 for fewer assistants @@ -992,9 +982,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) //The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows. var/datum/job/lastJob - var/datum/job/overflow = SSjob.GetJob(SSjob.overflow_role) - - for(var/datum/job/job in SSjob.occupations) + for(var/datum/job/job in sortList(SSjob.occupations, /proc/cmp_job_display_asc)) index += 1 if((index >= limit) || (job.title in splitJobs)) @@ -1011,7 +999,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/rank = job.title lastJob = job if(jobban_isbanned(user, rank)) - HTML += "[rank] BANNED" + HTML += "[rank] BANNED" continue var/required_playtime_remaining = job.required_playtime_remaining(user.client) if(required_playtime_remaining) @@ -1021,7 +1009,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/available_in_days = job.available_in_days(user.client) HTML += "[rank] \[IN [(available_in_days)] DAYS\]" continue - if((job_civilian_low & overflow.flag) && (rank != SSjob.overflow_role) && !jobban_isbanned(user, SSjob.overflow_role)) + if((job_preferences[SSjob.overflow_role] == JP_LOW) && (rank != SSjob.overflow_role) && !jobban_isbanned(user, SSjob.overflow_role)) HTML += "[rank]" continue if((rank in GLOB.command_positions) || (rank == "AI"))//Bold head jobs @@ -1036,32 +1024,32 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/prefUpperLevel = -1 // level to assign on left click var/prefLowerLevel = -1 // level to assign on right click - if(GetJobDepartment(job, 1) & job.flag) - prefLevelLabel = "High" - prefLevelColor = "slateblue" - prefUpperLevel = 4 - prefLowerLevel = 2 - else if(GetJobDepartment(job, 2) & job.flag) - prefLevelLabel = "Medium" - prefLevelColor = "green" - prefUpperLevel = 1 - prefLowerLevel = 3 - else if(GetJobDepartment(job, 3) & job.flag) - prefLevelLabel = "Low" - prefLevelColor = "orange" - prefUpperLevel = 2 - prefLowerLevel = 4 - else - prefLevelLabel = "NEVER" - prefLevelColor = "red" - prefUpperLevel = 3 - prefLowerLevel = 1 - + switch(job_preferences[job.title]) + if(JP_HIGH) + prefLevelLabel = "High" + prefLevelColor = "slateblue" + prefUpperLevel = 4 + prefLowerLevel = 2 + if(JP_MEDIUM) + prefLevelLabel = "Medium" + prefLevelColor = "green" + prefUpperLevel = 1 + prefLowerLevel = 3 + if(JP_LOW) + prefLevelLabel = "Low" + prefLevelColor = "orange" + prefUpperLevel = 2 + prefLowerLevel = 4 + else + prefLevelLabel = "NEVER" + prefLevelColor = "red" + prefUpperLevel = 3 + prefLowerLevel = 1 HTML += "" if(rank == SSjob.overflow_role)//Overflow is special - if(job_civilian_low & overflow.flag) + if(job_preferences[SSjob.overflow_role] == JP_LOW) HTML += "Yes" else HTML += "No" @@ -1092,61 +1080,17 @@ GLOBAL_LIST_EMPTY(preferences_datums) /datum/preferences/proc/SetJobPreferenceLevel(datum/job/job, level) if (!job) - return 0 + return FALSE - if (level == 1) // to high - // remove any other job(s) set to high - job_civilian_med |= job_civilian_high - job_engsec_med |= job_engsec_high - job_medsci_med |= job_medsci_high - job_civilian_high = 0 - job_engsec_high = 0 - job_medsci_high = 0 + if (level == JP_HIGH) // to high + //Set all other high to medium + for(var/j in job_preferences) + if(job_preferences[j] == JP_HIGH) + job_preferences[j] = JP_MEDIUM + //technically break here - if (job.department_flag == CIVILIAN) - job_civilian_low &= ~job.flag - job_civilian_med &= ~job.flag - job_civilian_high &= ~job.flag - - switch(level) - if (1) - job_civilian_high |= job.flag - if (2) - job_civilian_med |= job.flag - if (3) - job_civilian_low |= job.flag - - return 1 - else if (job.department_flag == ENGSEC) - job_engsec_low &= ~job.flag - job_engsec_med &= ~job.flag - job_engsec_high &= ~job.flag - - switch(level) - if (1) - job_engsec_high |= job.flag - if (2) - job_engsec_med |= job.flag - if (3) - job_engsec_low |= job.flag - - return 1 - else if (job.department_flag == MEDSCI) - job_medsci_low &= ~job.flag - job_medsci_med &= ~job.flag - job_medsci_high &= ~job.flag - - switch(level) - if (1) - job_medsci_high |= job.flag - if (2) - job_medsci_med |= job.flag - if (3) - job_medsci_low |= job.flag - - return 1 - - return 0 + job_preferences[job.title] = level + return TRUE /datum/preferences/proc/UpdateJobPreference(mob/user, role, desiredLvl) if(!SSjob || SSjob.occupations.len <= 0) @@ -1163,64 +1107,29 @@ GLOBAL_LIST_EMPTY(preferences_datums) ShowChoices(user) return - if(role == SSjob.overflow_role) - if(job_civilian_low & job.flag) - job_civilian_low &= ~job.flag - else - job_civilian_low |= job.flag - SetChoices(user) - return 1 + var/jpval = null + switch(desiredLvl) + if(3) + jpval = JP_LOW + if(2) + jpval = JP_MEDIUM + if(1) + jpval = JP_HIGH - SetJobPreferenceLevel(job, desiredLvl) + if(role == SSjob.overflow_role) + if(job_preferences[job.title] == JP_LOW) + jpval = null + else + jpval = JP_LOW + + SetJobPreferenceLevel(job, jpval) SetChoices(user) return 1 /datum/preferences/proc/ResetJobs() - - job_civilian_high = 0 - job_civilian_med = 0 - job_civilian_low = 0 - - job_medsci_high = 0 - job_medsci_med = 0 - job_medsci_low = 0 - - job_engsec_high = 0 - job_engsec_med = 0 - job_engsec_low = 0 - - -/datum/preferences/proc/GetJobDepartment(datum/job/job, level) - if(!job || !level) - return 0 - switch(job.department_flag) - if(CIVILIAN) - switch(level) - if(1) - return job_civilian_high - if(2) - return job_civilian_med - if(3) - return job_civilian_low - if(MEDSCI) - switch(level) - if(1) - return job_medsci_high - if(2) - return job_medsci_med - if(3) - return job_medsci_low - if(ENGSEC) - switch(level) - if(1) - return job_engsec_high - if(2) - return job_engsec_med - if(3) - return job_engsec_low - return 0 + job_preferences = list() /datum/preferences/proc/SetQuirks(mob/user) if(!SSquirks) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index a3f45f53ca..5399cf81af 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -5,7 +5,7 @@ // You do not need to raise this if you are adding new values that have sane defaults. // Only raise this value when changing the meaning/format/name/layout of an existing value // where you would want the updater procs below to run -#define SAVEFILE_VERSION_MAX 20 +#define SAVEFILE_VERSION_MAX 21 /* SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn @@ -49,6 +49,59 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car pda_style = "mono" if(current_version < 20) pda_color = "#808000" + if(current_version < 21) + job_preferences = list() //It loaded null from nonexistant savefile field. + var/job_civilian_high = 0 + var/job_civilian_med = 0 + var/job_civilian_low = 0 + + var/job_medsci_high = 0 + var/job_medsci_med = 0 + var/job_medsci_low = 0 + + var/job_engsec_high = 0 + var/job_engsec_med = 0 + var/job_engsec_low = 0 + + S["job_civilian_high"] >> job_civilian_high + S["job_civilian_med"] >> job_civilian_med + S["job_civilian_low"] >> job_civilian_low + S["job_medsci_high"] >> job_medsci_high + S["job_medsci_med"] >> job_medsci_med + S["job_medsci_low"] >> job_medsci_low + S["job_engsec_high"] >> job_engsec_high + S["job_engsec_med"] >> job_engsec_med + S["job_engsec_low"] >> job_engsec_low + + //Can't use SSjob here since this happens right away on login + for(var/job in subtypesof(/datum/job)) + var/datum/job/J = job + var/new_value + var/fval = initial(J.flag) + switch(initial(J.department_flag)) + if(CIVILIAN) + if(job_civilian_high & fval) + new_value = JP_HIGH + else if(job_civilian_med & fval) + new_value = JP_MEDIUM + else if(job_civilian_low & fval) + new_value = JP_LOW + if(MEDSCI) + if(job_medsci_high & fval) + new_value = JP_HIGH + else if(job_medsci_med & fval) + new_value = JP_MEDIUM + else if(job_medsci_low & fval) + new_value = JP_LOW + if(ENGSEC) + if(job_engsec_high & fval) + new_value = JP_HIGH + else if(job_engsec_med & fval) + new_value = JP_MEDIUM + else if(job_engsec_low & fval) + new_value = JP_LOW + if(new_value) + job_preferences[initial(J.title)] = new_value /datum/preferences/proc/load_path(ckey,filename="preferences.sav") if(!ckey) @@ -298,15 +351,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car //Jobs S["joblessrole"] >> joblessrole - S["job_civilian_high"] >> job_civilian_high - S["job_civilian_med"] >> job_civilian_med - S["job_civilian_low"] >> job_civilian_low - S["job_medsci_high"] >> job_medsci_high - S["job_medsci_med"] >> job_medsci_med - S["job_medsci_low"] >> job_medsci_low - S["job_engsec_high"] >> job_engsec_high - S["job_engsec_med"] >> job_engsec_med - S["job_engsec_low"] >> job_engsec_low + //Load prefs + S["job_preferences"] >> job_preferences //Quirks S["all_quirks"] >> all_quirks @@ -425,15 +471,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car features["moth_wings"] = sanitize_inlist(features["moth_wings"], GLOB.moth_wings_list) joblessrole = sanitize_integer(joblessrole, 1, 3, initial(joblessrole)) - job_civilian_high = sanitize_integer(job_civilian_high, 0, 65535, initial(job_civilian_high)) - job_civilian_med = sanitize_integer(job_civilian_med, 0, 65535, initial(job_civilian_med)) - job_civilian_low = sanitize_integer(job_civilian_low, 0, 65535, initial(job_civilian_low)) - job_medsci_high = sanitize_integer(job_medsci_high, 0, 65535, initial(job_medsci_high)) - job_medsci_med = sanitize_integer(job_medsci_med, 0, 65535, initial(job_medsci_med)) - job_medsci_low = sanitize_integer(job_medsci_low, 0, 65535, initial(job_medsci_low)) - job_engsec_high = sanitize_integer(job_engsec_high, 0, 65535, initial(job_engsec_high)) - job_engsec_med = sanitize_integer(job_engsec_med, 0, 65535, initial(job_engsec_med)) - job_engsec_low = sanitize_integer(job_engsec_low, 0, 65535, initial(job_engsec_low)) + //Validate job prefs + for(var/j in job_preferences) + if(job_preferences[j] != JP_LOW && job_preferences[j] != JP_MEDIUM && job_preferences[j] != JP_HIGH) + job_preferences -= j all_quirks = SANITIZE_LIST(all_quirks) positive_quirks = SANITIZE_LIST(positive_quirks) @@ -505,15 +546,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car //Jobs WRITE_FILE(S["joblessrole"] , joblessrole) - WRITE_FILE(S["job_civilian_high"] , job_civilian_high) - WRITE_FILE(S["job_civilian_med"] , job_civilian_med) - WRITE_FILE(S["job_civilian_low"] , job_civilian_low) - WRITE_FILE(S["job_medsci_high"] , job_medsci_high) - WRITE_FILE(S["job_medsci_med"] , job_medsci_med) - WRITE_FILE(S["job_medsci_low"] , job_medsci_low) - WRITE_FILE(S["job_engsec_high"] , job_engsec_high) - WRITE_FILE(S["job_engsec_med"] , job_engsec_med) - WRITE_FILE(S["job_engsec_low"] , job_engsec_low) + //Write prefs + WRITE_FILE(S["job_preferences"] , job_preferences) //Quirks WRITE_FILE(S["all_quirks"] , all_quirks) diff --git a/code/modules/jobs/job_exp.dm b/code/modules/jobs/job_exp.dm index 4b7b175240..f99bf65071 100644 --- a/code/modules/jobs/job_exp.dm +++ b/code/modules/jobs/job_exp.dm @@ -8,6 +8,8 @@ GLOBAL_PROTECT(exp_to_update) return 0 if(!CONFIG_GET(flag/use_exp_tracking)) return 0 + if(!SSdbcore.Connect()) + return 0 if(!exp_requirements || !exp_type) return 0 if(!job_is_xp_locked(src.title)) diff --git a/code/modules/jobs/job_types/job.dm b/code/modules/jobs/job_types/_job.dm similarity index 88% rename from code/modules/jobs/job_types/job.dm rename to code/modules/jobs/job_types/_job.dm index 9549b6100c..2eeffa8b7a 100644 --- a/code/modules/jobs/job_types/job.dm +++ b/code/modules/jobs/job_types/_job.dm @@ -1,240 +1,245 @@ -/datum/job - //The name of the job - var/title = "NOPE" - - //Job access. The use of minimal_access or access is determined by a config setting: config.jobs_have_minimal_access - var/list/minimal_access = list() //Useful for servers which prefer to only have access given to the places a job absolutely needs (Larger server population) - var/list/access = list() //Useful for servers which either have fewer players, so each person needs to fill more than one role, or servers which like to give more access, so players can't hide forever in their super secure departments (I'm looking at you, chemistry!) - - //Determines who can demote this position - var/department_head = list() - - //Tells the given channels that the given mob is the new department head. See communications.dm for valid channels. - var/list/head_announce = null - - //Bitflags for the job - var/flag = 0 - var/department_flag = 0 - - //Players will be allowed to spawn in as jobs that are set to "Station" - var/faction = "None" - - //How many players can be this job - var/total_positions = 0 - - //How many players can spawn in as this job - var/spawn_positions = 0 - - //How many players have this job - var/current_positions = 0 - - //Supervisors, who this person answers to directly - var/supervisors = "" - - //Sellection screen color - var/selection_color = "#ffffff" - - - //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 - - var/custom_spawn_text - - //If you have the 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 - - var/outfit = null - - var/exp_requirements = 0 - - var/exp_type = "" - var/exp_type_department = "" - - //The amount of good boy points playing this role will earn you towards a higher chance to roll antagonist next round - //can be overridden by antag_rep.txt config - var/antag_rep = 10 - - var/list/mind_traits // Traits added to the mind of the mob assigned this job - - var/list/blacklisted_quirks //list of quirk typepaths blacklisted. - -//Only override this proc -//H is usually a human unless an /equip override transformed it -/datum/job/proc/after_spawn(mob/living/H, mob/M, latejoin = FALSE) - //do actions on H but send messages to M as the key may not have been transferred_yet - if(mind_traits) - for(var/t in mind_traits) - ADD_TRAIT(H.mind, t, JOB_TRAIT) - -/datum/job/proc/announce(mob/living/carbon/human/H) - if(head_announce) - announce_head(H, head_announce) - -/datum/job/proc/override_latejoin_spawn(mob/living/carbon/human/H) //Return TRUE to force latejoining to not automatically place the person in latejoin shuttle/whatever. - return FALSE - -//Used for a special check of whether to allow a client to latejoin as this job. -/datum/job/proc/special_check_latejoin(client/C) - return TRUE - -/datum/job/proc/GetAntagRep() - . = CONFIG_GET(keyed_list/antag_rep)[lowertext(title)] - if(. == null) - return antag_rep - -//Don't override this unless the job transforms into a non-human (Silicons do this for example) -/datum/job/proc/equip(mob/living/carbon/human/H, visualsOnly = FALSE, announce = TRUE, latejoin = FALSE, datum/outfit/outfit_override = null) - if(!H) - return FALSE - - if(CONFIG_GET(flag/enforce_human_authority) && (title in GLOB.command_positions)) - if(H.dna.species.id != "human") - H.set_species(/datum/species/human) - H.apply_pref_name("human", H.client) - - //Equip the rest of the gear - H.dna.species.before_equip_job(src, H, visualsOnly) - - if(outfit_override || outfit) - H.equipOutfit(outfit_override ? outfit_override : outfit, visualsOnly) - - H.dna.species.after_equip_job(src, H, visualsOnly) - - if(!visualsOnly && announce) - announce(H) - -/datum/job/proc/get_access() - if(!config) //Needed for robots. - return src.minimal_access.Copy() - - . = list() - - if(CONFIG_GET(flag/jobs_have_minimal_access)) - . = src.minimal_access.Copy() - else - . = src.access.Copy() - - if(CONFIG_GET(flag/everyone_has_maint_access)) //Config has global maint access set - . |= list(ACCESS_MAINT_TUNNELS) - -/datum/job/proc/announce_head(var/mob/living/carbon/human/H, var/channels) //tells the given channel that the given mob is the new department head. See communications.dm for valid channels. - if(H && GLOB.announcement_systems.len) - //timer because these should come after the captain announcement - SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, .proc/addtimer, CALLBACK(pick(GLOB.announcement_systems), /obj/machinery/announcement_system/proc/announce, "NEWHEAD", H.real_name, H.job, channels), 1)) - -//If the configuration option is set to require players to be logged as old enough to play certain jobs, then this proc checks that they are, otherwise it just returns 1 -/datum/job/proc/player_old_enough(client/C) - if(available_in_days(C) == 0) - return TRUE //Available in 0 days = available right now = player is old enough to play. - return FALSE - - -/datum/job/proc/available_in_days(client/C) - if(!C) - return 0 - if(!CONFIG_GET(flag/use_age_restriction_for_jobs)) - return 0 - if(C.prefs.db_flags & DB_FLAG_EXEMPT) - return 0 - if(!isnum(C.player_age)) - return 0 //This is only a number if the db connection is established, otherwise it is text: "Requires database", meaning these restrictions cannot be enforced - if(!isnum(minimal_player_age)) - return 0 - - return max(0, minimal_player_age - C.player_age) - -/datum/job/proc/config_check() - return TRUE - -/datum/job/proc/map_check() - return TRUE - - -/datum/outfit/job - name = "Standard Gear" - - var/jobtype = null - - uniform = /obj/item/clothing/under/color/grey - id = /obj/item/card/id - ears = /obj/item/radio/headset - belt = /obj/item/pda - back = /obj/item/storage/backpack - shoes = /obj/item/clothing/shoes/sneakers/black - - var/backpack = /obj/item/storage/backpack - var/satchel = /obj/item/storage/backpack/satchel - var/duffelbag = /obj/item/storage/backpack/duffelbag - var/box = /obj/item/storage/box/survival - - var/pda_slot = SLOT_BELT - -/datum/outfit/job/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - switch(H.backbag) - if(GBACKPACK) - back = /obj/item/storage/backpack //Grey backpack - if(GSATCHEL) - back = /obj/item/storage/backpack/satchel //Grey satchel - if(GDUFFELBAG) - back = /obj/item/storage/backpack/duffelbag //Grey Duffel bag - if(LSATCHEL) - back = /obj/item/storage/backpack/satchel/leather //Leather Satchel - if(DSATCHEL) - back = satchel //Department satchel - if(DDUFFELBAG) - back = duffelbag //Department duffel bag - else - back = backpack //Department backpack - - if(box) - if(!backpack_contents) - backpack_contents = list() - backpack_contents.Insert(1, box) // Box always takes a first slot in backpack - backpack_contents[box] = 1 - - //converts the uniform string into the path we'll wear, whether it's the skirt or regular variant - var/holder - if(H.jumpsuit_style == PREF_SKIRT) - holder = "[uniform]/skirt" - if(!text2path(holder)) - holder = "[uniform]" - else - holder = "[uniform]" - uniform = text2path(holder) - -/datum/outfit/job/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - if(visualsOnly) - return - - var/datum/job/J = SSjob.GetJobType(jobtype) - if(!J) - J = SSjob.GetJob(H.job) - - if(H.nameless && J.dresscodecompliant) - if(J.title in GLOB.command_positions) - H.real_name = J.title - else - H.real_name = "[J.title] #[rand(10000, 99999)]" - - var/obj/item/card/id/C = H.wear_id - if(istype(C)) - C.access = J.get_access() - shuffle_inplace(C.access) // Shuffle access list to make NTNet passkeys less predictable - C.registered_name = H.real_name - C.assignment = J.title - C.update_label() - H.sec_hud_set_ID() - - var/obj/item/pda/PDA = H.get_item_by_slot(pda_slot) - if(istype(PDA)) - PDA.owner = H.real_name - PDA.ownjob = J.title - PDA.update_label() - -/datum/outfit/job/get_chameleon_disguise_info() - var/list/types = ..() - types -= /obj/item/storage/backpack //otherwise this will override the actual backpacks - types += backpack - types += satchel - types += duffelbag - return types +/datum/job + //The name of the job , used for preferences, bans and more. Make sure you know what you're doing before changing this. + var/title = "NOPE" + + //Job access. The use of minimal_access or access is determined by a config setting: config.jobs_have_minimal_access + var/list/minimal_access = list() //Useful for servers which prefer to only have access given to the places a job absolutely needs (Larger server population) + var/list/access = list() //Useful for servers which either have fewer players, so each person needs to fill more than one role, or servers which like to give more access, so players can't hide forever in their super secure departments (I'm looking at you, chemistry!) + + //Determines who can demote this position + var/department_head = list() + + //Tells the given channels that the given mob is the new department head. See communications.dm for valid channels. + var/list/head_announce = null + + //Bitflags for the job + var/flag = NONE //Deprecated + var/department_flag = NONE //Deprecated +// var/auto_deadmin_role_flags = NONE + + //Players will be allowed to spawn in as jobs that are set to "Station" + var/faction = "None" + + //How many players can be this job + var/total_positions = 0 + + //How many players can spawn in as this job + var/spawn_positions = 0 + + //How many players have this job + var/current_positions = 0 + + //Supervisors, who this person answers to directly + var/supervisors = "" + + //Sellection screen color + var/selection_color = "#ffffff" + + + //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 + + // This is for Citadel specific tweaks to job notices. + var/custom_spawn_text + + //If you have the 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 + + var/outfit = null + + var/exp_requirements = 0 + + var/exp_type = "" + var/exp_type_department = "" + + //The amount of good boy points playing this role will earn you towards a higher chance to roll antagonist next round + //can be overridden by antag_rep.txt config + var/antag_rep = 10 + + var/list/mind_traits // Traits added to the mind of the mob assigned this job + var/list/blacklisted_quirks //list of quirk typepaths blacklisted. + + var/display_order = JOB_DISPLAY_ORDER_DEFAULT + +//Only override this proc +//H is usually a human unless an /equip override transformed it +/datum/job/proc/after_spawn(mob/living/H, mob/M, latejoin = FALSE) + //do actions on H but send messages to M as the key may not have been transferred_yet + if(mind_traits) + for(var/t in mind_traits) + ADD_TRAIT(H.mind, t, JOB_TRAIT) + +/datum/job/proc/announce(mob/living/carbon/human/H) + if(head_announce) + announce_head(H, head_announce) + +/datum/job/proc/override_latejoin_spawn(mob/living/carbon/human/H) //Return TRUE to force latejoining to not automatically place the person in latejoin shuttle/whatever. + return FALSE + +//Used for a special check of whether to allow a client to latejoin as this job. +/datum/job/proc/special_check_latejoin(client/C) + return TRUE + +/datum/job/proc/GetAntagRep() + . = CONFIG_GET(keyed_list/antag_rep)[lowertext(title)] + if(. == null) + return antag_rep + +//Don't override this unless the job transforms into a non-human (Silicons do this for example) +/datum/job/proc/equip(mob/living/carbon/human/H, visualsOnly = FALSE, announce = TRUE, latejoin = FALSE, datum/outfit/outfit_override = null, client/preference_source) + if(!H) + return FALSE + + if(CONFIG_GET(flag/enforce_human_authority) && (title in GLOB.command_positions)) + if(H.dna.species.id != "human") + H.set_species(/datum/species/human) + H.apply_pref_name("human", preference_source) + + //Equip the rest of the gear + H.dna.species.before_equip_job(src, H, visualsOnly) + + if(outfit_override || outfit) + H.equipOutfit(outfit_override ? outfit_override : outfit, visualsOnly) + + H.dna.species.after_equip_job(src, H, visualsOnly) + + if(!visualsOnly && announce) + announce(H) + +/datum/job/proc/get_access() + if(!config) //Needed for robots. + return src.minimal_access.Copy() + + . = list() + + if(CONFIG_GET(flag/jobs_have_minimal_access)) + . = src.minimal_access.Copy() + else + . = src.access.Copy() + + if(CONFIG_GET(flag/everyone_has_maint_access)) //Config has global maint access set + . |= list(ACCESS_MAINT_TUNNELS) + +/datum/job/proc/announce_head(var/mob/living/carbon/human/H, var/channels) //tells the given channel that the given mob is the new department head. See communications.dm for valid channels. + if(H && GLOB.announcement_systems.len) + //timer because these should come after the captain announcement + SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, .proc/addtimer, CALLBACK(pick(GLOB.announcement_systems), /obj/machinery/announcement_system/proc/announce, "NEWHEAD", H.real_name, H.job, channels), 1)) + +//If the configuration option is set to require players to be logged as old enough to play certain jobs, then this proc checks that they are, otherwise it just returns 1 +/datum/job/proc/player_old_enough(client/C) + if(available_in_days(C) == 0) + return TRUE //Available in 0 days = available right now = player is old enough to play. + return FALSE + + +/datum/job/proc/available_in_days(client/C) + if(!C) + return 0 + if(!CONFIG_GET(flag/use_age_restriction_for_jobs)) + return 0 + if(!SSdbcore.Connect()) + return 0 //Without a database connection we can't get a player's age so we'll assume they're old enough for all jobs + if(C.prefs.db_flags & DB_FLAG_EXEMPT) + return 0 + if(!isnum(minimal_player_age)) + return 0 + + return max(0, minimal_player_age - C.player_age) + +/datum/job/proc/config_check() + return TRUE + +/datum/job/proc/map_check() + return TRUE + +/datum/job/proc/radio_help_message(mob/M) + to_chat(M, "Prefix your message with :h to speak on your department's radio. To see other prefixes, look closely at your headset.") + +/datum/outfit/job + name = "Standard Gear" + + var/jobtype = null + + uniform = /obj/item/clothing/under/color/grey + id = /obj/item/card/id + ears = /obj/item/radio/headset + belt = /obj/item/pda + back = /obj/item/storage/backpack + shoes = /obj/item/clothing/shoes/sneakers/black + box = /obj/item/storage/box/survival + + var/backpack = /obj/item/storage/backpack + var/satchel = /obj/item/storage/backpack/satchel + var/duffelbag = /obj/item/storage/backpack/duffelbag + + var/pda_slot = SLOT_BELT + +/datum/outfit/job/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + switch(H.backbag) + if(GBACKPACK) + back = /obj/item/storage/backpack //Grey backpack + if(GSATCHEL) + back = /obj/item/storage/backpack/satchel //Grey satchel + if(GDUFFELBAG) + back = /obj/item/storage/backpack/duffelbag //Grey Duffel bag + if(LSATCHEL) + back = /obj/item/storage/backpack/satchel/leather //Leather Satchel + if(DSATCHEL) + back = satchel //Department satchel + if(DDUFFELBAG) + back = duffelbag //Department duffel bag + else + back = backpack //Department backpack + + //converts the uniform string into the path we'll wear, whether it's the skirt or regular variant + var/holder + if(H.jumpsuit_style == PREF_SKIRT) + holder = "[uniform]/skirt" + if(!text2path(holder)) + holder = "[uniform]" + else + holder = "[uniform]" + uniform = text2path(holder) + +/datum/outfit/job/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + if(visualsOnly) + return + + var/datum/job/J = SSjob.GetJobType(jobtype) + if(!J) + J = SSjob.GetJob(H.job) + + if(H.nameless && J.dresscodecompliant) + if(J.title in GLOB.command_positions) + H.real_name = J.title + else + H.real_name = "[J.title] #[rand(10000, 99999)]" + + var/obj/item/card/id/C = H.wear_id + if(istype(C)) + C.access = J.get_access() + shuffle_inplace(C.access) // Shuffle access list to make NTNet passkeys less predictable + C.registered_name = H.real_name + C.assignment = J.title + C.update_label() + H.sec_hud_set_ID() + + var/obj/item/pda/PDA = H.get_item_by_slot(pda_slot) + if(istype(PDA)) + PDA.owner = H.real_name + PDA.ownjob = J.title + PDA.update_label() + +/datum/outfit/job/get_chameleon_disguise_info() + var/list/types = ..() + types -= /obj/item/storage/backpack //otherwise this will override the actual backpacks + types += backpack + types += satchel + types += duffelbag + return types + +//Warden and regular officers add this result to their get_access() +/datum/job/proc/check_config_for_sec_maint() + if(CONFIG_GET(flag/security_has_maint_access)) + return list(ACCESS_MAINT_TUNNELS) + return list() diff --git a/code/modules/jobs/job_types/silicon.dm b/code/modules/jobs/job_types/ai.dm similarity index 71% rename from code/modules/jobs/job_types/silicon.dm rename to code/modules/jobs/job_types/ai.dm index ab963eb8f3..4bcfab5836 100644 --- a/code/modules/jobs/job_types/silicon.dm +++ b/code/modules/jobs/job_types/ai.dm @@ -1,90 +1,69 @@ -/* -AI -*/ -/datum/job/ai - title = "AI" - flag = AI_JF - department_flag = ENGSEC - faction = "Station" - total_positions = 1 - spawn_positions = 1 - selection_color = "#ccffcc" - supervisors = "your laws" - req_admin_notify = TRUE - minimal_player_age = 30 - exp_requirements = 180 - exp_type = EXP_TYPE_CREW - exp_type_department = EXP_TYPE_SILICON - var/do_special_check = TRUE - -/datum/job/ai/equip(mob/living/carbon/human/H, visualsOnly, announce, latejoin, outfit_override) - . = H.AIize(latejoin) - -/datum/job/ai/after_spawn(mob/H, mob/M, latejoin) - . = ..() - if(latejoin) - var/obj/structure/AIcore/latejoin_inactive/lateJoinCore - for(var/obj/structure/AIcore/latejoin_inactive/P in GLOB.latejoin_ai_cores) - if(P.is_available()) - lateJoinCore = P - GLOB.latejoin_ai_cores -= P - break - if(lateJoinCore) - lateJoinCore.available = FALSE - H.forceMove(lateJoinCore.loc) - qdel(lateJoinCore) - var/mob/living/silicon/ai/AI = H - AI.apply_pref_name("ai", M.client) //If this runtimes oh well jobcode is fucked. - AI.set_core_display_icon(null, M.client) - - //we may have been created after our borg - if(SSticker.current_state == GAME_STATE_SETTING_UP) - for(var/mob/living/silicon/robot/R in GLOB.silicon_mobs) - if(!R.connected_ai) - R.TryConnectToAI() - - if(latejoin) - announce(AI) - -/datum/job/ai/override_latejoin_spawn() - return TRUE - -/datum/job/ai/special_check_latejoin(client/C) - if(!do_special_check) - return TRUE - for(var/i in GLOB.latejoin_ai_cores) - var/obj/structure/AIcore/latejoin_inactive/LAI = i - if(istype(LAI)) - if(LAI.is_available()) - return TRUE - return FALSE - -/datum/job/ai/announce(mob/living/silicon/ai/AI) - . = ..() - SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, .proc/minor_announce, "[AI] has been downloaded to an empty bluespace-networked AI core at [AREACOORD(AI)].")) - -/datum/job/ai/config_check() - return CONFIG_GET(flag/allow_ai) - -/* -Cyborg -*/ -/datum/job/cyborg - title = "Cyborg" - flag = CYBORG - department_flag = ENGSEC - faction = "Station" - total_positions = 0 - spawn_positions = 1 - supervisors = "your laws and the AI" //Nodrak - selection_color = "#ddffdd" - minimal_player_age = 21 - exp_requirements = 120 - exp_type = EXP_TYPE_CREW - -/datum/job/cyborg/equip(mob/living/carbon/human/H, visualsOnly = FALSE, announce = TRUE, latejoin = FALSE, outfit_override = null) - return H.Robotize(FALSE, latejoin) - -/datum/job/cyborg/after_spawn(mob/living/silicon/robot/R, mob/M) - R.updatename(M.client) - R.gender = NEUTER +/datum/job/ai + title = "AI" + flag = AI_JF +// auto_deadmin_role_flags = DEADMIN_POSITION_SILICON + department_flag = ENGSEC + faction = "Station" + total_positions = 1 + spawn_positions = 1 + selection_color = "#ccffcc" + supervisors = "your laws" + req_admin_notify = TRUE + minimal_player_age = 30 + exp_requirements = 180 + exp_type = EXP_TYPE_CREW + exp_type_department = EXP_TYPE_SILICON + display_order = JOB_DISPLAY_ORDER_AI + var/do_special_check = TRUE + +/datum/job/ai/equip(mob/living/carbon/human/H, visualsOnly, announce, latejoin, datum/outfit/outfit_override, client/preference_source = null) + if(visualsOnly) + CRASH("dynamic preview is unsupported") + . = H.AIize(latejoin,preference_source) + +/datum/job/ai/after_spawn(mob/H, mob/M, latejoin) + . = ..() + if(latejoin) + var/obj/structure/AIcore/latejoin_inactive/lateJoinCore + for(var/obj/structure/AIcore/latejoin_inactive/P in GLOB.latejoin_ai_cores) + if(P.is_available()) + lateJoinCore = P + GLOB.latejoin_ai_cores -= P + break + if(lateJoinCore) + lateJoinCore.available = FALSE + H.forceMove(lateJoinCore.loc) + qdel(lateJoinCore) + var/mob/living/silicon/ai/AI = H + AI.apply_pref_name("ai", M.client) //If this runtimes oh well jobcode is fucked. + AI.set_core_display_icon(null, M.client) + + //we may have been created after our borg + if(SSticker.current_state == GAME_STATE_SETTING_UP) + for(var/mob/living/silicon/robot/R in GLOB.silicon_mobs) + if(!R.connected_ai) + R.TryConnectToAI() + + if(latejoin) + announce(AI) + +/datum/job/ai/override_latejoin_spawn() + return TRUE + +/datum/job/ai/special_check_latejoin(client/C) + if(!do_special_check) + return TRUE + for(var/i in GLOB.latejoin_ai_cores) + var/obj/structure/AIcore/latejoin_inactive/LAI = i + if(istype(LAI)) + if(LAI.is_available()) + return TRUE + return FALSE + +/datum/job/ai/announce(mob/living/silicon/ai/AI) + . = ..() + SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, .proc/minor_announce, "[AI] has been downloaded to an empty bluespace-networked AI core at [AREACOORD(AI)].")) + +/datum/job/ai/config_check() + return CONFIG_GET(flag/allow_ai) + diff --git a/code/modules/jobs/job_types/assistant.dm b/code/modules/jobs/job_types/assistant.dm index ce6eea97b0..c04560f849 100644 --- a/code/modules/jobs/job_types/assistant.dm +++ b/code/modules/jobs/job_types/assistant.dm @@ -14,7 +14,7 @@ Assistant minimal_access = list() //See /datum/job/assistant/get_access() outfit = /datum/outfit/job/assistant antag_rep = 7 - + display_order = JOB_DISPLAY_ORDER_ASSISTANT /datum/job/assistant/get_access() if(CONFIG_GET(flag/assistants_have_maint_access) || !CONFIG_GET(flag/jobs_have_minimal_access)) //Config has assistant maint access set diff --git a/code/modules/jobs/job_types/atmospheric_technician.dm b/code/modules/jobs/job_types/atmospheric_technician.dm new file mode 100644 index 0000000000..93775beca9 --- /dev/null +++ b/code/modules/jobs/job_types/atmospheric_technician.dm @@ -0,0 +1,44 @@ +/datum/job/atmos + title = "Atmospheric Technician" + flag = ATMOSTECH + department_head = list("Chief Engineer") + department_flag = ENGSEC + faction = "Station" + total_positions = 3 + spawn_positions = 2 + supervisors = "the chief engineer" + selection_color = "#ff9b3d" + exp_requirements = 60 + exp_type = EXP_TYPE_CREW + + outfit = /datum/outfit/job/atmos + + access = list(ACCESS_ENGINE, ACCESS_ENGINE_EQUIP, ACCESS_TECH_STORAGE, ACCESS_MAINT_TUNNELS, + ACCESS_EXTERNAL_AIRLOCKS, ACCESS_CONSTRUCTION, ACCESS_ATMOSPHERICS, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_ATMOSPHERICS, ACCESS_MAINT_TUNNELS, ACCESS_CONSTRUCTION, ACCESS_MINERAL_STOREROOM) + display_order = JOB_DISPLAY_ORDER_ATMOSPHERIC_TECHNICIAN + +/datum/outfit/job/atmos + name = "Atmospheric Technician" + jobtype = /datum/job/atmos + + belt = /obj/item/storage/belt/utility/atmostech + l_pocket = /obj/item/pda/atmos + ears = /obj/item/radio/headset/headset_eng + uniform = /obj/item/clothing/under/rank/atmospheric_technician + r_pocket = /obj/item/analyzer + + backpack = /obj/item/storage/backpack/industrial + satchel = /obj/item/storage/backpack/satchel/eng + duffelbag = /obj/item/storage/backpack/duffelbag/engineering + box = /obj/item/storage/box/engineer + pda_slot = SLOT_L_STORE + backpack_contents = list(/obj/item/modular_computer/tablet/preset/advanced=1) + +/datum/outfit/job/atmos/rig + name = "Atmospheric Technician (Hardsuit)" + + mask = /obj/item/clothing/mask/gas + suit = /obj/item/clothing/suit/space/hardsuit/engine/atmos + suit_store = /obj/item/tank/internals/oxygen + internals_slot = SLOT_S_STORE diff --git a/code/modules/jobs/job_types/bartender.dm b/code/modules/jobs/job_types/bartender.dm new file mode 100644 index 0000000000..0ace449757 --- /dev/null +++ b/code/modules/jobs/job_types/bartender.dm @@ -0,0 +1,30 @@ +/datum/job/bartender + title = "Bartender" + flag = BARTENDER + department_head = list("Head of Personnel") + department_flag = CIVILIAN + faction = "Station" + total_positions = 1 + spawn_positions = 1 + supervisors = "the head of personnel" + selection_color = "#bbe291" + exp_type_department = EXP_TYPE_SERVICE // This is so the jobs menu can work properly + + outfit = /datum/outfit/job/bartender + + access = list(ACCESS_HYDROPONICS, ACCESS_BAR, ACCESS_KITCHEN, ACCESS_MORGUE, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_BAR, ACCESS_MINERAL_STOREROOM) + display_order = JOB_DISPLAY_ORDER_BARTENDER + +/datum/outfit/job/bartender + name = "Bartender" + jobtype = /datum/job/bartender + + glasses = /obj/item/clothing/glasses/sunglasses/reagent + belt = /obj/item/pda/bar + ears = /obj/item/radio/headset/headset_srv + uniform = /obj/item/clothing/under/rank/bartender + suit = /obj/item/clothing/suit/armor/vest + backpack_contents = list(/obj/item/storage/box/beanbag=1,/obj/item/book/granter/action/drink_fling=1) + shoes = /obj/item/clothing/shoes/laceup + diff --git a/code/modules/jobs/job_types/botanist.dm b/code/modules/jobs/job_types/botanist.dm new file mode 100644 index 0000000000..e6338d9b0a --- /dev/null +++ b/code/modules/jobs/job_types/botanist.dm @@ -0,0 +1,32 @@ +/datum/job/hydro + title = "Botanist" + flag = BOTANIST + department_head = list("Head of Personnel") + department_flag = CIVILIAN + faction = "Station" + total_positions = 3 + spawn_positions = 2 + supervisors = "the head of personnel" + selection_color = "#bbe291" + + outfit = /datum/outfit/job/botanist + + access = list(ACCESS_HYDROPONICS, ACCESS_BAR, ACCESS_KITCHEN, ACCESS_MORGUE, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_HYDROPONICS, ACCESS_MORGUE, ACCESS_MINERAL_STOREROOM) + display_order = JOB_DISPLAY_ORDER_BOTANIST + +/datum/outfit/job/botanist + name = "Botanist" + jobtype = /datum/job/hydro + + belt = /obj/item/pda/botanist + ears = /obj/item/radio/headset/headset_srv + uniform = /obj/item/clothing/under/rank/hydroponics + suit = /obj/item/clothing/suit/apron + gloves =/obj/item/clothing/gloves/botanic_leather + suit_store = /obj/item/plant_analyzer + + backpack = /obj/item/storage/backpack/botany + satchel = /obj/item/storage/backpack/satchel/hyd + + diff --git a/code/modules/jobs/job_types/captain.dm b/code/modules/jobs/job_types/captain.dm old mode 100755 new mode 100644 index 58943df4e4..7e832d6975 --- a/code/modules/jobs/job_types/captain.dm +++ b/code/modules/jobs/job_types/captain.dm @@ -1,20 +1,19 @@ -/* -Captain -*/ /datum/job/captain title = "Captain" flag = CAPTAIN +// auto_deadmin_role_flags = DEADMIN_POSITION_HEAD|DEADMIN_POSITION_SECURITY //:eyes: department_head = list("CentCom") department_flag = ENGSEC faction = "Station" total_positions = 1 spawn_positions = 1 supervisors = "Nanotrasen officials and Space law" - selection_color = "#ccccff" + selection_color = "#aac1ee" req_admin_notify = 1 minimal_player_age = 14 exp_requirements = 180 exp_type = EXP_TYPE_CREW + exp_type_department = EXP_TYPE_COMMAND outfit = /datum/outfit/job/captain @@ -22,6 +21,9 @@ Captain minimal_access = list() //See get_access() mind_traits = list(TRAIT_CAPTAIN_METABOLISM) +// mind_traits = list(TRAIT_DISK_VERIFIER) + + display_order = JOB_DISPLAY_ORDER_CAPTAIN blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity) @@ -62,55 +64,3 @@ Captain mask = /obj/item/clothing/mask/gas/sechailer suit = /obj/item/clothing/suit/space/hardsuit/captain suit_store = /obj/item/tank/internals/oxygen - -/* -Head of Personnel -*/ -/datum/job/hop - title = "Head of Personnel" - flag = HOP - department_head = list("Captain") - department_flag = CIVILIAN - head_announce = list(RADIO_CHANNEL_SERVICE) - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the captain" - selection_color = "#ddddff" - req_admin_notify = 1 - minimal_player_age = 10 - exp_requirements = 180 - exp_type = EXP_TYPE_CREW - exp_type_department = EXP_TYPE_SUPPLY - - outfit = /datum/outfit/job/hop - - access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_COURT, ACCESS_WEAPONS, - ACCESS_MEDICAL, ACCESS_ENGINE, ACCESS_CHANGE_IDS, ACCESS_AI_UPLOAD, ACCESS_EVA, ACCESS_HEADS, - ACCESS_ALL_PERSONAL_LOCKERS, ACCESS_MAINT_TUNNELS, ACCESS_BAR, ACCESS_JANITOR, ACCESS_CONSTRUCTION, ACCESS_MORGUE, - ACCESS_CREMATORIUM, ACCESS_KITCHEN, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_MAILSORTING, ACCESS_QM, ACCESS_HYDROPONICS, ACCESS_LAWYER, - ACCESS_THEATRE, ACCESS_CHAPEL_OFFICE, ACCESS_LIBRARY, ACCESS_RESEARCH, ACCESS_MINING, ACCESS_VAULT, ACCESS_MINING_STATION, - ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_COURT, ACCESS_WEAPONS, - ACCESS_MEDICAL, ACCESS_ENGINE, ACCESS_CHANGE_IDS, ACCESS_AI_UPLOAD, ACCESS_EVA, ACCESS_HEADS, - ACCESS_ALL_PERSONAL_LOCKERS, ACCESS_MAINT_TUNNELS, ACCESS_BAR, ACCESS_JANITOR, ACCESS_CONSTRUCTION, ACCESS_MORGUE, - ACCESS_CREMATORIUM, ACCESS_KITCHEN, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_MAILSORTING, ACCESS_QM, ACCESS_HYDROPONICS, ACCESS_LAWYER, - ACCESS_THEATRE, ACCESS_CHAPEL_OFFICE, ACCESS_LIBRARY, ACCESS_RESEARCH, ACCESS_MINING, ACCESS_VAULT, ACCESS_MINING_STATION, - ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM) - - blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/prosopagnosia, /datum/quirk/insanity) - -/datum/outfit/job/hop - name = "Head of Personnel" - jobtype = /datum/job/hop - - id = /obj/item/card/id/silver - belt = /obj/item/pda/heads/hop - ears = /obj/item/radio/headset/heads/hop - uniform = /obj/item/clothing/under/rank/head_of_personnel - shoes = /obj/item/clothing/shoes/sneakers/brown - head = /obj/item/clothing/head/hopcap - backpack_contents = list(/obj/item/storage/box/ids=1,\ - /obj/item/melee/classic_baton/telescopic=1, /obj/item/modular_computer/tablet/preset/advanced = 1) - - chameleon_extras = list(/obj/item/gun/energy/e_gun, /obj/item/stamp/hop) diff --git a/code/modules/jobs/job_types/cargo_service.dm b/code/modules/jobs/job_types/cargo_service.dm deleted file mode 100644 index 8e24ece655..0000000000 --- a/code/modules/jobs/job_types/cargo_service.dm +++ /dev/null @@ -1,293 +0,0 @@ -/* -Quartermaster -*/ -/datum/job/qm - title = "Quartermaster" - flag = QUARTERMASTER - department_head = list("Head of Personnel") - department_flag = CIVILIAN - head_announce = list(RADIO_CHANNEL_SUPPLY) - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the head of personnel" - selection_color = "#d7b088" - - outfit = /datum/outfit/job/quartermaster - - access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_QM, ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM, ACCESS_VAULT) - minimal_access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_QM, ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM, ACCESS_VAULT) - - blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity) - -/datum/outfit/job/quartermaster - name = "Quartermaster" - jobtype = /datum/job/qm - - belt = /obj/item/pda/quartermaster - ears = /obj/item/radio/headset/headset_cargo - uniform = /obj/item/clothing/under/rank/cargo - shoes = /obj/item/clothing/shoes/sneakers/brown - glasses = /obj/item/clothing/glasses/sunglasses - l_hand = /obj/item/clipboard - - chameleon_extras = /obj/item/stamp/qm - -/* -Cargo Technician -*/ -/datum/job/cargo_tech - title = "Cargo Technician" - flag = CARGOTECH - department_head = list("Head of Personnel") - department_flag = CIVILIAN - faction = "Station" - total_positions = 3 - spawn_positions = 2 - supervisors = "the quartermaster and the head of personnel" - selection_color = "#dcba97" - - outfit = /datum/outfit/job/cargo_tech - - access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_QM, ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_MAINT_TUNNELS, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_MAILSORTING, ACCESS_MINERAL_STOREROOM) - -/datum/outfit/job/cargo_tech - name = "Cargo Technician" - jobtype = /datum/job/cargo_tech - - belt = /obj/item/pda/cargo - ears = /obj/item/radio/headset/headset_cargo - uniform = /obj/item/clothing/under/rank/cargotech - l_hand = /obj/item/export_scanner - -/* -Shaft Miner -*/ -/datum/job/mining - title = "Shaft Miner" - flag = MINER - department_head = list("Head of Personnel") - department_flag = CIVILIAN - faction = "Station" - total_positions = 3 - spawn_positions = 3 - supervisors = "the quartermaster and the head of personnel" - selection_color = "#dcba97" - custom_spawn_text = "Remember, you are a miner, not a hunter. Hunting monsters is not a requirement of your job, the only requirement of your job is to provide materials for the station. Don't be afraid to run away if you're inexperienced with fighting the mining area's locals." - - outfit = /datum/outfit/job/miner - - access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_CARGO_BOT, ACCESS_QM, ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MAILSORTING, ACCESS_MINERAL_STOREROOM) - -/datum/outfit/job/miner - name = "Shaft Miner (Lavaland)" - jobtype = /datum/job/mining - - belt = /obj/item/pda/shaftminer - ears = /obj/item/radio/headset/headset_cargo/mining - shoes = /obj/item/clothing/shoes/workboots/mining - gloves = /obj/item/clothing/gloves/color/black - uniform = /obj/item/clothing/under/rank/miner/lavaland - l_pocket = /obj/item/reagent_containers/hypospray/medipen/survival - r_pocket = /obj/item/storage/bag/ore //causes issues if spawned in backpack - backpack_contents = list( - /obj/item/flashlight/seclite=1,\ - /obj/item/kitchen/knife/combat/survival=1,\ - /obj/item/mining_voucher=1,\ - /obj/item/suit_voucher=1,\ - /obj/item/stack/marker_beacon/ten=1) - - backpack = /obj/item/storage/backpack/explorer - satchel = /obj/item/storage/backpack/satchel/explorer - duffelbag = /obj/item/storage/backpack/duffelbag - box = /obj/item/storage/box/survival_mining - - chameleon_extras = /obj/item/gun/energy/kinetic_accelerator - -/datum/outfit/job/miner/asteroid - name = "Shaft Miner (Asteroid)" - uniform = /obj/item/clothing/under/rank/miner - shoes = /obj/item/clothing/shoes/workboots - -/datum/outfit/job/miner/equipped - name = "Shaft Miner (Lavaland + Equipment)" - suit = /obj/item/clothing/suit/hooded/explorer/standard - mask = /obj/item/clothing/mask/gas/explorer - glasses = /obj/item/clothing/glasses/meson - suit_store = /obj/item/tank/internals/oxygen - internals_slot = SLOT_S_STORE - backpack_contents = list( - /obj/item/flashlight/seclite=1,\ - /obj/item/kitchen/knife/combat/survival=1, - /obj/item/mining_voucher=1, - /obj/item/t_scanner/adv_mining_scanner/lesser=1, - /obj/item/gun/energy/kinetic_accelerator=1,\ - /obj/item/stack/marker_beacon/ten=1) - -/datum/outfit/job/miner/equipped/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - ..() - if(visualsOnly) - return - if(istype(H.wear_suit, /obj/item/clothing/suit/hooded)) - var/obj/item/clothing/suit/hooded/S = H.wear_suit - S.ToggleHood() - -/datum/outfit/job/miner/equipped/hardsuit - name = "Shaft Miner (Equipment + Hardsuit)" - suit = /obj/item/clothing/suit/space/hardsuit/mining - mask = /obj/item/clothing/mask/breath - - -/* -Bartender -*/ -/datum/job/bartender - title = "Bartender" - flag = BARTENDER - department_head = list("Head of Personnel") - department_flag = CIVILIAN - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the head of personnel" - selection_color = "#bbe291" - - outfit = /datum/outfit/job/bartender - - access = list(ACCESS_HYDROPONICS, ACCESS_BAR, ACCESS_KITCHEN, ACCESS_MORGUE, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_BAR, ACCESS_MINERAL_STOREROOM) - - -/datum/outfit/job/bartender - name = "Bartender" - jobtype = /datum/job/bartender - - glasses = /obj/item/clothing/glasses/sunglasses/reagent - belt = /obj/item/pda/bar - ears = /obj/item/radio/headset/headset_srv - uniform = /obj/item/clothing/under/rank/bartender - suit = /obj/item/clothing/suit/armor/vest - backpack_contents = list(/obj/item/storage/box/beanbag=1,/obj/item/book/granter/action/drink_fling=1) - shoes = /obj/item/clothing/shoes/laceup - -/* -Cook -*/ -/datum/job/cook - title = "Cook" - flag = COOK - department_head = list("Head of Personnel") - department_flag = CIVILIAN - faction = "Station" - total_positions = 2 - spawn_positions = 1 - supervisors = "the head of personnel" - selection_color = "#bbe291" - var/cooks = 0 //Counts cooks amount - - outfit = /datum/outfit/job/cook - - access = list(ACCESS_HYDROPONICS, ACCESS_BAR, ACCESS_KITCHEN, ACCESS_MORGUE, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_KITCHEN, ACCESS_MORGUE, ACCESS_MINERAL_STOREROOM) - -/datum/outfit/job/cook - name = "Cook" - jobtype = /datum/job/cook - - belt = /obj/item/pda/cook - ears = /obj/item/radio/headset/headset_srv - uniform = /obj/item/clothing/under/rank/chef - suit = /obj/item/clothing/suit/toggle/chef - head = /obj/item/clothing/head/chefhat - mask = /obj/item/clothing/mask/fakemoustache/italian - backpack_contents = list(/obj/item/sharpener = 1) - -/datum/outfit/job/cook/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - ..() - var/datum/job/cook/J = SSjob.GetJobType(jobtype) - if(J) // Fix for runtime caused by invalid job being passed - if(J.cooks>0)//Cooks - suit = /obj/item/clothing/suit/apron/chef - head = /obj/item/clothing/head/soft/mime - if(!visualsOnly) - J.cooks++ - -/datum/outfit/job/cook/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - ..() - if(visualsOnly) - return - var/list/possible_boxes = subtypesof(/obj/item/storage/box/ingredients) - var/chosen_box = pick(possible_boxes) - var/obj/item/storage/box/I = new chosen_box(src) - H.equip_to_slot_or_del(I,SLOT_IN_BACKPACK) - var/datum/martial_art/cqc/under_siege/justacook = new - justacook.teach(H) - -/* -Botanist -*/ -/datum/job/hydro - title = "Botanist" - flag = BOTANIST - department_head = list("Head of Personnel") - department_flag = CIVILIAN - faction = "Station" - total_positions = 3 - spawn_positions = 2 - supervisors = "the head of personnel" - selection_color = "#bbe291" - - outfit = /datum/outfit/job/botanist - - access = list(ACCESS_HYDROPONICS, ACCESS_BAR, ACCESS_KITCHEN, ACCESS_MORGUE, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_HYDROPONICS, ACCESS_MORGUE, ACCESS_MINERAL_STOREROOM) - // Removed tox and chem access because STOP PISSING OFF THE CHEMIST GUYS - // Removed medical access because WHAT THE FUCK YOU AREN'T A DOCTOR YOU GROW WHEAT - // Given Morgue access because they have a viable means of cloning. - - -/datum/outfit/job/botanist - name = "Botanist" - jobtype = /datum/job/hydro - - belt = /obj/item/pda/botanist - ears = /obj/item/radio/headset/headset_srv - uniform = /obj/item/clothing/under/rank/hydroponics - suit = /obj/item/clothing/suit/apron - gloves =/obj/item/clothing/gloves/botanic_leather - suit_store = /obj/item/plant_analyzer - - backpack = /obj/item/storage/backpack/botany - satchel = /obj/item/storage/backpack/satchel/hyd - - -/* -Janitor -*/ -/datum/job/janitor - title = "Janitor" - flag = JANITOR - department_head = list("Head of Personnel") - department_flag = CIVILIAN - faction = "Station" - total_positions = 2 - spawn_positions = 1 - supervisors = "the head of personnel" - selection_color = "#bbe291" - var/global/janitors = 0 - - outfit = /datum/outfit/job/janitor - - access = list(ACCESS_JANITOR, ACCESS_MAINT_TUNNELS, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_JANITOR, ACCESS_MAINT_TUNNELS, ACCESS_MINERAL_STOREROOM) - -/datum/outfit/job/janitor - name = "Janitor" - jobtype = /datum/job/janitor - - belt = /obj/item/pda/janitor - ears = /obj/item/radio/headset/headset_srv - uniform = /obj/item/clothing/under/rank/janitor - backpack_contents = list(/obj/item/modular_computer/tablet/preset/advanced=1) diff --git a/code/modules/jobs/job_types/cargo_technician.dm b/code/modules/jobs/job_types/cargo_technician.dm new file mode 100644 index 0000000000..3ceb29bae2 --- /dev/null +++ b/code/modules/jobs/job_types/cargo_technician.dm @@ -0,0 +1,27 @@ +/datum/job/cargo_tech + title = "Cargo Technician" + flag = CARGOTECH + department_head = list("Quartermaster") + department_flag = CIVILIAN + faction = "Station" + total_positions = 3 + spawn_positions = 2 + supervisors = "the quartermaster" + selection_color = "#ca8f55" + + outfit = /datum/outfit/job/cargo_tech + + access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_QM, ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_MAINT_TUNNELS, ACCESS_CARGO, ACCESS_MAILSORTING, ACCESS_MINERAL_STOREROOM) + + display_order = JOB_DISPLAY_ORDER_CARGO_TECHNICIAN + +/datum/outfit/job/cargo_tech + name = "Cargo Technician" + jobtype = /datum/job/cargo_tech + + belt = /obj/item/pda/cargo + ears = /obj/item/radio/headset/headset_cargo + uniform = /obj/item/clothing/under/rank/cargotech + l_hand = /obj/item/export_scanner + diff --git a/code/modules/jobs/job_types/civilian_chaplain.dm b/code/modules/jobs/job_types/chaplain.dm similarity index 66% rename from code/modules/jobs/job_types/civilian_chaplain.dm rename to code/modules/jobs/job_types/chaplain.dm index 2d190cfe60..f6648fdf86 100644 --- a/code/modules/jobs/job_types/civilian_chaplain.dm +++ b/code/modules/jobs/job_types/chaplain.dm @@ -1,95 +1,121 @@ -//Due to how large this one is it gets its own file -/* -Chaplain -*/ -/datum/job/chaplain - title = "Chaplain" - flag = CHAPLAIN - department_head = list("Head of Personnel") - department_flag = CIVILIAN - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the head of personnel" - selection_color = "#dddddd" - - outfit = /datum/outfit/job/chaplain - - access = list(ACCESS_MORGUE, ACCESS_CHAPEL_OFFICE, ACCESS_CREMATORIUM, ACCESS_THEATRE) - minimal_access = list(ACCESS_MORGUE, ACCESS_CHAPEL_OFFICE, ACCESS_CREMATORIUM, ACCESS_THEATRE) - -/datum/job/chaplain/after_spawn(mob/living/H, mob/M) - . = ..() - if(H.mind) - H.mind.isholy = TRUE - - var/obj/item/storage/book/bible/booze/B = new - - if(GLOB.religion) - B.deity_name = GLOB.deity - B.name = GLOB.bible_name - B.icon_state = GLOB.bible_icon_state - B.item_state = GLOB.bible_item_state - to_chat(H, "There is already an established religion onboard the station. You are an acolyte of [GLOB.deity]. Defer to the Chaplain.") - H.equip_to_slot_or_del(B, SLOT_IN_BACKPACK) - var/nrt = GLOB.holy_weapon_type || /obj/item/nullrod - var/obj/item/nullrod/N = new nrt(H) - H.put_in_hands(N) - return - - var/new_religion = "Christianity" - if(M.client && M.client.prefs.custom_names["religion"]) - new_religion = M.client.prefs.custom_names["religion"] - - var/new_deity = "Space Jesus" - if(M.client && M.client.prefs.custom_names["deity"]) - new_deity = M.client.prefs.custom_names["deity"] - - B.deity_name = new_deity - - - switch(lowertext(new_religion)) - if("christianity") - B.name = pick("The Holy Bible","The Dead Sea Scrolls") - if("satanism") - B.name = "The Unholy Bible" - if("cthulhu") - B.name = "The Necronomicon" - if("islam") - B.name = "Quran" - if("scientology") - B.name = pick("The Biography of L. Ron Hubbard","Dianetics") - if("chaos") - B.name = "The Book of Lorgar" - if("imperium") - B.name = "Uplifting Primer" - if("toolboxia") - B.name = "Toolbox Manifesto" - if("homosexuality") - B.name = "Guys Gone Wild" - if("lol", "wtf", "gay", "penis", "ass", "poo", "badmin", "shitmin", "deadmin", "cock", "cocks", "meme", "memes") - B.name = pick("Woodys Got Wood: The Aftermath", "War of the Cocks", "Sweet Bro and Hella Jef: Expanded Edition") - H.adjustBrainLoss(100) // starts off retarded as fuck - if("science") - B.name = pick("Principle of Relativity", "Quantum Enigma: Physics Encounters Consciousness", "Programming the Universe", "Quantum Physics and Theology", "String Theory for Dummies", "How To: Build Your Own Warp Drive", "The Mysteries of Bluespace", "Playing God: Collector's Edition") - else - B.name = "The Holy Book of [new_religion]" - - GLOB.religion = new_religion - GLOB.bible_name = B.name - GLOB.deity = B.deity_name - - H.equip_to_slot_or_del(B, SLOT_IN_BACKPACK) - - SSblackbox.record_feedback("text", "religion_name", 1, "[new_religion]", 1) - SSblackbox.record_feedback("text", "religion_deity", 1, "[new_deity]", 1) - -/datum/outfit/job/chaplain - name = "Chaplain" - jobtype = /datum/job/chaplain - - belt = /obj/item/pda/chaplain - uniform = /obj/item/clothing/under/rank/chaplain - backpack_contents = list(/obj/item/camera/spooky = 1) - backpack = /obj/item/storage/backpack/cultpack - satchel = /obj/item/storage/backpack/cultpack +/datum/job/chaplain + title = "Chaplain" + flag = CHAPLAIN + department_head = list("Head of Personnel") + department_flag = CIVILIAN + faction = "Station" + total_positions = 1 + spawn_positions = 1 + supervisors = "the head of personnel" + selection_color = "#dddddd" + + outfit = /datum/outfit/job/chaplain + + access = list(ACCESS_MORGUE, ACCESS_CHAPEL_OFFICE, ACCESS_CREMATORIUM, ACCESS_THEATRE) + minimal_access = list(ACCESS_MORGUE, ACCESS_CHAPEL_OFFICE, ACCESS_CREMATORIUM, ACCESS_THEATRE) + + display_order = JOB_DISPLAY_ORDER_CHAPLAIN + + +/datum/job/chaplain/after_spawn(mob/living/H, mob/M) + . = ..() + if(H.mind) + H.mind.isholy = TRUE + + var/obj/item/storage/book/bible/booze/B = new + + if(GLOB.religion) + B.deity_name = GLOB.deity + B.name = GLOB.bible_name + B.icon_state = GLOB.bible_icon_state + B.item_state = GLOB.bible_item_state + to_chat(H, "There is already an established religion onboard the station. You are an acolyte of [GLOB.deity]. Defer to the Chaplain.") + H.equip_to_slot_or_del(B, SLOT_IN_BACKPACK) + var/nrt = GLOB.holy_weapon_type || /obj/item/nullrod + var/obj/item/nullrod/N = new nrt(H) + H.put_in_hands(N) + return + + var/new_religion = DEFAULT_RELIGION + if(M.client && M.client.prefs.custom_names["religion"]) + new_religion = M.client.prefs.custom_names["religion"] + + var/new_deity = DEFAULT_DEITY + if(M.client && M.client.prefs.custom_names["deity"]) + new_deity = M.client.prefs.custom_names["deity"] + + B.deity_name = new_deity + + + switch(lowertext(new_religion)) + if("christianity") // DEFAULT_RELIGION + B.name = pick("The Holy Bible","The Dead Sea Scrolls") + if("buddhism") + B.name = "The Sutras" + if("clownism","honkmother","honk","honkism","comedy") + B.name = pick("The Holy Joke Book", "Just a Prank", "Hymns to the Honkmother") + if("chaos") + B.name = "The Book of Lorgar" + if("cthulhu") + B.name = "The Necronomicon" + if("hinduism") + B.name = "The Vedas" + if("homosexuality") + B.name = pick("Guys Gone Wild","Coming Out of The Closet") + if("imperium") + B.name = "Uplifting Primer" + if("islam") + B.name = "Quran" + if("judaism") + B.name = "The Torah" + if("lampism") + B.name = "Fluorescent Incandescence" + if("lol", "wtf", "gay", "penis", "ass", "poo", "badmin", "shitmin", "deadmin", "cock", "cocks", "meme", "memes") + B.name = pick("Woodys Got Wood: The Aftermath", "War of the Cocks", "Sweet Bro and Hella Jef: Expanded Edition","F.A.T.A.L. Rulebook") + H.adjustBrainLoss(100) // starts off retarded as fuck + if("monkeyism","apism","gorillism","primatism") + B.name = pick("Going Bananas", "Bananas Out For Harambe") + if("mormonism") + B.name = "The Book of Mormon" + if("pastafarianism") + B.name = "The Gospel of the Flying Spaghetti Monster" + if("rastafarianism","rasta") + B.name = "The Holy Piby" + if("satanism") + B.name = "The Unholy Bible" + if("science") + B.name = pick("Principle of Relativity", "Quantum Enigma: Physics Encounters Consciousness", "Programming the Universe", "Quantum Physics and Theology", "String Theory for Dummies", "How To: Build Your Own Warp Drive", "The Mysteries of Bluespace", "Playing God: Collector's Edition") + if("scientology") + B.name = pick("The Biography of L. Ron Hubbard","Dianetics") + if("servicianism", "partying") + B.name = "The Tenets of Servicia" + B.deity_name = pick("Servicia", "Space Bacchus", "Space Dionysus") + B.desc = "Happy, Full, Clean. Live it and give it." + if("subgenius") + B.name = "Book of the SubGenius" + if("toolboxia","greytide") + B.name = pick("Toolbox Manifesto","iGlove Assistants") + if("weeaboo","kawaii") + B.name = pick("Fanfiction Compendium","Japanese for Dummies","The Manganomicon","Establishing Your O.T.P") + else + B.name = "The Holy Book of [new_religion]" + + GLOB.religion = new_religion + GLOB.bible_name = B.name + GLOB.deity = B.deity_name + + H.equip_to_slot_or_del(B, SLOT_IN_BACKPACK) + + SSblackbox.record_feedback("text", "religion_name", 1, "[new_religion]", 1) + SSblackbox.record_feedback("text", "religion_deity", 1, "[new_deity]", 1) + +/datum/outfit/job/chaplain + name = "Chaplain" + jobtype = /datum/job/chaplain + + belt = /obj/item/pda/chaplain + ears = /obj/item/radio/headset/headset_srv + uniform = /obj/item/clothing/under/rank/chaplain + backpack_contents = list(/obj/item/camera/spooky = 1) + backpack = /obj/item/storage/backpack/cultpack + satchel = /obj/item/storage/backpack/cultpack \ No newline at end of file diff --git a/code/modules/jobs/job_types/chemist.dm b/code/modules/jobs/job_types/chemist.dm new file mode 100644 index 0000000000..a915d261ed --- /dev/null +++ b/code/modules/jobs/job_types/chemist.dm @@ -0,0 +1,36 @@ +/datum/job/chemist + title = "Chemist" + flag = CHEMIST + department_head = list("Chief Medical Officer") + department_flag = MEDSCI + faction = "Station" + total_positions = 2 + spawn_positions = 2 + supervisors = "the chief medical officer" + selection_color = "#74b5e0" + exp_type = EXP_TYPE_CREW + exp_requirements = 60 + + outfit = /datum/outfit/job/chemist + + access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_SURGERY, ACCESS_CHEMISTRY, ACCESS_VIROLOGY, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_CHEMISTRY, ACCESS_MINERAL_STOREROOM) + + display_order = JOB_DISPLAY_ORDER_CHEMIST + +/datum/outfit/job/chemist + name = "Chemist" + jobtype = /datum/job/chemist + + glasses = /obj/item/clothing/glasses/science + belt = /obj/item/pda/chemist + ears = /obj/item/radio/headset/headset_med + uniform = /obj/item/clothing/under/rank/chemist + shoes = /obj/item/clothing/shoes/sneakers/white + suit = /obj/item/clothing/suit/toggle/labcoat/chemist + backpack = /obj/item/storage/backpack/chemistry + satchel = /obj/item/storage/backpack/satchel/chem + duffelbag = /obj/item/storage/backpack/duffelbag/med + + chameleon_extras = /obj/item/gun/syringe + diff --git a/code/modules/jobs/job_types/chief_engineer.dm b/code/modules/jobs/job_types/chief_engineer.dm new file mode 100644 index 0000000000..da3f281267 --- /dev/null +++ b/code/modules/jobs/job_types/chief_engineer.dm @@ -0,0 +1,64 @@ +/datum/job/chief_engineer + title = "Chief Engineer" + flag = CHIEF +// auto_deadmin_role_flags = DEADMIN_POSITION_HEAD + department_head = list("Captain") + department_flag = ENGSEC + head_announce = list(RADIO_CHANNEL_ENGINEERING) + faction = "Station" + total_positions = 1 + spawn_positions = 1 + supervisors = "the captain" + selection_color = "#ee7400" + req_admin_notify = 1 + minimal_player_age = 7 + exp_requirements = 180 + exp_type = EXP_TYPE_CREW + exp_type_department = EXP_TYPE_ENGINEERING + + outfit = /datum/outfit/job/ce + + access = list(ACCESS_ENGINE, ACCESS_ENGINE_EQUIP, ACCESS_TECH_STORAGE, ACCESS_MAINT_TUNNELS, + ACCESS_EXTERNAL_AIRLOCKS, ACCESS_ATMOSPHERICS, ACCESS_EVA, + ACCESS_HEADS, ACCESS_CONSTRUCTION, ACCESS_SEC_DOORS, ACCESS_MINISAT, + ACCESS_CE, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_TCOMSAT, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_ENGINE, ACCESS_ENGINE_EQUIP, ACCESS_TECH_STORAGE, ACCESS_MAINT_TUNNELS, + ACCESS_EXTERNAL_AIRLOCKS, ACCESS_ATMOSPHERICS, ACCESS_EVA, + ACCESS_HEADS, ACCESS_CONSTRUCTION, ACCESS_SEC_DOORS, ACCESS_MINISAT, + ACCESS_CE, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_TCOMSAT, ACCESS_MINERAL_STOREROOM) + + display_order = JOB_DISPLAY_ORDER_CHIEF_ENGINEER + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/paraplegic, /datum/quirk/insanity) + +/datum/outfit/job/ce + name = "Chief Engineer" + jobtype = /datum/job/chief_engineer + + id = /obj/item/card/id/silver + belt = /obj/item/storage/belt/utility/chief/full + l_pocket = /obj/item/pda/heads/ce + ears = /obj/item/radio/headset/heads/ce + uniform = /obj/item/clothing/under/rank/chief_engineer + shoes = /obj/item/clothing/shoes/sneakers/brown + head = /obj/item/clothing/head/hardhat/white + gloves = /obj/item/clothing/gloves/color/black/ce + backpack_contents = list(/obj/item/melee/classic_baton/telescopic=1, /obj/item/modular_computer/tablet/preset/advanced=1) + + backpack = /obj/item/storage/backpack/industrial + satchel = /obj/item/storage/backpack/satchel/eng + duffelbag = /obj/item/storage/backpack/duffelbag/engineering + box = /obj/item/storage/box/engineer + pda_slot = SLOT_L_STORE + chameleon_extras = /obj/item/stamp/ce + +/datum/outfit/job/ce/rig + name = "Chief Engineer (Hardsuit)" + + mask = /obj/item/clothing/mask/breath + suit = /obj/item/clothing/suit/space/hardsuit/engine/elite + shoes = /obj/item/clothing/shoes/magboots/advance + suit_store = /obj/item/tank/internals/oxygen + glasses = /obj/item/clothing/glasses/meson/engine + gloves = /obj/item/clothing/gloves/color/yellow + head = null + internals_slot = SLOT_S_STORE diff --git a/code/modules/jobs/job_types/chief_medical_officer.dm b/code/modules/jobs/job_types/chief_medical_officer.dm new file mode 100644 index 0000000000..4c7249f048 --- /dev/null +++ b/code/modules/jobs/job_types/chief_medical_officer.dm @@ -0,0 +1,59 @@ +/datum/job/cmo + title = "Chief Medical Officer" + flag = CMO_JF + department_head = list("Captain") + department_flag = MEDSCI +// auto_deadmin_role_flags = DEADMIN_POSITION_HEAD + head_announce = list(RADIO_CHANNEL_MEDICAL) + faction = "Station" + total_positions = 1 + spawn_positions = 1 + supervisors = "the captain" + selection_color = "#509ed1" + req_admin_notify = 1 + minimal_player_age = 7 + exp_requirements = 180 + exp_type = EXP_TYPE_CREW + exp_type_department = EXP_TYPE_MEDICAL + + outfit = /datum/outfit/job/cmo + + access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_HEADS, ACCESS_MINERAL_STOREROOM, + ACCESS_CHEMISTRY, ACCESS_VIROLOGY, ACCESS_CMO, ACCESS_SURGERY, ACCESS_RC_ANNOUNCE, + ACCESS_KEYCARD_AUTH, ACCESS_SEC_DOORS, ACCESS_MAINT_TUNNELS) + minimal_access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_HEADS, ACCESS_MINERAL_STOREROOM, + ACCESS_CHEMISTRY, ACCESS_VIROLOGY, ACCESS_CMO, ACCESS_SURGERY, ACCESS_RC_ANNOUNCE, + ACCESS_KEYCARD_AUTH, ACCESS_SEC_DOORS, ACCESS_MAINT_TUNNELS) + + display_order = JOB_DISPLAY_ORDER_CHIEF_MEDICAL_OFFICER + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity) + +/datum/outfit/job/cmo + name = "Chief Medical Officer" + jobtype = /datum/job/cmo + + id = /obj/item/card/id/silver + belt = /obj/item/pda/heads/cmo + l_pocket = /obj/item/pinpointer/crew + ears = /obj/item/radio/headset/heads/cmo + uniform = /obj/item/clothing/under/rank/chief_medical_officer + shoes = /obj/item/clothing/shoes/sneakers/brown + suit = /obj/item/clothing/suit/toggle/labcoat/cmo + l_hand = /obj/item/storage/firstaid/regular + suit_store = /obj/item/flashlight/pen + backpack_contents = list(/obj/item/melee/classic_baton/telescopic=1) + + backpack = /obj/item/storage/backpack/medic + satchel = /obj/item/storage/backpack/satchel/med + duffelbag = /obj/item/storage/backpack/duffelbag/med + + chameleon_extras = list(/obj/item/gun/syringe, /obj/item/stamp/cmo) + +/datum/outfit/job/cmo/hardsuit + name = "Chief Medical Officer (Hardsuit)" + + mask = /obj/item/clothing/mask/breath + suit = /obj/item/clothing/suit/space/hardsuit/medical + suit_store = /obj/item/tank/internals/oxygen + r_pocket = /obj/item/flashlight/pen + diff --git a/code/modules/jobs/job_types/civilian.dm b/code/modules/jobs/job_types/civilian.dm deleted file mode 100644 index f21ff69e8e..0000000000 --- a/code/modules/jobs/job_types/civilian.dm +++ /dev/null @@ -1,206 +0,0 @@ -/* -Clown -*/ -/datum/job/clown - title = "Clown" - flag = CLOWN - department_head = list("Head of Personnel") - department_flag = CIVILIAN - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the head of personnel" - selection_color = "#dddddd" - - outfit = /datum/outfit/job/clown - - access = list(ACCESS_THEATRE) - minimal_access = list(ACCESS_THEATRE) - -/datum/job/clown/after_spawn(mob/living/carbon/human/H, mob/M) - . = ..() - H.apply_pref_name("clown", M.client) - -/datum/outfit/job/clown - name = "Clown" - jobtype = /datum/job/clown - - belt = /obj/item/pda/clown - uniform = /obj/item/clothing/under/rank/clown - shoes = /obj/item/clothing/shoes/clown_shoes - mask = /obj/item/clothing/mask/gas/clown_hat - l_pocket = /obj/item/bikehorn - backpack_contents = list( - /obj/item/stamp/clown = 1, - /obj/item/reagent_containers/spray/waterflower = 1, - /obj/item/reagent_containers/food/snacks/grown/banana = 1, - /obj/item/instrument/bikehorn = 1, - ) - - implants = list(/obj/item/implant/sad_trombone) - - backpack = /obj/item/storage/backpack/clown - satchel = /obj/item/storage/backpack/clown - duffelbag = /obj/item/storage/backpack/duffelbag/clown //strangely has a duffel - - box = /obj/item/storage/box/hug/survival - - chameleon_extras = /obj/item/stamp/clown - - -/datum/outfit/job/clown/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - ..() - if(visualsOnly) - return - - H.fully_replace_character_name(H.real_name, pick(GLOB.clown_names)) - -/datum/outfit/job/clown/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - ..() - if(visualsOnly) - return - - H.dna.add_mutation(CLOWNMUT) - H.dna.add_mutation(SMILE) - -/* -Mime -*/ -/datum/job/mime - title = "Mime" - flag = MIME - department_head = list("Head of Personnel") - department_flag = CIVILIAN - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the head of personnel" - selection_color = "#dddddd" - - outfit = /datum/outfit/job/mime - - access = list(ACCESS_THEATRE) - minimal_access = list(ACCESS_THEATRE) - -/datum/job/mime/after_spawn(mob/living/carbon/human/H, mob/M) - H.apply_pref_name("mime", M.client) - -/datum/outfit/job/mime - name = "Mime" - jobtype = /datum/job/mime - - belt = /obj/item/pda/mime - uniform = /obj/item/clothing/under/rank/mime - mask = /obj/item/clothing/mask/gas/mime - gloves = /obj/item/clothing/gloves/color/white - head = /obj/item/clothing/head/frenchberet - suit = /obj/item/clothing/suit/suspenders - backpack_contents = list(/obj/item/reagent_containers/food/drinks/bottle/bottleofnothing=1) - - accessory = /obj/item/clothing/accessory/pocketprotector/cosmetology - backpack = /obj/item/storage/backpack/mime - satchel = /obj/item/storage/backpack/mime - - -/datum/outfit/job/mime/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - ..() - - if(visualsOnly) - return - - if(H.mind) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/mime_wall(null)) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/mime/speak(null)) - H.mind.miming = 1 - -/* -Curator -*/ -/datum/job/curator - title = "Curator" - flag = CURATOR - department_head = list("Head of Personnel") - department_flag = CIVILIAN - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the head of personnel" - selection_color = "#dddddd" - - outfit = /datum/outfit/job/curator - - access = list(ACCESS_LIBRARY) - minimal_access = list(ACCESS_LIBRARY, ACCESS_CONSTRUCTION,ACCESS_MINING_STATION) - -/datum/outfit/job/curator - name = "Curator" - jobtype = /datum/job/curator - - belt = /obj/item/pda/curator - uniform = /obj/item/clothing/under/rank/curator - l_hand = /obj/item/storage/bag/books - r_pocket = /obj/item/key/displaycase - l_pocket = /obj/item/laser_pointer - accessory = /obj/item/clothing/accessory/pocketprotector/full - backpack_contents = list( - /obj/item/melee/curator_whip = 1, - /obj/item/soapstone = 1, - /obj/item/barcodescanner = 1 - ) - - -/datum/outfit/job/curator/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - ..() - - if(visualsOnly) - return - - H.grant_all_languages(omnitongue=TRUE) -/* -Lawyer -*/ -/datum/job/lawyer - title = "Lawyer" - flag = LAWYER - department_head = list("Head of Personnel") - department_flag = CIVILIAN - faction = "Station" - total_positions = 2 - spawn_positions = 2 - supervisors = "the head of personnel" - selection_color = "#dddddd" - var/lawyers = 0 //Counts lawyer amount - - outfit = /datum/outfit/job/lawyer - - access = list(ACCESS_LAWYER, ACCESS_COURT, ACCESS_SEC_DOORS) - minimal_access = list(ACCESS_LAWYER, ACCESS_COURT, ACCESS_SEC_DOORS) - - mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM) - -/datum/outfit/job/lawyer - name = "Lawyer" - jobtype = /datum/job/lawyer - - belt = /obj/item/pda/lawyer - ears = /obj/item/radio/headset/headset_sec - uniform = /obj/item/clothing/under/lawyer/bluesuit - suit = /obj/item/clothing/suit/toggle/lawyer - shoes = /obj/item/clothing/shoes/laceup - l_hand = /obj/item/storage/briefcase/lawyer - l_pocket = /obj/item/laser_pointer - r_pocket = /obj/item/clothing/accessory/lawyers_badge - - chameleon_extras = /obj/item/stamp/law - - -/datum/outfit/job/lawyer/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - ..() - if(visualsOnly) - return - - var/datum/job/lawyer/J = SSjob.GetJobType(jobtype) - J.lawyers++ - if(J.lawyers>1) - uniform = /obj/item/clothing/under/lawyer/purpsuit - suit = /obj/item/clothing/suit/toggle/lawyer/purple diff --git a/code/modules/jobs/job_types/clown.dm b/code/modules/jobs/job_types/clown.dm new file mode 100644 index 0000000000..d8b88ae871 --- /dev/null +++ b/code/modules/jobs/job_types/clown.dm @@ -0,0 +1,58 @@ +/datum/job/clown + title = "Clown" + flag = CLOWN + department_head = list("Head of Personnel") + department_flag = CIVILIAN + faction = "Station" + total_positions = 1 + spawn_positions = 1 + supervisors = "the head of personnel" + selection_color = "#dddddd" + + outfit = /datum/outfit/job/clown + + access = list(ACCESS_THEATRE) + minimal_access = list(ACCESS_THEATRE) + + display_order = JOB_DISPLAY_ORDER_CLOWN + + +/datum/job/clown/after_spawn(mob/living/carbon/human/H, mob/M) + . = ..() + H.apply_pref_name("clown", M.client) + +/datum/outfit/job/clown + name = "Clown" + jobtype = /datum/job/clown + + belt = /obj/item/pda/clown + ears = /obj/item/radio/headset/headset_srv + uniform = /obj/item/clothing/under/rank/clown + shoes = /obj/item/clothing/shoes/clown_shoes + mask = /obj/item/clothing/mask/gas/clown_hat + l_pocket = /obj/item/bikehorn + backpack_contents = list( + /obj/item/stamp/clown = 1, + /obj/item/reagent_containers/spray/waterflower = 1, + /obj/item/reagent_containers/food/snacks/grown/banana = 1, + /obj/item/instrument/bikehorn = 1, + ) + + implants = list(/obj/item/implant/sad_trombone) + + backpack = /obj/item/storage/backpack/clown + satchel = /obj/item/storage/backpack/clown + duffelbag = /obj/item/storage/backpack/duffelbag/clown //strangely has a duffel + + box = /obj/item/storage/box/hug/survival + + chameleon_extras = /obj/item/stamp/clown + +/datum/outfit/job/clown/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + ..() + if(visualsOnly) + return + + H.fully_replace_character_name(H.real_name, pick(GLOB.clown_names)) //rename the mob AFTER they're equipped so their ID gets updated properly. + H.dna.add_mutation(CLOWNMUT) + H.dna.add_mutation(SMILE) diff --git a/code/modules/jobs/job_types/cook.dm b/code/modules/jobs/job_types/cook.dm new file mode 100644 index 0000000000..c213d4dffc --- /dev/null +++ b/code/modules/jobs/job_types/cook.dm @@ -0,0 +1,52 @@ +/datum/job/cook + title = "Cook" + flag = COOK + department_head = list("Head of Personnel") + department_flag = CIVILIAN + faction = "Station" + total_positions = 2 + spawn_positions = 1 + supervisors = "the head of personnel" + selection_color = "#bbe291" + var/cooks = 0 //Counts cooks amount + + outfit = /datum/outfit/job/cook + + access = list(ACCESS_HYDROPONICS, ACCESS_BAR, ACCESS_KITCHEN, ACCESS_MORGUE, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_KITCHEN, ACCESS_MORGUE, ACCESS_MINERAL_STOREROOM) + + display_order = JOB_DISPLAY_ORDER_COOK + +/datum/outfit/job/cook + name = "Cook" + jobtype = /datum/job/cook + + belt = /obj/item/pda/cook + ears = /obj/item/radio/headset/headset_srv + uniform = /obj/item/clothing/under/rank/chef + suit = /obj/item/clothing/suit/toggle/chef + head = /obj/item/clothing/head/chefhat + mask = /obj/item/clothing/mask/fakemoustache/italian + backpack_contents = list(/obj/item/sharpener = 1) + +/datum/outfit/job/cook/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + ..() + var/datum/job/cook/J = SSjob.GetJobType(jobtype) + if(J) // Fix for runtime caused by invalid job being passed + if(J.cooks>0)//Cooks + suit = /obj/item/clothing/suit/apron/chef + head = /obj/item/clothing/head/soft/mime + if(!visualsOnly) + J.cooks++ + +/datum/outfit/job/cook/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + ..() + if(visualsOnly) + return + var/list/possible_boxes = subtypesof(/obj/item/storage/box/ingredients) + var/chosen_box = pick(possible_boxes) + var/obj/item/storage/box/I = new chosen_box(src) + H.equip_to_slot_or_del(I,SLOT_IN_BACKPACK) + var/datum/martial_art/cqc/under_siege/justacook = new + justacook.teach(H) + diff --git a/code/modules/jobs/job_types/curator.dm b/code/modules/jobs/job_types/curator.dm new file mode 100644 index 0000000000..35fa8483d5 --- /dev/null +++ b/code/modules/jobs/job_types/curator.dm @@ -0,0 +1,43 @@ +/datum/job/curator + title = "Curator" + flag = CURATOR + department_head = list("Head of Personnel") + department_flag = CIVILIAN + faction = "Station" + total_positions = 1 + spawn_positions = 1 + supervisors = "the head of personnel" + selection_color = "#dddddd" + + outfit = /datum/outfit/job/curator + + access = list(ACCESS_LIBRARY) + minimal_access = list(ACCESS_LIBRARY, ACCESS_CONSTRUCTION, ACCESS_MINING_STATION) + + display_order = JOB_DISPLAY_ORDER_CURATOR + +/datum/outfit/job/curator + name = "Curator" + jobtype = /datum/job/curator + + shoes = /obj/item/clothing/shoes/laceup + belt = /obj/item/pda/curator + ears = /obj/item/radio/headset/headset_srv + uniform = /obj/item/clothing/under/rank/curator + l_hand = /obj/item/storage/bag/books + r_pocket = /obj/item/key/displaycase + l_pocket = /obj/item/laser_pointer + accessory = /obj/item/clothing/accessory/pocketprotector/full + backpack_contents = list( + /obj/item/melee/curator_whip = 1, + /obj/item/soapstone = 1, + /obj/item/barcodescanner = 1 + ) + +/datum/outfit/job/curator/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + ..() + + if(visualsOnly) + return + + H.grant_all_languages(omnitongue=TRUE) diff --git a/code/modules/jobs/job_types/cyborg.dm b/code/modules/jobs/job_types/cyborg.dm new file mode 100644 index 0000000000..29c4c3d833 --- /dev/null +++ b/code/modules/jobs/job_types/cyborg.dm @@ -0,0 +1,27 @@ +/datum/job/cyborg + title = "Cyborg" + flag = CYBORG +// auto_deadmin_role_flags = DEADMIN_POSITION_SILICON + department_flag = ENGSEC + faction = "Station" + total_positions = 0 + spawn_positions = 1 + supervisors = "your laws and the AI" //Nodrak + selection_color = "#ddffdd" + minimal_player_age = 21 + exp_requirements = 120 + exp_type = EXP_TYPE_CREW + + display_order = JOB_DISPLAY_ORDER_CYBORG + +/datum/job/cyborg/equip(mob/living/carbon/human/H, visualsOnly = FALSE, announce = TRUE, latejoin = FALSE, datum/outfit/outfit_override = null, client/preference_source = null) + if(visualsOnly) + CRASH("dynamic preview is unsupported") + return H.Robotize(FALSE, latejoin) + +/datum/job/cyborg/after_spawn(mob/living/silicon/robot/R, mob/M) + R.updatename(M.client) + R.gender = NEUTER + +/datum/job/cyborg/radio_help_message(mob/M) + to_chat(M, "Prefix your message with :b to speak with other cyborgs and AI.") diff --git a/code/modules/jobs/job_types/detective.dm b/code/modules/jobs/job_types/detective.dm new file mode 100644 index 0000000000..27a54fbd1f --- /dev/null +++ b/code/modules/jobs/job_types/detective.dm @@ -0,0 +1,57 @@ +/datum/job/detective + title = "Detective" + flag = DETECTIVE +// auto_deadmin_role_flags = DEADMIN_POSITION_SECURITY + department_head = list("Head of Security") + department_flag = ENGSEC + faction = "Station" + total_positions = 1 + spawn_positions = 1 + supervisors = "the head of security" + selection_color = "#c02f2f" + minimal_player_age = 7 + exp_requirements = 300 + exp_type = EXP_TYPE_CREW + + outfit = /datum/outfit/job/detective + + access = list(ACCESS_SEC_DOORS, ACCESS_FORENSICS_LOCKERS, ACCESS_MORGUE, ACCESS_MAINT_TUNNELS, ACCESS_COURT, ACCESS_BRIG, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_SEC_DOORS, ACCESS_FORENSICS_LOCKERS, ACCESS_MORGUE, ACCESS_MAINT_TUNNELS, ACCESS_COURT, ACCESS_BRIG, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM) + + mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM) + + display_order = JOB_DISPLAY_ORDER_DETECTIVE + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/nonviolent, /datum/quirk/paraplegic) + +/datum/outfit/job/detective + name = "Detective" + jobtype = /datum/job/detective + + belt = /obj/item/pda/detective + ears = /obj/item/radio/headset/headset_sec/alt + uniform = /obj/item/clothing/under/rank/det + neck = /obj/item/clothing/neck/tie/black + shoes = /obj/item/clothing/shoes/sneakers/brown + suit = /obj/item/clothing/suit/det_suit + gloves = /obj/item/clothing/gloves/color/black + head = /obj/item/clothing/head/fedora/det_hat + l_pocket = /obj/item/toy/crayon/white + r_pocket = /obj/item/lighter + backpack_contents = list(/obj/item/storage/box/evidence=1,\ + /obj/item/detective_scanner=1,\ + /obj/item/melee/classic_baton=1) + mask = /obj/item/clothing/mask/cigarette + + implants = list(/obj/item/implant/mindshield) + + chameleon_extras = list(/obj/item/gun/ballistic/revolver/detective, /obj/item/clothing/glasses/sunglasses) + +/datum/outfit/job/detective/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + ..() + var/obj/item/clothing/mask/cigarette/cig = H.wear_mask + if(istype(cig)) //Some species specfic changes can mess this up (plasmamen) + cig.light("") + + if(visualsOnly) + return + diff --git a/code/modules/jobs/job_types/engineering.dm b/code/modules/jobs/job_types/engineering.dm deleted file mode 100644 index e65cbab1bd..0000000000 --- a/code/modules/jobs/job_types/engineering.dm +++ /dev/null @@ -1,169 +0,0 @@ -/* -Chief Engineer -*/ -/datum/job/chief_engineer - title = "Chief Engineer" - flag = CHIEF - department_head = list("Captain") - department_flag = ENGSEC - head_announce = list(RADIO_CHANNEL_ENGINEERING) - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the captain" - selection_color = "#ffeeaa" - req_admin_notify = 1 - minimal_player_age = 7 - exp_requirements = 180 - exp_type = EXP_TYPE_CREW - exp_type_department = EXP_TYPE_ENGINEERING - - outfit = /datum/outfit/job/ce - - access = list(ACCESS_ENGINE, ACCESS_ENGINE_EQUIP, ACCESS_TECH_STORAGE, ACCESS_MAINT_TUNNELS, - ACCESS_EXTERNAL_AIRLOCKS, ACCESS_ATMOSPHERICS, ACCESS_EMERGENCY_STORAGE, ACCESS_EVA, - ACCESS_HEADS, ACCESS_CONSTRUCTION, ACCESS_SEC_DOORS, ACCESS_MINISAT, - ACCESS_CE, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_TCOMSAT, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_ENGINE, ACCESS_ENGINE_EQUIP, ACCESS_TECH_STORAGE, ACCESS_MAINT_TUNNELS, - ACCESS_EXTERNAL_AIRLOCKS, ACCESS_ATMOSPHERICS, ACCESS_EMERGENCY_STORAGE, ACCESS_EVA, - ACCESS_HEADS, ACCESS_CONSTRUCTION, ACCESS_SEC_DOORS, ACCESS_MINISAT, - ACCESS_CE, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_TCOMSAT, ACCESS_MINERAL_STOREROOM) - - blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/paraplegic, /datum/quirk/insanity) - -/datum/outfit/job/ce - name = "Chief Engineer" - jobtype = /datum/job/chief_engineer - - id = /obj/item/card/id/silver - belt = /obj/item/storage/belt/utility/chief/full - l_pocket = /obj/item/pda/heads/ce - ears = /obj/item/radio/headset/heads/ce - uniform = /obj/item/clothing/under/rank/chief_engineer - shoes = /obj/item/clothing/shoes/sneakers/brown - head = /obj/item/clothing/head/hardhat/white - gloves = /obj/item/clothing/gloves/color/black/ce - backpack_contents = list(/obj/item/melee/classic_baton/telescopic=1, /obj/item/modular_computer/tablet/preset/advanced=1) - - backpack = /obj/item/storage/backpack/industrial - satchel = /obj/item/storage/backpack/satchel/eng - duffelbag = /obj/item/storage/backpack/duffelbag/engineering - box = /obj/item/storage/box/engineer - pda_slot = SLOT_L_STORE - chameleon_extras = /obj/item/stamp/ce - -/datum/outfit/job/ce/rig - name = "Chief Engineer (Hardsuit)" - - mask = /obj/item/clothing/mask/breath - suit = /obj/item/clothing/suit/space/hardsuit/engine/elite - shoes = /obj/item/clothing/shoes/magboots/advance - suit_store = /obj/item/tank/internals/oxygen - glasses = /obj/item/clothing/glasses/meson/engine - gloves = /obj/item/clothing/gloves/color/yellow - head = null - internals_slot = SLOT_S_STORE - - -/* -Station Engineer -*/ -/datum/job/engineer - title = "Station Engineer" - flag = ENGINEER - department_head = list("Chief Engineer") - department_flag = ENGSEC - faction = "Station" - total_positions = 5 - spawn_positions = 5 - supervisors = "the chief engineer" - selection_color = "#fff5cc" - exp_requirements = 60 - exp_type = EXP_TYPE_CREW - - outfit = /datum/outfit/job/engineer - - access = list(ACCESS_ENGINE, ACCESS_ENGINE_EQUIP, ACCESS_TECH_STORAGE, ACCESS_MAINT_TUNNELS, - ACCESS_EXTERNAL_AIRLOCKS, ACCESS_CONSTRUCTION, ACCESS_ATMOSPHERICS, ACCESS_TCOMSAT, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_ENGINE, ACCESS_ENGINE_EQUIP, ACCESS_TECH_STORAGE, ACCESS_MAINT_TUNNELS, - ACCESS_EXTERNAL_AIRLOCKS, ACCESS_CONSTRUCTION, ACCESS_TCOMSAT, ACCESS_MINERAL_STOREROOM) - -/datum/outfit/job/engineer - name = "Station Engineer" - jobtype = /datum/job/engineer - - belt = /obj/item/storage/belt/utility/full/engi - l_pocket = /obj/item/pda/engineering - ears = /obj/item/radio/headset/headset_eng - uniform = /obj/item/clothing/under/rank/engineer - shoes = /obj/item/clothing/shoes/workboots - head = /obj/item/clothing/head/hardhat - r_pocket = /obj/item/t_scanner - - backpack = /obj/item/storage/backpack/industrial - satchel = /obj/item/storage/backpack/satchel/eng - duffelbag = /obj/item/storage/backpack/duffelbag/engineering - box = /obj/item/storage/box/engineer - pda_slot = SLOT_L_STORE - backpack_contents = list(/obj/item/modular_computer/tablet/preset/advanced=1) - -/datum/outfit/job/engineer/gloved - name = "Station Engineer (Gloves)" - gloves = /obj/item/clothing/gloves/color/yellow - -/datum/outfit/job/engineer/gloved/rig - name = "Station Engineer (Hardsuit)" - - mask = /obj/item/clothing/mask/breath - suit = /obj/item/clothing/suit/space/hardsuit/engine - suit_store = /obj/item/tank/internals/oxygen - head = null - internals_slot = SLOT_S_STORE - - -/* -Atmospheric Technician -*/ -/datum/job/atmos - title = "Atmospheric Technician" - flag = ATMOSTECH - department_head = list("Chief Engineer") - department_flag = ENGSEC - faction = "Station" - total_positions = 3 - spawn_positions = 2 - supervisors = "the chief engineer" - selection_color = "#fff5cc" - exp_requirements = 60 - exp_type = EXP_TYPE_CREW - - outfit = /datum/outfit/job/atmos - - access = list(ACCESS_ENGINE, ACCESS_ENGINE_EQUIP, ACCESS_TECH_STORAGE, ACCESS_MAINT_TUNNELS, - ACCESS_EXTERNAL_AIRLOCKS, ACCESS_CONSTRUCTION, ACCESS_ATMOSPHERICS, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_ATMOSPHERICS, ACCESS_MAINT_TUNNELS, ACCESS_EMERGENCY_STORAGE, ACCESS_CONSTRUCTION, ACCESS_MINERAL_STOREROOM) - -/datum/outfit/job/atmos - name = "Atmospheric Technician" - jobtype = /datum/job/atmos - - belt = /obj/item/storage/belt/utility/atmostech - l_pocket = /obj/item/pda/atmos - ears = /obj/item/radio/headset/headset_eng - uniform = /obj/item/clothing/under/rank/atmospheric_technician - r_pocket = /obj/item/analyzer - - backpack = /obj/item/storage/backpack/industrial - satchel = /obj/item/storage/backpack/satchel/eng - duffelbag = /obj/item/storage/backpack/duffelbag/engineering - box = /obj/item/storage/box/engineer - pda_slot = SLOT_L_STORE - backpack_contents = list(/obj/item/modular_computer/tablet/preset/advanced=1) - -/datum/outfit/job/atmos/rig - name = "Atmospheric Technician (Hardsuit)" - - mask = /obj/item/clothing/mask/gas - suit = /obj/item/clothing/suit/space/hardsuit/engine/atmos - suit_store = /obj/item/tank/internals/oxygen - internals_slot = SLOT_S_STORE diff --git a/code/modules/jobs/job_types/geneticist.dm b/code/modules/jobs/job_types/geneticist.dm new file mode 100644 index 0000000000..d7f59ff883 --- /dev/null +++ b/code/modules/jobs/job_types/geneticist.dm @@ -0,0 +1,35 @@ +/datum/job/geneticist + title = "Geneticist" + flag = GENETICIST + department_head = list("Chief Medical Officer", "Research Director") + department_flag = MEDSCI + faction = "Station" + total_positions = 2 + spawn_positions = 2 + supervisors = "the chief medical officer and research director" + selection_color = "#74b5e0" + exp_type = EXP_TYPE_CREW + exp_requirements = 60 + + outfit = /datum/outfit/job/geneticist + + access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_CHEMISTRY, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_RESEARCH, ACCESS_XENOBIOLOGY, ACCESS_ROBOTICS, ACCESS_MINERAL_STOREROOM, ACCESS_TECH_STORAGE) + minimal_access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_RESEARCH, ACCESS_MINERAL_STOREROOM) + + display_order = JOB_DISPLAY_ORDER_GENETICIST + +/datum/outfit/job/geneticist + name = "Geneticist" + jobtype = /datum/job/geneticist + + belt = /obj/item/pda/geneticist + ears = /obj/item/radio/headset/headset_medsci + uniform = /obj/item/clothing/under/rank/geneticist + shoes = /obj/item/clothing/shoes/sneakers/white + suit = /obj/item/clothing/suit/toggle/labcoat/genetics + suit_store = /obj/item/flashlight/pen + + backpack = /obj/item/storage/backpack/genetics + satchel = /obj/item/storage/backpack/satchel/gen + duffelbag = /obj/item/storage/backpack/duffelbag/med + diff --git a/code/modules/jobs/job_types/head_of_personnel.dm b/code/modules/jobs/job_types/head_of_personnel.dm new file mode 100644 index 0000000000..e320ce20b4 --- /dev/null +++ b/code/modules/jobs/job_types/head_of_personnel.dm @@ -0,0 +1,51 @@ +/datum/job/hop + title = "Head of Personnel" + flag = HOP +// auto_deadmin_role_flags = DEADMIN_POSITION_HEAD + department_head = list("Captain") + department_flag = CIVILIAN + head_announce = list(RADIO_CHANNEL_SERVICE) + faction = "Station" + total_positions = 1 + spawn_positions = 1 + supervisors = "the captain" + selection_color = "#3a8529" + req_admin_notify = 1 + minimal_player_age = 10 + exp_requirements = 180 + exp_type = EXP_TYPE_CREW + exp_type_department = EXP_TYPE_SERVICE + + outfit = /datum/outfit/job/hop + + access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_COURT, ACCESS_WEAPONS, + ACCESS_MEDICAL, ACCESS_ENGINE, ACCESS_CHANGE_IDS, ACCESS_AI_UPLOAD, ACCESS_EVA, ACCESS_HEADS, + ACCESS_ALL_PERSONAL_LOCKERS, ACCESS_MAINT_TUNNELS, ACCESS_BAR, ACCESS_JANITOR, ACCESS_CONSTRUCTION, ACCESS_MORGUE, + ACCESS_CREMATORIUM, ACCESS_KITCHEN, ACCESS_CARGO, ACCESS_MAILSORTING, ACCESS_QM, ACCESS_HYDROPONICS, ACCESS_LAWYER, + ACCESS_THEATRE, ACCESS_CHAPEL_OFFICE, ACCESS_LIBRARY, ACCESS_RESEARCH, ACCESS_MINING, ACCESS_VAULT, ACCESS_MINING_STATION, + ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_COURT, ACCESS_WEAPONS, + ACCESS_MEDICAL, ACCESS_ENGINE, ACCESS_CHANGE_IDS, ACCESS_AI_UPLOAD, ACCESS_EVA, ACCESS_HEADS, + ACCESS_ALL_PERSONAL_LOCKERS, ACCESS_MAINT_TUNNELS, ACCESS_BAR, ACCESS_JANITOR, ACCESS_CONSTRUCTION, ACCESS_MORGUE, + ACCESS_CREMATORIUM, ACCESS_KITCHEN, ACCESS_CARGO, ACCESS_MAILSORTING, ACCESS_QM, ACCESS_HYDROPONICS, ACCESS_LAWYER, + ACCESS_THEATRE, ACCESS_CHAPEL_OFFICE, ACCESS_LIBRARY, ACCESS_RESEARCH, ACCESS_MINING, ACCESS_VAULT, ACCESS_MINING_STATION, + ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM) + + display_order = JOB_DISPLAY_ORDER_HEAD_OF_PERSONNEL + + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/prosopagnosia, /datum/quirk/insanity) + +/datum/outfit/job/hop + name = "Head of Personnel" + jobtype = /datum/job/hop + + id = /obj/item/card/id/silver + belt = /obj/item/pda/heads/hop + ears = /obj/item/radio/headset/heads/hop + uniform = /obj/item/clothing/under/rank/head_of_personnel + shoes = /obj/item/clothing/shoes/sneakers/brown + head = /obj/item/clothing/head/hopcap + backpack_contents = list(/obj/item/storage/box/ids=1,\ + /obj/item/melee/classic_baton/telescopic=1, /obj/item/modular_computer/tablet/preset/advanced = 1) + + chameleon_extras = list(/obj/item/gun/energy/e_gun, /obj/item/stamp/hop) diff --git a/code/modules/jobs/job_types/head_of_security.dm b/code/modules/jobs/job_types/head_of_security.dm new file mode 100644 index 0000000000..f6b5dbd3ef --- /dev/null +++ b/code/modules/jobs/job_types/head_of_security.dm @@ -0,0 +1,68 @@ +/datum/job/hos + title = "Head of Security" + flag = HOS +// auto_deadmin_role_flags = DEADMIN_POSITION_HEAD|DEADMIN_POSITION_SECURITY + department_head = list("Captain") + department_flag = ENGSEC + head_announce = list(RADIO_CHANNEL_SECURITY) + faction = "Station" + total_positions = 1 + spawn_positions = 1 + supervisors = "the captain" + selection_color = "#b90000" + req_admin_notify = 1 + minimal_player_age = 14 + exp_requirements = 300 + exp_type = EXP_TYPE_CREW + exp_type_department = EXP_TYPE_SECURITY + + outfit = /datum/outfit/job/hos + mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM) + + access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_COURT, ACCESS_WEAPONS, + ACCESS_FORENSICS_LOCKERS, ACCESS_MORGUE, ACCESS_MAINT_TUNNELS, ACCESS_ALL_PERSONAL_LOCKERS, + ACCESS_RESEARCH, ACCESS_ENGINE, ACCESS_MINING, ACCESS_MEDICAL, ACCESS_CONSTRUCTION, ACCESS_MAILSORTING, + ACCESS_HEADS, ACCESS_HOS, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MAINT_TUNNELS, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_COURT, ACCESS_WEAPONS, + ACCESS_FORENSICS_LOCKERS, ACCESS_MORGUE, ACCESS_MAINT_TUNNELS, ACCESS_ALL_PERSONAL_LOCKERS, + ACCESS_RESEARCH, ACCESS_ENGINE, ACCESS_MINING, ACCESS_MEDICAL, ACCESS_CONSTRUCTION, ACCESS_MAILSORTING, + ACCESS_HEADS, ACCESS_HOS, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MAINT_TUNNELS, ACCESS_MINERAL_STOREROOM) + + display_order = JOB_DISPLAY_ORDER_HEAD_OF_SECURITY + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/nonviolent, /datum/quirk/paraplegic, /datum/quirk/insanity) + +/datum/outfit/job/hos + name = "Head of Security" + jobtype = /datum/job/hos + + id = /obj/item/card/id/silver + belt = /obj/item/pda/heads/hos + ears = /obj/item/radio/headset/heads/hos/alt + uniform = /obj/item/clothing/under/rank/head_of_security + shoes = /obj/item/clothing/shoes/jackboots + suit = /obj/item/clothing/suit/armor/hos/trenchcoat + gloves = /obj/item/clothing/gloves/color/black/hos + head = /obj/item/clothing/head/HoS/beret + glasses = /obj/item/clothing/glasses/hud/security/sunglasses + suit_store = /obj/item/gun/energy/e_gun + r_pocket = /obj/item/assembly/flash/handheld + l_pocket = /obj/item/restraints/handcuffs + backpack_contents = list(/obj/item/melee/classic_baton/telescopic=1) + + backpack = /obj/item/storage/backpack/security + satchel = /obj/item/storage/backpack/satchel/sec + duffelbag = /obj/item/storage/backpack/duffelbag/sec + box = /obj/item/storage/box/security + + implants = list(/obj/item/implant/mindshield) + + chameleon_extras = list(/obj/item/gun/energy/e_gun/hos, /obj/item/stamp/hos) + +/datum/outfit/job/hos/hardsuit + name = "Head of Security (Hardsuit)" + + mask = /obj/item/clothing/mask/gas/sechailer + suit = /obj/item/clothing/suit/space/hardsuit/security/hos + suit_store = /obj/item/tank/internals/oxygen + backpack_contents = list(/obj/item/melee/baton/loaded=1, /obj/item/gun/energy/e_gun=1) + diff --git a/code/modules/jobs/job_types/janitor.dm b/code/modules/jobs/job_types/janitor.dm new file mode 100644 index 0000000000..d0a06ca0e0 --- /dev/null +++ b/code/modules/jobs/job_types/janitor.dm @@ -0,0 +1,27 @@ +/datum/job/janitor + title = "Janitor" + flag = JANITOR + department_head = list("Head of Personnel") + department_flag = CIVILIAN + faction = "Station" + total_positions = 2 + spawn_positions = 1 + supervisors = "the head of personnel" + selection_color = "#bbe291" + var/global/janitors = 0 + + outfit = /datum/outfit/job/janitor + + access = list(ACCESS_JANITOR, ACCESS_MAINT_TUNNELS, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_JANITOR, ACCESS_MAINT_TUNNELS, ACCESS_MINERAL_STOREROOM) + + display_order = JOB_DISPLAY_ORDER_JANITOR + +/datum/outfit/job/janitor + name = "Janitor" + jobtype = /datum/job/janitor + + belt = /obj/item/pda/janitor + ears = /obj/item/radio/headset/headset_srv + uniform = /obj/item/clothing/under/rank/janitor + backpack_contents = list(/obj/item/modular_computer/tablet/preset/advanced=1) diff --git a/code/modules/jobs/job_types/lawyer.dm b/code/modules/jobs/job_types/lawyer.dm new file mode 100644 index 0000000000..0b8be52116 --- /dev/null +++ b/code/modules/jobs/job_types/lawyer.dm @@ -0,0 +1,47 @@ +/datum/job/lawyer + title = "Lawyer" + flag = LAWYER + department_head = list("Head of Personnel") + department_flag = CIVILIAN + faction = "Station" + total_positions = 2 + spawn_positions = 2 + supervisors = "the head of personnel" + selection_color = "#dddddd" + var/lawyers = 0 //Counts lawyer amount + + outfit = /datum/outfit/job/lawyer + + access = list(ACCESS_LAWYER, ACCESS_COURT, ACCESS_SEC_DOORS) + minimal_access = list(ACCESS_LAWYER, ACCESS_COURT, ACCESS_SEC_DOORS) + + mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM) + + display_order = JOB_DISPLAY_ORDER_LAWYER + +/datum/outfit/job/lawyer + name = "Lawyer" + jobtype = /datum/job/lawyer + + belt = /obj/item/pda/lawyer + ears = /obj/item/radio/headset/headset_sec + uniform = /obj/item/clothing/under/lawyer/bluesuit + suit = /obj/item/clothing/suit/toggle/lawyer + shoes = /obj/item/clothing/shoes/laceup + l_hand = /obj/item/storage/briefcase/lawyer + l_pocket = /obj/item/laser_pointer + r_pocket = /obj/item/clothing/accessory/lawyers_badge + + chameleon_extras = /obj/item/stamp/law + + +/datum/outfit/job/lawyer/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + ..() + if(visualsOnly) + return + + var/datum/job/lawyer/J = SSjob.GetJobType(jobtype) + J.lawyers++ + if(J.lawyers>1) + uniform = /obj/item/clothing/under/lawyer/purpsuit + suit = /obj/item/clothing/suit/toggle/lawyer/purple diff --git a/code/modules/jobs/job_types/medical.dm b/code/modules/jobs/job_types/medical.dm deleted file mode 100644 index 9eeb4ab06e..0000000000 --- a/code/modules/jobs/job_types/medical.dm +++ /dev/null @@ -1,207 +0,0 @@ -/* -Chief Medical Officer -*/ -/datum/job/cmo - title = "Chief Medical Officer" - flag = CMO_JF - department_head = list("Captain") - department_flag = MEDSCI - head_announce = list(RADIO_CHANNEL_MEDICAL) - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the captain" - selection_color = "#ffddf0" - req_admin_notify = 1 - minimal_player_age = 7 - exp_requirements = 180 - exp_type = EXP_TYPE_CREW - exp_type_department = EXP_TYPE_MEDICAL - - outfit = /datum/outfit/job/cmo - - access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_HEADS, ACCESS_MINERAL_STOREROOM, - ACCESS_CHEMISTRY, ACCESS_VIROLOGY, ACCESS_CMO, ACCESS_SURGERY, ACCESS_RC_ANNOUNCE, - ACCESS_KEYCARD_AUTH, ACCESS_SEC_DOORS, ACCESS_MAINT_TUNNELS) - minimal_access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_HEADS, ACCESS_MINERAL_STOREROOM, - ACCESS_CHEMISTRY, ACCESS_VIROLOGY, ACCESS_CMO, ACCESS_SURGERY, ACCESS_RC_ANNOUNCE, - ACCESS_KEYCARD_AUTH, ACCESS_SEC_DOORS, ACCESS_MAINT_TUNNELS) - - blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity) - -/datum/outfit/job/cmo - name = "Chief Medical Officer" - jobtype = /datum/job/cmo - - id = /obj/item/card/id/silver - belt = /obj/item/pda/heads/cmo - l_pocket = /obj/item/pinpointer/crew - ears = /obj/item/radio/headset/heads/cmo - uniform = /obj/item/clothing/under/rank/chief_medical_officer - shoes = /obj/item/clothing/shoes/sneakers/brown - suit = /obj/item/clothing/suit/toggle/labcoat/cmo - l_hand = /obj/item/storage/firstaid/regular - suit_store = /obj/item/flashlight/pen - backpack_contents = list(/obj/item/melee/classic_baton/telescopic=1) - - backpack = /obj/item/storage/backpack/medic - satchel = /obj/item/storage/backpack/satchel/med - duffelbag = /obj/item/storage/backpack/duffelbag/med - - chameleon_extras = list(/obj/item/gun/syringe, /obj/item/stamp/cmo) - -/datum/outfit/job/cmo/hardsuit - name = "Chief Medical Officer (Hardsuit)" - - mask = /obj/item/clothing/mask/breath - suit = /obj/item/clothing/suit/space/hardsuit/medical - suit_store = /obj/item/tank/internals/oxygen - r_pocket = /obj/item/flashlight/pen - -/* -Medical Doctor -*/ -/datum/job/doctor - title = "Medical Doctor" - flag = DOCTOR - department_head = list("Chief Medical Officer") - department_flag = MEDSCI - faction = "Station" - total_positions = 5 - spawn_positions = 3 - supervisors = "the chief medical officer" - selection_color = "#ffeef0" - - outfit = /datum/outfit/job/doctor - - access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_SURGERY, ACCESS_CHEMISTRY, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_SURGERY, ACCESS_CLONING, ACCESS_MINERAL_STOREROOM) - -/datum/outfit/job/doctor - name = "Medical Doctor" - jobtype = /datum/job/doctor - - belt = /obj/item/pda/medical - ears = /obj/item/radio/headset/headset_med - uniform = /obj/item/clothing/under/rank/medical - shoes = /obj/item/clothing/shoes/sneakers/white - suit = /obj/item/clothing/suit/toggle/labcoat - l_hand = /obj/item/storage/firstaid/regular - suit_store = /obj/item/flashlight/pen - - backpack = /obj/item/storage/backpack/medic - satchel = /obj/item/storage/backpack/satchel/med - duffelbag = /obj/item/storage/backpack/duffelbag/med - - chameleon_extras = /obj/item/gun/syringe - -/* -Chemist -*/ -/datum/job/chemist - title = "Chemist" - flag = CHEMIST - department_head = list("Chief Medical Officer") - department_flag = MEDSCI - faction = "Station" - total_positions = 2 - spawn_positions = 2 - supervisors = "the chief medical officer" - selection_color = "#ffeef0" - exp_type = EXP_TYPE_CREW - exp_requirements = 60 - - outfit = /datum/outfit/job/chemist - - access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_SURGERY, ACCESS_CHEMISTRY, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_MEDICAL, ACCESS_CHEMISTRY, ACCESS_MINERAL_STOREROOM) - -/datum/outfit/job/chemist - name = "Chemist" - jobtype = /datum/job/chemist - - glasses = /obj/item/clothing/glasses/science - belt = /obj/item/pda/chemist - ears = /obj/item/radio/headset/headset_med - uniform = /obj/item/clothing/under/rank/chemist - shoes = /obj/item/clothing/shoes/sneakers/white - suit = /obj/item/clothing/suit/toggle/labcoat/chemist - backpack = /obj/item/storage/backpack/chemistry - satchel = /obj/item/storage/backpack/satchel/chem - duffelbag = /obj/item/storage/backpack/duffelbag/med - l_hand = /obj/item/fermichem/pHbooklet - - chameleon_extras = /obj/item/gun/syringe - -/* -Geneticist -*/ -/datum/job/geneticist - title = "Geneticist" - flag = GENETICIST - department_head = list("Chief Medical Officer", "Research Director") - department_flag = MEDSCI - faction = "Station" - total_positions = 2 - spawn_positions = 2 - supervisors = "the chief medical officer and research director" - selection_color = "#ffeef0" - exp_type = EXP_TYPE_CREW - exp_requirements = 60 - - outfit = /datum/outfit/job/geneticist - - access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_CHEMISTRY, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_RESEARCH, ACCESS_XENOBIOLOGY, ACCESS_ROBOTICS, ACCESS_MINERAL_STOREROOM, ACCESS_TECH_STORAGE) - minimal_access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_RESEARCH, ACCESS_MINERAL_STOREROOM) - -/datum/outfit/job/geneticist - name = "Geneticist" - jobtype = /datum/job/geneticist - - belt = /obj/item/pda/geneticist - ears = /obj/item/radio/headset/headset_medsci - uniform = /obj/item/clothing/under/rank/geneticist - shoes = /obj/item/clothing/shoes/sneakers/white - suit = /obj/item/clothing/suit/toggle/labcoat/genetics - suit_store = /obj/item/flashlight/pen - - backpack = /obj/item/storage/backpack/genetics - satchel = /obj/item/storage/backpack/satchel/gen - duffelbag = /obj/item/storage/backpack/duffelbag/med - -/* -Virologist -*/ -/datum/job/virologist - title = "Virologist" - flag = VIROLOGIST - department_head = list("Chief Medical Officer") - department_flag = MEDSCI - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the chief medical officer" - selection_color = "#ffeef0" - exp_type = EXP_TYPE_CREW - exp_requirements = 60 - - outfit = /datum/outfit/job/virologist - - access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_SURGERY, ACCESS_CHEMISTRY, ACCESS_VIROLOGY, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_MEDICAL, ACCESS_VIROLOGY, ACCESS_MINERAL_STOREROOM) - -/datum/outfit/job/virologist - name = "Virologist" - jobtype = /datum/job/virologist - - belt = /obj/item/pda/viro - ears = /obj/item/radio/headset/headset_med - uniform = /obj/item/clothing/under/rank/virologist - mask = /obj/item/clothing/mask/surgical - shoes = /obj/item/clothing/shoes/sneakers/white - suit = /obj/item/clothing/suit/toggle/labcoat/virologist - suit_store = /obj/item/flashlight/pen - - backpack = /obj/item/storage/backpack/virology - satchel = /obj/item/storage/backpack/satchel/vir - duffelbag = /obj/item/storage/backpack/duffelbag/med diff --git a/code/modules/jobs/job_types/medical_doctor.dm b/code/modules/jobs/job_types/medical_doctor.dm new file mode 100644 index 0000000000..19fa1c7158 --- /dev/null +++ b/code/modules/jobs/job_types/medical_doctor.dm @@ -0,0 +1,35 @@ +/datum/job/doctor + title = "Medical Doctor" + flag = DOCTOR + department_head = list("Chief Medical Officer") + department_flag = MEDSCI + faction = "Station" + total_positions = 5 + spawn_positions = 3 + supervisors = "the chief medical officer" + selection_color = "#74b5e0" + + outfit = /datum/outfit/job/doctor + + access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_SURGERY, ACCESS_CHEMISTRY, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_VIROLOGY, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_SURGERY, ACCESS_CLONING, ACCESS_MINERAL_STOREROOM) + + display_order = JOB_DISPLAY_ORDER_MEDICAL_DOCTOR + +/datum/outfit/job/doctor + name = "Medical Doctor" + jobtype = /datum/job/doctor + + belt = /obj/item/pda/medical + ears = /obj/item/radio/headset/headset_med + uniform = /obj/item/clothing/under/rank/medical + shoes = /obj/item/clothing/shoes/sneakers/white + suit = /obj/item/clothing/suit/toggle/labcoat + l_hand = /obj/item/storage/firstaid/regular + suit_store = /obj/item/flashlight/pen + + backpack = /obj/item/storage/backpack/medic + satchel = /obj/item/storage/backpack/satchel/med + duffelbag = /obj/item/storage/backpack/duffelbag/med + + chameleon_extras = /obj/item/gun/syringe diff --git a/code/modules/jobs/job_types/mime.dm b/code/modules/jobs/job_types/mime.dm new file mode 100644 index 0000000000..1347da7125 --- /dev/null +++ b/code/modules/jobs/job_types/mime.dm @@ -0,0 +1,49 @@ +/datum/job/mime + title = "Mime" + flag = MIME + department_head = list("Head of Personnel") + department_flag = CIVILIAN + faction = "Station" + total_positions = 1 + spawn_positions = 1 + supervisors = "the head of personnel" + selection_color = "#dddddd" + + outfit = /datum/outfit/job/mime + + access = list(ACCESS_THEATRE) + minimal_access = list(ACCESS_THEATRE) + + display_order = JOB_DISPLAY_ORDER_MIME + +/datum/job/mime/after_spawn(mob/living/carbon/human/H, mob/M) + H.apply_pref_name("mime", M.client) + +/datum/outfit/job/mime + name = "Mime" + jobtype = /datum/job/mime + + belt = /obj/item/pda/mime + ears = /obj/item/radio/headset/headset_srv + uniform = /obj/item/clothing/under/rank/mime + mask = /obj/item/clothing/mask/gas/mime + gloves = /obj/item/clothing/gloves/color/white + head = /obj/item/clothing/head/frenchberet + suit = /obj/item/clothing/suit/suspenders + backpack_contents = list(/obj/item/reagent_containers/food/drinks/bottle/bottleofnothing=1) + + backpack = /obj/item/storage/backpack/mime + satchel = /obj/item/storage/backpack/mime + + +/datum/outfit/job/mime/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + ..() + + if(visualsOnly) + return + + if(H.mind) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/mime_wall(null)) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/mime/speak(null)) + H.mind.miming = 1 + diff --git a/code/modules/jobs/job_types/quartermaster.dm b/code/modules/jobs/job_types/quartermaster.dm new file mode 100644 index 0000000000..49a93026ba --- /dev/null +++ b/code/modules/jobs/job_types/quartermaster.dm @@ -0,0 +1,41 @@ +/datum/job/qm + title = "Quartermaster" + flag = QUARTERMASTER + department_head = list("Captain") + department_flag = CIVILIAN + head_announce = list(RADIO_CHANNEL_SUPPLY) +// auto_deadmin_role_flags = DEADMIN_POSITION_HEAD + faction = "Station" + total_positions = 1 + spawn_positions = 1 + supervisors = "the captain" + selection_color = "#a06121" + req_admin_notify = 1 + minimal_player_age = 7 + exp_requirements = 180 + exp_type = EXP_TYPE_CREW + exp_type_department = EXP_TYPE_SUPPLY + + outfit = /datum/outfit/job/quartermaster + + access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_QM, ACCESS_MINING, ACCESS_MINING_STATION, + ACCESS_MINERAL_STOREROOM, ACCESS_VAULT) + minimal_access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_QM, ACCESS_MINING, + ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM, ACCESS_VAULT) + + display_order = JOB_DISPLAY_ORDER_QUARTERMASTER + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity) + +/datum/outfit/job/quartermaster + name = "Quartermaster" + jobtype = /datum/job/qm + + belt = /obj/item/pda/quartermaster + ears = /obj/item/radio/headset/headset_cargo + uniform = /obj/item/clothing/under/rank/cargo + shoes = /obj/item/clothing/shoes/sneakers/brown + glasses = /obj/item/clothing/glasses/sunglasses + l_hand = /obj/item/clipboard + + chameleon_extras = /obj/item/stamp/qm + diff --git a/code/modules/jobs/job_types/research_director.dm b/code/modules/jobs/job_types/research_director.dm new file mode 100644 index 0000000000..5368ceee64 --- /dev/null +++ b/code/modules/jobs/job_types/research_director.dm @@ -0,0 +1,61 @@ +/datum/job/rd + title = "Research Director" + flag = RD_JF +// auto_deadmin_role_flags = DEADMIN_POSITION_HEAD + department_head = list("Captain") + department_flag = MEDSCI + head_announce = list(RADIO_CHANNEL_SCIENCE) + faction = "Station" + total_positions = 1 + spawn_positions = 1 + supervisors = "the captain" + selection_color = "#7544cc" + req_admin_notify = 1 + minimal_player_age = 7 + exp_type_department = EXP_TYPE_SCIENCE + exp_requirements = 180 + exp_type = EXP_TYPE_CREW + + outfit = /datum/outfit/job/rd + + access = list(ACCESS_RD, ACCESS_HEADS, ACCESS_TOX, ACCESS_GENETICS, ACCESS_MORGUE, + ACCESS_TOX_STORAGE, ACCESS_TELEPORTER, ACCESS_SEC_DOORS, + ACCESS_RESEARCH, ACCESS_ROBOTICS, ACCESS_XENOBIOLOGY, ACCESS_AI_UPLOAD, + ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM, + ACCESS_TECH_STORAGE, ACCESS_MINISAT, ACCESS_MAINT_TUNNELS, ACCESS_NETWORK) + minimal_access = list(ACCESS_RD, ACCESS_HEADS, ACCESS_TOX, ACCESS_GENETICS, ACCESS_MORGUE, + ACCESS_TOX_STORAGE, ACCESS_TELEPORTER, ACCESS_SEC_DOORS, + ACCESS_RESEARCH, ACCESS_ROBOTICS, ACCESS_XENOBIOLOGY, ACCESS_AI_UPLOAD, + ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM, + ACCESS_TECH_STORAGE, ACCESS_MINISAT, ACCESS_MAINT_TUNNELS, ACCESS_NETWORK) + + display_order = JOB_DISPLAY_ORDER_RESEARCH_DIRECTOR + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity) + +/datum/outfit/job/rd + name = "Research Director" + jobtype = /datum/job/rd + + id = /obj/item/card/id/silver + belt = /obj/item/pda/heads/rd + ears = /obj/item/radio/headset/heads/rd + uniform = /obj/item/clothing/under/rank/research_director + shoes = /obj/item/clothing/shoes/sneakers/brown + suit = /obj/item/clothing/suit/toggle/labcoat + l_hand = /obj/item/clipboard + l_pocket = /obj/item/laser_pointer + backpack_contents = list(/obj/item/melee/classic_baton/telescopic=1, /obj/item/modular_computer/tablet/preset/advanced=1) + + backpack = /obj/item/storage/backpack/science + satchel = /obj/item/storage/backpack/satchel/tox + + chameleon_extras = /obj/item/stamp/rd + +/datum/outfit/job/rd/rig + name = "Research Director (Hardsuit)" + + l_hand = null + mask = /obj/item/clothing/mask/breath + suit = /obj/item/clothing/suit/space/hardsuit/rd + suit_store = /obj/item/tank/internals/oxygen + internals_slot = SLOT_S_STORE diff --git a/code/modules/jobs/job_types/roboticist.dm b/code/modules/jobs/job_types/roboticist.dm new file mode 100644 index 0000000000..782b175ad4 --- /dev/null +++ b/code/modules/jobs/job_types/roboticist.dm @@ -0,0 +1,34 @@ +/datum/job/roboticist + title = "Roboticist" + flag = ROBOTICIST + department_head = list("Research Director") + department_flag = MEDSCI + faction = "Station" + total_positions = 2 + spawn_positions = 2 + supervisors = "the research director" + selection_color = "#9574cd" + exp_requirements = 60 + exp_type = EXP_TYPE_CREW + + outfit = /datum/outfit/job/roboticist + + access = list(ACCESS_ROBOTICS, ACCESS_TOX, ACCESS_TOX_STORAGE, ACCESS_TECH_STORAGE, ACCESS_MORGUE, ACCESS_RESEARCH, ACCESS_MINERAL_STOREROOM, ACCESS_XENOBIOLOGY, ACCESS_GENETICS) + minimal_access = list(ACCESS_ROBOTICS, ACCESS_TECH_STORAGE, ACCESS_MORGUE, ACCESS_RESEARCH, ACCESS_MINERAL_STOREROOM) + + display_order = JOB_DISPLAY_ORDER_ROBOTICIST + +/datum/outfit/job/roboticist + name = "Roboticist" + jobtype = /datum/job/roboticist + + belt = /obj/item/storage/belt/utility/full + l_pocket = /obj/item/pda/roboticist + ears = /obj/item/radio/headset/headset_sci + uniform = /obj/item/clothing/under/rank/roboticist + suit = /obj/item/clothing/suit/toggle/labcoat + + backpack = /obj/item/storage/backpack/science + satchel = /obj/item/storage/backpack/satchel/tox + + pda_slot = SLOT_L_STORE diff --git a/code/modules/jobs/job_types/science.dm b/code/modules/jobs/job_types/science.dm deleted file mode 100644 index b58f3faa27..0000000000 --- a/code/modules/jobs/job_types/science.dm +++ /dev/null @@ -1,133 +0,0 @@ -/* -Research Director -*/ -/datum/job/rd - title = "Research Director" - flag = RD_JF - department_head = list("Captain") - department_flag = MEDSCI - head_announce = list(RADIO_CHANNEL_SCIENCE) - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the captain" - selection_color = "#ffddff" - req_admin_notify = 1 - minimal_player_age = 7 - exp_type_department = EXP_TYPE_SCIENCE - exp_requirements = 180 - exp_type = EXP_TYPE_CREW - - outfit = /datum/outfit/job/rd - - access = list(ACCESS_RD, ACCESS_HEADS, ACCESS_TOX, ACCESS_GENETICS, ACCESS_MORGUE, - ACCESS_TOX_STORAGE, ACCESS_TELEPORTER, ACCESS_SEC_DOORS, - ACCESS_RESEARCH, ACCESS_ROBOTICS, ACCESS_XENOBIOLOGY, ACCESS_AI_UPLOAD, - ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM, - ACCESS_TECH_STORAGE, ACCESS_MINISAT, ACCESS_MAINT_TUNNELS, ACCESS_NETWORK) - minimal_access = list(ACCESS_RD, ACCESS_HEADS, ACCESS_TOX, ACCESS_GENETICS, ACCESS_MORGUE, - ACCESS_TOX_STORAGE, ACCESS_TELEPORTER, ACCESS_SEC_DOORS, - ACCESS_RESEARCH, ACCESS_ROBOTICS, ACCESS_XENOBIOLOGY, ACCESS_AI_UPLOAD, - ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MINERAL_STOREROOM, - ACCESS_TECH_STORAGE, ACCESS_MINISAT, ACCESS_MAINT_TUNNELS, ACCESS_NETWORK) - - blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity) - -/datum/outfit/job/rd - name = "Research Director" - jobtype = /datum/job/rd - - id = /obj/item/card/id/silver - belt = /obj/item/pda/heads/rd - ears = /obj/item/radio/headset/heads/rd - uniform = /obj/item/clothing/under/rank/research_director - shoes = /obj/item/clothing/shoes/sneakers/brown - suit = /obj/item/clothing/suit/toggle/labcoat - l_hand = /obj/item/clipboard - l_pocket = /obj/item/laser_pointer - backpack_contents = list(/obj/item/melee/classic_baton/telescopic=1, /obj/item/modular_computer/tablet/preset/advanced=1) - - backpack = /obj/item/storage/backpack/science - satchel = /obj/item/storage/backpack/satchel/tox - - chameleon_extras = /obj/item/stamp/rd - -/datum/outfit/job/rd/rig - name = "Research Director (Hardsuit)" - - l_hand = null - mask = /obj/item/clothing/mask/breath - suit = /obj/item/clothing/suit/space/hardsuit/rd - suit_store = /obj/item/tank/internals/oxygen - internals_slot = SLOT_S_STORE - -/* -Scientist -*/ -/datum/job/scientist - title = "Scientist" - flag = SCIENTIST - department_head = list("Research Director") - department_flag = MEDSCI - faction = "Station" - total_positions = 5 - spawn_positions = 3 - supervisors = "the research director" - selection_color = "#ffeeff" - exp_requirements = 60 - exp_type = EXP_TYPE_CREW - - - outfit = /datum/outfit/job/scientist - - access = list(ACCESS_ROBOTICS, ACCESS_TOX, ACCESS_TOX_STORAGE, ACCESS_RESEARCH, ACCESS_XENOBIOLOGY, ACCESS_MINERAL_STOREROOM, ACCESS_TECH_STORAGE, ACCESS_GENETICS) - minimal_access = list(ACCESS_TOX, ACCESS_TOX_STORAGE, ACCESS_RESEARCH, ACCESS_XENOBIOLOGY, ACCESS_MINERAL_STOREROOM) - -/datum/outfit/job/scientist - name = "Scientist" - jobtype = /datum/job/scientist - - belt = /obj/item/pda/toxins - ears = /obj/item/radio/headset/headset_sci - uniform = /obj/item/clothing/under/rank/scientist - shoes = /obj/item/clothing/shoes/sneakers/white - suit = /obj/item/clothing/suit/toggle/labcoat/science - - backpack = /obj/item/storage/backpack/science - satchel = /obj/item/storage/backpack/satchel/tox - -/* -Roboticist -*/ -/datum/job/roboticist - title = "Roboticist" - flag = ROBOTICIST - department_head = list("Research Director") - department_flag = MEDSCI - faction = "Station" - total_positions = 2 - spawn_positions = 2 - supervisors = "the research director" - selection_color = "#ffeeff" - exp_requirements = 60 - exp_type = EXP_TYPE_CREW - - outfit = /datum/outfit/job/roboticist - - access = list(ACCESS_ROBOTICS, ACCESS_TOX, ACCESS_TOX_STORAGE, ACCESS_TECH_STORAGE, ACCESS_MORGUE, ACCESS_RESEARCH, ACCESS_MINERAL_STOREROOM, ACCESS_XENOBIOLOGY, ACCESS_GENETICS) - minimal_access = list(ACCESS_ROBOTICS, ACCESS_TECH_STORAGE, ACCESS_MORGUE, ACCESS_RESEARCH, ACCESS_MINERAL_STOREROOM) - -/datum/outfit/job/roboticist - name = "Roboticist" - jobtype = /datum/job/roboticist - - belt = /obj/item/storage/belt/utility/full - l_pocket = /obj/item/pda/roboticist - ears = /obj/item/radio/headset/headset_sci - uniform = /obj/item/clothing/under/rank/roboticist - suit = /obj/item/clothing/suit/toggle/labcoat - - backpack = /obj/item/storage/backpack/science - satchel = /obj/item/storage/backpack/satchel/tox - - pda_slot = SLOT_L_STORE diff --git a/code/modules/jobs/job_types/scientist.dm b/code/modules/jobs/job_types/scientist.dm new file mode 100644 index 0000000000..f40a25d6ba --- /dev/null +++ b/code/modules/jobs/job_types/scientist.dm @@ -0,0 +1,33 @@ +/datum/job/scientist + title = "Scientist" + flag = SCIENTIST + department_head = list("Research Director") + department_flag = MEDSCI + faction = "Station" + total_positions = 5 + spawn_positions = 3 + supervisors = "the research director" + selection_color = "#9574cd" + exp_requirements = 60 + exp_type = EXP_TYPE_CREW + + outfit = /datum/outfit/job/scientist + + access = list(ACCESS_ROBOTICS, ACCESS_TOX, ACCESS_TOX_STORAGE, ACCESS_RESEARCH, ACCESS_XENOBIOLOGY, ACCESS_MINERAL_STOREROOM, ACCESS_TECH_STORAGE, ACCESS_GENETICS) + minimal_access = list(ACCESS_TOX, ACCESS_TOX_STORAGE, ACCESS_RESEARCH, ACCESS_XENOBIOLOGY, ACCESS_MINERAL_STOREROOM) + + display_order = JOB_DISPLAY_ORDER_SCIENTIST + +/datum/outfit/job/scientist + name = "Scientist" + jobtype = /datum/job/scientist + + belt = /obj/item/pda/toxins + ears = /obj/item/radio/headset/headset_sci + uniform = /obj/item/clothing/under/rank/scientist + shoes = /obj/item/clothing/shoes/sneakers/white + suit = /obj/item/clothing/suit/toggle/labcoat/science + + backpack = /obj/item/storage/backpack/science + satchel = /obj/item/storage/backpack/satchel/tox + diff --git a/code/modules/jobs/job_types/security.dm b/code/modules/jobs/job_types/security.dm deleted file mode 100644 index 96cedd89ef..0000000000 --- a/code/modules/jobs/job_types/security.dm +++ /dev/null @@ -1,346 +0,0 @@ -//Warden and regular officers add this result to their get_access() -/datum/job/proc/check_config_for_sec_maint() - if(CONFIG_GET(flag/security_has_maint_access)) - return list(ACCESS_MAINT_TUNNELS) - return list() - -/* -Head of Security -*/ -/datum/job/hos - title = "Head of Security" - flag = HOS - department_head = list("Captain") - department_flag = ENGSEC - head_announce = list(RADIO_CHANNEL_SECURITY) - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the captain" - selection_color = "#ffdddd" - req_admin_notify = 1 - minimal_player_age = 14 - exp_requirements = 300 - exp_type = EXP_TYPE_CREW - exp_type_department = EXP_TYPE_SECURITY - - outfit = /datum/outfit/job/hos - - access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_COURT, ACCESS_WEAPONS, - ACCESS_FORENSICS_LOCKERS, ACCESS_MORGUE, ACCESS_MAINT_TUNNELS, ACCESS_ALL_PERSONAL_LOCKERS, - ACCESS_RESEARCH, ACCESS_ENGINE, ACCESS_MINING, ACCESS_MEDICAL, ACCESS_CONSTRUCTION, ACCESS_MAILSORTING, - ACCESS_HEADS, ACCESS_HOS, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MAINT_TUNNELS, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_COURT, ACCESS_WEAPONS, - ACCESS_FORENSICS_LOCKERS, ACCESS_MORGUE, ACCESS_MAINT_TUNNELS, ACCESS_ALL_PERSONAL_LOCKERS, - ACCESS_RESEARCH, ACCESS_ENGINE, ACCESS_MINING, ACCESS_MEDICAL, ACCESS_CONSTRUCTION, ACCESS_MAILSORTING, - ACCESS_HEADS, ACCESS_HOS, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MAINT_TUNNELS, ACCESS_MINERAL_STOREROOM) - - mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM) - - blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/nonviolent, /datum/quirk/paraplegic, /datum/quirk/insanity) - -/datum/outfit/job/hos - name = "Head of Security" - jobtype = /datum/job/hos - - id = /obj/item/card/id/silver - belt = /obj/item/pda/heads/hos - ears = /obj/item/radio/headset/heads/hos/alt - uniform = /obj/item/clothing/under/rank/head_of_security - shoes = /obj/item/clothing/shoes/jackboots - suit = /obj/item/clothing/suit/armor/hos/trenchcoat - gloves = /obj/item/clothing/gloves/color/black/hos - head = /obj/item/clothing/head/HoS/beret - glasses = /obj/item/clothing/glasses/hud/security/sunglasses - suit_store = /obj/item/gun/energy/e_gun - r_pocket = /obj/item/assembly/flash/handheld - l_pocket = /obj/item/restraints/handcuffs - backpack_contents = list(/obj/item/melee/classic_baton/telescopic=1) - - backpack = /obj/item/storage/backpack/security - satchel = /obj/item/storage/backpack/satchel/sec - duffelbag = /obj/item/storage/backpack/duffelbag/sec - box = /obj/item/storage/box/security - - implants = list(/obj/item/implant/mindshield) - - chameleon_extras = list(/obj/item/gun/energy/e_gun/hos, /obj/item/stamp/hos) - -/datum/outfit/job/hos/hardsuit - name = "Head of Security (Hardsuit)" - - mask = /obj/item/clothing/mask/gas/sechailer - suit = /obj/item/clothing/suit/space/hardsuit/security/hos - suit_store = /obj/item/tank/internals/oxygen - backpack_contents = list(/obj/item/melee/baton/loaded=1, /obj/item/gun/energy/e_gun=1) - -/* -Warden -*/ -/datum/job/warden - title = "Warden" - flag = WARDEN - department_head = list("Head of Security") - department_flag = ENGSEC - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the head of security" - selection_color = "#ffeeee" - minimal_player_age = 7 - exp_requirements = 300 - exp_type = EXP_TYPE_CREW - - outfit = /datum/outfit/job/warden - - access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_COURT, ACCESS_MAINT_TUNNELS, ACCESS_MORGUE, ACCESS_WEAPONS, ACCESS_FORENSICS_LOCKERS, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_COURT, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM) //SEE /DATUM/JOB/WARDEN/GET_ACCESS() - - mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM) - blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/nonviolent, /datum/quirk/paraplegic) - -/datum/job/warden/get_access() - var/list/L = list() - L = ..() | check_config_for_sec_maint() - return L - -/datum/outfit/job/warden - name = "Warden" - jobtype = /datum/job/warden - - belt = /obj/item/pda/warden - ears = /obj/item/radio/headset/headset_sec/alt - uniform = /obj/item/clothing/under/rank/warden - shoes = /obj/item/clothing/shoes/jackboots - suit = /obj/item/clothing/suit/armor/vest/warden/alt - gloves = /obj/item/clothing/gloves/color/black - head = /obj/item/clothing/head/warden - glasses = /obj/item/clothing/glasses/hud/security/sunglasses - r_pocket = /obj/item/assembly/flash/handheld - l_pocket = /obj/item/restraints/handcuffs - suit_store = /obj/item/gun/energy/e_gun/advtaser - backpack_contents = list(/obj/item/melee/baton/loaded=1) - - backpack = /obj/item/storage/backpack/security - satchel = /obj/item/storage/backpack/satchel/sec - duffelbag = /obj/item/storage/backpack/duffelbag/sec - box = /obj/item/storage/box/security - - implants = list(/obj/item/implant/mindshield) - - chameleon_extras = /obj/item/gun/ballistic/shotgun/automatic/combat/compact - -/* -Detective -*/ -/datum/job/detective - title = "Detective" - flag = DETECTIVE - department_head = list("Head of Security") - department_flag = ENGSEC - faction = "Station" - total_positions = 1 - spawn_positions = 1 - supervisors = "the head of security" - selection_color = "#ffeeee" - minimal_player_age = 7 - exp_requirements = 300 - exp_type = EXP_TYPE_CREW - - outfit = /datum/outfit/job/detective - - access = list(ACCESS_SEC_DOORS, ACCESS_FORENSICS_LOCKERS, ACCESS_MORGUE, ACCESS_MAINT_TUNNELS, ACCESS_COURT, ACCESS_BRIG, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_SEC_DOORS, ACCESS_FORENSICS_LOCKERS, ACCESS_MORGUE, ACCESS_MAINT_TUNNELS, ACCESS_COURT, ACCESS_BRIG, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM) - - mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM) - blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/nonviolent, /datum/quirk/paraplegic) - -/datum/outfit/job/detective - name = "Detective" - jobtype = /datum/job/detective - - belt = /obj/item/pda/detective - ears = /obj/item/radio/headset/headset_sec/alt - uniform = /obj/item/clothing/under/rank/det - shoes = /obj/item/clothing/shoes/sneakers/brown - suit = /obj/item/clothing/suit/det_suit - gloves = /obj/item/clothing/gloves/color/black - head = /obj/item/clothing/head/fedora/det_hat - l_pocket = /obj/item/toy/crayon/white - r_pocket = /obj/item/lighter - backpack_contents = list(/obj/item/storage/box/evidence=1,\ - /obj/item/detective_scanner=1,\ - /obj/item/melee/classic_baton=1) - mask = /obj/item/clothing/mask/cigarette - - implants = list(/obj/item/implant/mindshield) - - chameleon_extras = list(/obj/item/gun/ballistic/revolver/detective, /obj/item/clothing/glasses/sunglasses) - -/datum/outfit/job/detective/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - ..() - var/obj/item/clothing/mask/cigarette/cig = H.wear_mask - if(istype(cig)) //Some species specfic changes can mess this up (plasmamen) - cig.light("") - - if(visualsOnly) - return - -/* -Security Officer -*/ -/datum/job/officer - title = "Security Officer" - flag = OFFICER - department_head = list("Head of Security") - department_flag = ENGSEC - faction = "Station" - total_positions = 5 //Handled in /datum/controller/occupations/proc/setup_officer_positions() - spawn_positions = 5 //Handled in /datum/controller/occupations/proc/setup_officer_positions() - supervisors = "the head of security, and the head of your assigned department (if applicable)" - selection_color = "#ffeeee" - minimal_player_age = 7 - exp_requirements = 300 - exp_type = EXP_TYPE_CREW - - outfit = /datum/outfit/job/security - - access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_COURT, ACCESS_MAINT_TUNNELS, ACCESS_MORGUE, ACCESS_WEAPONS, ACCESS_FORENSICS_LOCKERS, ACCESS_MINERAL_STOREROOM) - minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_COURT, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM) //BUT SEE /DATUM/JOB/WARDEN/GET_ACCESS() - - mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM) - blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/nonviolent, /datum/quirk/paraplegic) - -/datum/job/officer/get_access() - var/list/L = list() - L |= ..() | check_config_for_sec_maint() - return L - -GLOBAL_LIST_INIT(available_depts, list(SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, SEC_DEPT_SCIENCE, SEC_DEPT_SUPPLY)) - -/datum/job/officer/after_spawn(mob/living/carbon/human/H, mob/M) - // Assign department security - var/department - if(M && M.client && M.client.prefs) - department = M.client.prefs.prefered_security_department - if(!LAZYLEN(GLOB.available_depts) || department == "None") - return - else if(department in GLOB.available_depts) - LAZYREMOVE(GLOB.available_depts, department) - else - department = pick_n_take(GLOB.available_depts) - var/ears = null - var/accessory = null - var/list/dep_access = null - var/destination = null - var/spawn_point = null - switch(department) - if(SEC_DEPT_SUPPLY) - ears = /obj/item/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 GLOB.department_security_spawns - accessory = /obj/item/clothing/accessory/armband/cargo - if(SEC_DEPT_ENGINEERING) - ears = /obj/item/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 GLOB.department_security_spawns - accessory = /obj/item/clothing/accessory/armband/engine - if(SEC_DEPT_MEDICAL) - ears = /obj/item/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 GLOB.department_security_spawns - accessory = /obj/item/clothing/accessory/armband/medblue - if(SEC_DEPT_SCIENCE) - ears = /obj/item/radio/headset/headset_sec/alt/department/sci - dep_access = list(ACCESS_RESEARCH) - destination = /area/security/checkpoint/science - spawn_point = locate(/obj/effect/landmark/start/depsec/science) in GLOB.department_security_spawns - accessory = /obj/item/clothing/accessory/armband/science - - if(accessory) - var/obj/item/clothing/under/U = H.w_uniform - U.attach_accessory(new accessory) - if(ears) - if(H.ears) - qdel(H.ears) - H.equip_to_slot_or_del(new ears(H),SLOT_EARS) - - var/obj/item/card/id/W = H.wear_id - W.access |= dep_access - - var/teleport = 0 - if(!CONFIG_GET(flag/sec_start_brig)) - if(destination || spawn_point) - teleport = 1 - if(teleport) - var/turf/T - if(spawn_point) - T = get_turf(spawn_point) - H.Move(T) - else - var/safety = 0 - while(safety < 25) - T = safepick(get_area_turfs(destination)) - if(T && !H.Move(T)) - safety += 1 - continue - else - break - if(department) - to_chat(M, "You have been assigned to [department]!") - else - to_chat(M, "You have not been assigned to any department. Patrol the halls and help where needed.") - - - -/datum/outfit/job/security - name = "Security Officer" - jobtype = /datum/job/officer - - belt = /obj/item/pda/security - ears = /obj/item/radio/headset/headset_sec/alt - uniform = /obj/item/clothing/under/rank/security - gloves = /obj/item/clothing/gloves/color/black - head = /obj/item/clothing/head/helmet/sec - suit = /obj/item/clothing/suit/armor/vest/alt - shoes = /obj/item/clothing/shoes/jackboots - l_pocket = /obj/item/restraints/handcuffs - r_pocket = /obj/item/assembly/flash/handheld - suit_store = /obj/item/gun/energy/e_gun/advtaser - backpack_contents = list(/obj/item/melee/baton/loaded=1) - - backpack = /obj/item/storage/backpack/security - satchel = /obj/item/storage/backpack/satchel/sec - duffelbag = /obj/item/storage/backpack/duffelbag/sec - box = /obj/item/storage/box/security - - implants = list(/obj/item/implant/mindshield) - - chameleon_extras = list(/obj/item/gun/energy/e_gun/advtaser, /obj/item/clothing/glasses/hud/security/sunglasses, /obj/item/clothing/head/helmet) - //The helmet is necessary because /obj/item/clothing/head/helmet/sec is overwritten in the chameleon list by the standard helmet, which has the same name and icon state - - -/obj/item/radio/headset/headset_sec/alt/department/Initialize() - . = ..() - wires = new/datum/wires/radio(src) - secure_radio_connections = new - recalculateChannels() - -/obj/item/radio/headset/headset_sec/alt/department/engi - keyslot = new /obj/item/encryptionkey/headset_sec - keyslot2 = new /obj/item/encryptionkey/headset_eng - -/obj/item/radio/headset/headset_sec/alt/department/supply - keyslot = new /obj/item/encryptionkey/headset_sec - keyslot2 = new /obj/item/encryptionkey/headset_cargo - -/obj/item/radio/headset/headset_sec/alt/department/med - keyslot = new /obj/item/encryptionkey/headset_sec - keyslot2 = new /obj/item/encryptionkey/headset_med - -/obj/item/radio/headset/headset_sec/alt/department/sci - keyslot = new /obj/item/encryptionkey/headset_sec - keyslot2 = new /obj/item/encryptionkey/headset_sci diff --git a/code/modules/jobs/job_types/security_officer.dm b/code/modules/jobs/job_types/security_officer.dm new file mode 100644 index 0000000000..4f12d6a19c --- /dev/null +++ b/code/modules/jobs/job_types/security_officer.dm @@ -0,0 +1,159 @@ +/datum/job/officer + title = "Security Officer" + flag = OFFICER +// auto_deadmin_role_flags = DEADMIN_POSITION_SECURITY + department_head = list("Head of Security") + department_flag = ENGSEC + faction = "Station" + total_positions = 5 //Handled in /datum/controller/occupations/proc/setup_officer_positions() + spawn_positions = 5 //Handled in /datum/controller/occupations/proc/setup_officer_positions() + supervisors = "the head of security, and the head of your assigned department (if applicable)" + selection_color = "#c02f2f" + minimal_player_age = 7 + exp_requirements = 300 + exp_type = EXP_TYPE_CREW + + outfit = /datum/outfit/job/security + + access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_COURT, ACCESS_MAINT_TUNNELS, ACCESS_MORGUE, ACCESS_WEAPONS, ACCESS_FORENSICS_LOCKERS, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_COURT, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM) // See /datum/job/officer/get_access() + + mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM) + + display_order = JOB_DISPLAY_ORDER_SECURITY_OFFICER + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/nonviolent, /datum/quirk/paraplegic) + +/datum/job/officer/get_access() + var/list/L = list() + L |= ..() | check_config_for_sec_maint() + return L + +GLOBAL_LIST_INIT(available_depts, list(SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, SEC_DEPT_SCIENCE, SEC_DEPT_SUPPLY)) + +/datum/job/officer/after_spawn(mob/living/carbon/human/H, mob/M) + . = ..() + // Assign department security + var/department + if(M && M.client && M.client.prefs) + department = M.client.prefs.prefered_security_department + if(!LAZYLEN(GLOB.available_depts) || department == "None") + return + else if(department in GLOB.available_depts) + LAZYREMOVE(GLOB.available_depts, department) + else + department = pick_n_take(GLOB.available_depts) + var/ears = null + var/accessory = null + var/list/dep_access = null + var/destination = null + var/spawn_point = null + switch(department) + if(SEC_DEPT_SUPPLY) + ears = /obj/item/radio/headset/headset_sec/alt/department/supply + dep_access = list(ACCESS_MAILSORTING, ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_CARGO) + destination = /area/security/checkpoint/supply + spawn_point = locate(/obj/effect/landmark/start/depsec/supply) in GLOB.department_security_spawns + accessory = /obj/item/clothing/accessory/armband/cargo + if(SEC_DEPT_ENGINEERING) + ears = /obj/item/radio/headset/headset_sec/alt/department/engi + dep_access = list(ACCESS_CONSTRUCTION, ACCESS_ENGINE, ACCESS_ATMOSPHERICS) + destination = /area/security/checkpoint/engineering + spawn_point = locate(/obj/effect/landmark/start/depsec/engineering) in GLOB.department_security_spawns + accessory = /obj/item/clothing/accessory/armband/engine + if(SEC_DEPT_MEDICAL) + ears = /obj/item/radio/headset/headset_sec/alt/department/med + dep_access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_SURGERY, ACCESS_CLONING) + destination = /area/security/checkpoint/medical + spawn_point = locate(/obj/effect/landmark/start/depsec/medical) in GLOB.department_security_spawns + accessory = /obj/item/clothing/accessory/armband/medblue + if(SEC_DEPT_SCIENCE) + ears = /obj/item/radio/headset/headset_sec/alt/department/sci + dep_access = list(ACCESS_RESEARCH, ACCESS_TOX) + destination = /area/security/checkpoint/science + spawn_point = locate(/obj/effect/landmark/start/depsec/science) in GLOB.department_security_spawns + accessory = /obj/item/clothing/accessory/armband/science + + if(accessory) + var/obj/item/clothing/under/U = H.w_uniform + U.attach_accessory(new accessory) + if(ears) + if(H.ears) + qdel(H.ears) + H.equip_to_slot_or_del(new ears(H),SLOT_EARS) + + var/obj/item/card/id/W = H.wear_id + W.access |= dep_access + + var/teleport = 0 + if(!CONFIG_GET(flag/sec_start_brig)) + if(destination || spawn_point) + teleport = 1 + if(teleport) + var/turf/T + if(spawn_point) + T = get_turf(spawn_point) + H.Move(T) + else + var/safety = 0 + while(safety < 25) + T = safepick(get_area_turfs(destination)) + if(T && !H.Move(T)) + safety += 1 + continue + else + break + if(department) + to_chat(M, "You have been assigned to [department]!") + else + to_chat(M, "You have not been assigned to any department. Patrol the halls and help where needed.") + + + +/datum/outfit/job/security + name = "Security Officer" + jobtype = /datum/job/officer + + belt = /obj/item/pda/security + ears = /obj/item/radio/headset/headset_sec/alt + uniform = /obj/item/clothing/under/rank/security + gloves = /obj/item/clothing/gloves/color/black + head = /obj/item/clothing/head/helmet/sec + suit = /obj/item/clothing/suit/armor/vest/alt + shoes = /obj/item/clothing/shoes/jackboots + l_pocket = /obj/item/restraints/handcuffs + r_pocket = /obj/item/assembly/flash/handheld + suit_store = /obj/item/gun/energy/e_gun/advtaser + backpack_contents = list(/obj/item/melee/baton/loaded=1) + + backpack = /obj/item/storage/backpack/security + satchel = /obj/item/storage/backpack/satchel/sec + duffelbag = /obj/item/storage/backpack/duffelbag/sec + box = /obj/item/storage/box/security + + implants = list(/obj/item/implant/mindshield) + + chameleon_extras = list(/obj/item/gun/energy/disabler, /obj/item/clothing/glasses/hud/security/sunglasses, /obj/item/clothing/head/helmet) + //The helmet is necessary because /obj/item/clothing/head/helmet/sec is overwritten in the chameleon list by the standard helmet, which has the same name and icon state + + +/obj/item/radio/headset/headset_sec/alt/department/Initialize() + . = ..() + wires = new/datum/wires/radio(src) + secure_radio_connections = new + recalculateChannels() + +/obj/item/radio/headset/headset_sec/alt/department/engi + keyslot = new /obj/item/encryptionkey/headset_sec + keyslot2 = new /obj/item/encryptionkey/headset_eng + +/obj/item/radio/headset/headset_sec/alt/department/supply + keyslot = new /obj/item/encryptionkey/headset_sec + keyslot2 = new /obj/item/encryptionkey/headset_cargo + +/obj/item/radio/headset/headset_sec/alt/department/med + keyslot = new /obj/item/encryptionkey/headset_sec + keyslot2 = new /obj/item/encryptionkey/headset_med + +/obj/item/radio/headset/headset_sec/alt/department/sci + keyslot = new /obj/item/encryptionkey/headset_sec + keyslot2 = new /obj/item/encryptionkey/headset_sci diff --git a/code/modules/jobs/job_types/shaft_miner.dm b/code/modules/jobs/job_types/shaft_miner.dm new file mode 100644 index 0000000000..ef16d8e53f --- /dev/null +++ b/code/modules/jobs/job_types/shaft_miner.dm @@ -0,0 +1,77 @@ +/datum/job/mining + title = "Shaft Miner" + flag = MINER + department_head = list("Quartermaster") + department_flag = CIVILIAN + faction = "Station" + total_positions = 3 + spawn_positions = 3 + supervisors = "the quartermaster" + selection_color = "#ca8f55" + custom_spawn_text = "Remember, you are a miner, not a hunter. Hunting monsters is not a requirement of your job, the only requirement of your job is to provide materials for the station. Don't be afraid to run away if you're inexperienced with fighting the mining area's locals." + + + outfit = /datum/outfit/job/miner + + access = list(ACCESS_MAINT_TUNNELS, ACCESS_MAILSORTING, ACCESS_CARGO, ACCESS_QM, ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MAILSORTING, ACCESS_MINERAL_STOREROOM) + + display_order = JOB_DISPLAY_ORDER_SHAFT_MINER + +/datum/outfit/job/miner + name = "Shaft Miner (Lavaland)" + jobtype = /datum/job/mining + + belt = /obj/item/pda/shaftminer + ears = /obj/item/radio/headset/headset_cargo/mining + shoes = /obj/item/clothing/shoes/workboots/mining + gloves = /obj/item/clothing/gloves/color/black + uniform = /obj/item/clothing/under/rank/miner/lavaland + l_pocket = /obj/item/reagent_containers/hypospray/medipen/survival + r_pocket = /obj/item/storage/bag/ore //causes issues if spawned in backpack + backpack_contents = list( + /obj/item/flashlight/seclite=1,\ + /obj/item/kitchen/knife/combat/survival=1,\ + /obj/item/mining_voucher=1,\ + /obj/item/suit_voucher=1,\ + /obj/item/stack/marker_beacon/ten=1) + + backpack = /obj/item/storage/backpack/explorer + satchel = /obj/item/storage/backpack/satchel/explorer + duffelbag = /obj/item/storage/backpack/duffelbag + box = /obj/item/storage/box/survival_mining + + chameleon_extras = /obj/item/gun/energy/kinetic_accelerator + +/datum/outfit/job/miner/asteroid + name = "Shaft Miner (Asteroid)" + uniform = /obj/item/clothing/under/rank/miner + shoes = /obj/item/clothing/shoes/workboots + +/datum/outfit/job/miner/equipped + name = "Shaft Miner (Lavaland + Equipment)" + suit = /obj/item/clothing/suit/hooded/explorer/standard + mask = /obj/item/clothing/mask/gas/explorer + glasses = /obj/item/clothing/glasses/meson + suit_store = /obj/item/tank/internals/oxygen + internals_slot = SLOT_S_STORE + backpack_contents = list( + /obj/item/flashlight/seclite=1,\ + /obj/item/kitchen/knife/combat/survival=1, + /obj/item/mining_voucher=1, + /obj/item/t_scanner/adv_mining_scanner/lesser=1, + /obj/item/gun/energy/kinetic_accelerator=1,\ + /obj/item/stack/marker_beacon/ten=1) + +/datum/outfit/job/miner/equipped/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) + ..() + if(visualsOnly) + return + if(istype(H.wear_suit, /obj/item/clothing/suit/hooded)) + var/obj/item/clothing/suit/hooded/S = H.wear_suit + S.ToggleHood() + +/datum/outfit/job/miner/equipped/hardsuit + name = "Shaft Miner (Equipment + Hardsuit)" + suit = /obj/item/clothing/suit/space/hardsuit/mining + mask = /obj/item/clothing/mask/breath diff --git a/code/modules/jobs/job_types/station_engineer.dm b/code/modules/jobs/job_types/station_engineer.dm new file mode 100644 index 0000000000..55381549ba --- /dev/null +++ b/code/modules/jobs/job_types/station_engineer.dm @@ -0,0 +1,54 @@ +/datum/job/engineer + title = "Station Engineer" + flag = ENGINEER + department_head = list("Chief Engineer") + department_flag = ENGSEC + faction = "Station" + total_positions = 5 + spawn_positions = 5 + supervisors = "the chief engineer" + selection_color = "#ff9b3d" + exp_requirements = 60 + exp_type = EXP_TYPE_CREW + + outfit = /datum/outfit/job/engineer + + access = list(ACCESS_ENGINE, ACCESS_ENGINE_EQUIP, ACCESS_TECH_STORAGE, ACCESS_MAINT_TUNNELS, + ACCESS_EXTERNAL_AIRLOCKS, ACCESS_CONSTRUCTION, ACCESS_ATMOSPHERICS, ACCESS_TCOMSAT, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_ENGINE, ACCESS_ENGINE_EQUIP, ACCESS_TECH_STORAGE, ACCESS_MAINT_TUNNELS, + ACCESS_EXTERNAL_AIRLOCKS, ACCESS_CONSTRUCTION, ACCESS_TCOMSAT, ACCESS_MINERAL_STOREROOM) + + display_order = JOB_DISPLAY_ORDER_STATION_ENGINEER + +/datum/outfit/job/engineer + name = "Station Engineer" + jobtype = /datum/job/engineer + + belt = /obj/item/storage/belt/utility/full/engi + l_pocket = /obj/item/pda/engineering + ears = /obj/item/radio/headset/headset_eng + uniform = /obj/item/clothing/under/rank/engineer + shoes = /obj/item/clothing/shoes/workboots + head = /obj/item/clothing/head/hardhat + r_pocket = /obj/item/t_scanner + + backpack = /obj/item/storage/backpack/industrial + satchel = /obj/item/storage/backpack/satchel/eng + duffelbag = /obj/item/storage/backpack/duffelbag/engineering + box = /obj/item/storage/box/engineer + pda_slot = SLOT_L_STORE + backpack_contents = list(/obj/item/modular_computer/tablet/preset/advanced=1) + +/datum/outfit/job/engineer/gloved + name = "Station Engineer (Gloves)" + gloves = /obj/item/clothing/gloves/color/yellow + +/datum/outfit/job/engineer/gloved/rig + name = "Station Engineer (Hardsuit)" + mask = /obj/item/clothing/mask/breath + suit = /obj/item/clothing/suit/space/hardsuit/engine + suit_store = /obj/item/tank/internals/oxygen + head = null + internals_slot = SLOT_S_STORE + + diff --git a/code/modules/jobs/job_types/virologist.dm b/code/modules/jobs/job_types/virologist.dm new file mode 100644 index 0000000000..dcc13af627 --- /dev/null +++ b/code/modules/jobs/job_types/virologist.dm @@ -0,0 +1,35 @@ +/datum/job/virologist + title = "Virologist" + flag = VIROLOGIST + department_head = list("Chief Medical Officer") + department_flag = MEDSCI + faction = "Station" + total_positions = 1 + spawn_positions = 1 + supervisors = "the chief medical officer" + selection_color = "#74b5e0" + exp_type = EXP_TYPE_CREW + exp_requirements = 60 + + outfit = /datum/outfit/job/virologist + + access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_SURGERY, ACCESS_CHEMISTRY, ACCESS_VIROLOGY, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_MEDICAL, ACCESS_VIROLOGY, ACCESS_MINERAL_STOREROOM) + + display_order = JOB_DISPLAY_ORDER_VIROLOGIST + +/datum/outfit/job/virologist + name = "Virologist" + jobtype = /datum/job/virologist + + belt = /obj/item/pda/viro + ears = /obj/item/radio/headset/headset_med + uniform = /obj/item/clothing/under/rank/virologist + mask = /obj/item/clothing/mask/surgical + shoes = /obj/item/clothing/shoes/sneakers/white + suit = /obj/item/clothing/suit/toggle/labcoat/virologist + suit_store = /obj/item/flashlight/pen + + backpack = /obj/item/storage/backpack/virology + satchel = /obj/item/storage/backpack/satchel/vir + duffelbag = /obj/item/storage/backpack/duffelbag/med diff --git a/code/modules/jobs/job_types/warden.dm b/code/modules/jobs/job_types/warden.dm new file mode 100644 index 0000000000..a5c16ab5cf --- /dev/null +++ b/code/modules/jobs/job_types/warden.dm @@ -0,0 +1,56 @@ +/datum/job/warden + title = "Warden" + flag = WARDEN +// auto_deadmin_role_flags = DEADMIN_POSITION_SECURITY + department_head = list("Head of Security") + department_flag = ENGSEC + faction = "Station" + total_positions = 1 + spawn_positions = 1 + supervisors = "the head of security" + selection_color = "#c02f2f" + minimal_player_age = 7 + exp_requirements = 300 + exp_type = EXP_TYPE_CREW + + outfit = /datum/outfit/job/warden + + access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_COURT, ACCESS_MAINT_TUNNELS, ACCESS_MORGUE, ACCESS_WEAPONS, ACCESS_FORENSICS_LOCKERS, ACCESS_MINERAL_STOREROOM) + minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_COURT, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM) // See /datum/job/warden/get_access() + + mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM) + + display_order = JOB_DISPLAY_ORDER_WARDEN + blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/nonviolent, /datum/quirk/paraplegic) + +/datum/job/warden/get_access() + var/list/L = list() + L = ..() | check_config_for_sec_maint() + return L + +/datum/outfit/job/warden + name = "Warden" + jobtype = /datum/job/warden + + belt = /obj/item/pda/warden + ears = /obj/item/radio/headset/headset_sec/alt + uniform = /obj/item/clothing/under/rank/warden + shoes = /obj/item/clothing/shoes/jackboots + suit = /obj/item/clothing/suit/armor/vest/warden/alt + gloves = /obj/item/clothing/gloves/color/black + head = /obj/item/clothing/head/warden + glasses = /obj/item/clothing/glasses/hud/security/sunglasses + r_pocket = /obj/item/assembly/flash/handheld + l_pocket = /obj/item/restraints/handcuffs + suit_store = /obj/item/gun/energy/e_gun/advtaser + backpack_contents = list(/obj/item/melee/baton/loaded=1) + + backpack = /obj/item/storage/backpack/security + satchel = /obj/item/storage/backpack/satchel/sec + duffelbag = /obj/item/storage/backpack/duffelbag/sec + box = /obj/item/storage/box/security + + implants = list(/obj/item/implant/mindshield) + + chameleon_extras = /obj/item/gun/ballistic/shotgun/automatic/combat/compact + diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 750805ae93..1cd32d43ac 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -1,604 +1,623 @@ -#define LINKIFY_READY(string, value) "[string]" - -/mob/dead/new_player - var/ready = 0 - var/spawning = 0//Referenced when you want to delete the new_player later on in the code. - - flags_1 = NONE - - invisibility = INVISIBILITY_ABSTRACT - - density = FALSE - stat = DEAD - canmove = FALSE - - anchored = TRUE // don't get pushed around - var/mob/living/new_character //for instant transfer once the round is set up - -/mob/dead/new_player/Initialize() - if(client && SSticker.state == GAME_STATE_STARTUP) - var/obj/screen/splash/S = new(client, TRUE, TRUE) - S.Fade(TRUE) - - if(length(GLOB.newplayer_start)) - forceMove(pick(GLOB.newplayer_start)) - else - forceMove(locate(1,1,1)) - - ComponentInitialize() - - . = ..() - -/mob/dead/new_player/prepare_huds() - return - -/mob/dead/new_player/proc/new_player_panel() - var/output = "

Welcome, [client ? client.prefs.real_name : "Unknown User"]

" - output += "

Setup Character

" - - if(SSticker.current_state <= GAME_STATE_PREGAME) - switch(ready) - if(PLAYER_NOT_READY) - output += "

\[ [LINKIFY_READY("Ready", PLAYER_READY_TO_PLAY)] | Not Ready | [LINKIFY_READY("Observe", PLAYER_READY_TO_OBSERVE)] \]

" - if(PLAYER_READY_TO_PLAY) - output += "

\[ Ready | [LINKIFY_READY("Not Ready", PLAYER_NOT_READY)] | [LINKIFY_READY("Observe", PLAYER_READY_TO_OBSERVE)] \]

" - if(PLAYER_READY_TO_OBSERVE) - output += "

\[ [LINKIFY_READY("Ready", PLAYER_READY_TO_PLAY)] | [LINKIFY_READY("Not Ready", PLAYER_NOT_READY)] | Observe \]

" - else - output += "

View the Crew Manifest

" - output += "

Join Game!

" - output += "

[LINKIFY_READY("Observe", PLAYER_READY_TO_OBSERVE)]

" - - if(!IsGuestKey(src.key)) - if (SSdbcore.Connect()) - var/isadmin = 0 - if(src.client && src.client.holder) - isadmin = 1 - var/datum/DBQuery/query_get_new_polls = SSdbcore.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM [format_table_name("poll_vote")] WHERE ckey = \"[sanitizeSQL(ckey)]\") AND id NOT IN (SELECT pollid FROM [format_table_name("poll_textreply")] WHERE ckey = \"[sanitizeSQL(ckey)]\")") - var/rs = REF(src) - if(query_get_new_polls.Execute()) - var/newpoll = 0 - if(query_get_new_polls.NextRow()) - newpoll = 1 - - if(newpoll) - output += "

Show Player Polls (NEW!)

" - else - output += "

Show Player Polls

" - qdel(query_get_new_polls) - if(QDELETED(src)) - return - - output += "
" - - //src << browse(output,"window=playersetup;size=210x240;can_close=0") - var/datum/browser/popup = new(src, "playersetup", "
New Player Options
", 250, 265) - popup.set_window_options("can_close=0") - popup.set_content(output) - popup.open(0) - -/mob/dead/new_player/Topic(href, href_list[]) - if(src != usr) - return 0 - - if(!client) - return 0 - - //Determines Relevent Population Cap - var/relevant_cap - var/hpc = CONFIG_GET(number/hard_popcap) - var/epc = CONFIG_GET(number/extreme_popcap) - if(hpc && epc) - relevant_cap = min(hpc, epc) - else - relevant_cap = max(hpc, epc) - - if(href_list["show_preferences"]) - client.prefs.ShowChoices(src) - return 1 - - if(href_list["ready"]) - var/tready = text2num(href_list["ready"]) - //Avoid updating ready if we're after PREGAME (they should use latejoin instead) - //This is likely not an actual issue but I don't have time to prove that this - //no longer is required - if(SSticker.current_state <= GAME_STATE_PREGAME) - ready = tready - //if it's post initialisation and they're trying to observe we do the needful - if(!SSticker.current_state < GAME_STATE_PREGAME && tready == PLAYER_READY_TO_OBSERVE) - ready = tready - make_me_an_observer() - return - - if(href_list["refresh"]) - src << browse(null, "window=playersetup") //closes the player setup window - new_player_panel() - - if(href_list["late_join"]) - if(!SSticker || !SSticker.IsRoundInProgress()) - to_chat(usr, "The round is either not ready, or has already finished...") - return - - if(href_list["late_join"] == "override") - LateChoices() - return - - if(SSticker.queued_players.len || (relevant_cap && living_player_count() >= relevant_cap && !(ckey(key) in GLOB.admin_datums))) - to_chat(usr, "[CONFIG_GET(string/hard_popcap_message)]") - - var/queue_position = SSticker.queued_players.Find(usr) - if(queue_position == 1) - to_chat(usr, "You are next in line to join the game. You will be notified when a slot opens up.") - else if(queue_position) - to_chat(usr, "There are [queue_position-1] players in front of you in the queue to join the game.") - else - SSticker.queued_players += usr - to_chat(usr, "You have been added to the queue to join the game. Your position in queue is [SSticker.queued_players.len].") - return - LateChoices() - - if(href_list["manifest"]) - ViewManifest() - - if(href_list["SelectedJob"]) - - if(!GLOB.enter_allowed) - to_chat(usr, "There is an administrative lock on entering the game!") - return - - if(SSticker.queued_players.len && !(ckey(key) in GLOB.admin_datums)) - if((living_player_count() >= relevant_cap) || (src != SSticker.queued_players[1])) - to_chat(usr, "Server is full.") - return - - AttemptLateSpawn(href_list["SelectedJob"]) - return - - if(href_list["JoinAsGhostRole"]) - if(!GLOB.enter_allowed) - to_chat(usr, " There is an administrative lock on entering the game!") - - if(SSticker.queued_players.len && !(ckey(key) in GLOB.admin_datums)) - if((living_player_count() >= relevant_cap) || (src != SSticker.queued_players[1])) - to_chat(usr, "Server is full.") - return - - var/obj/effect/mob_spawn/MS = pick(GLOB.mob_spawners[href_list["JoinAsGhostRole"]]) - if(MS.attack_ghost(src, latejoinercalling = TRUE)) - SSticker.queued_players -= src - SSticker.queue_delay = 4 - qdel(src) - - if(!ready && href_list["preference"]) - if(client) - client.prefs.process_link(src, href_list) - else if(!href_list["late_join"]) - new_player_panel() - - if(href_list["showpoll"]) - handle_player_polling() - return - - if(href_list["pollid"]) - var/pollid = href_list["pollid"] - if(istext(pollid)) - pollid = text2num(pollid) - if(isnum(pollid) && ISINTEGER(pollid)) - src.poll_player(pollid) - return - - if(href_list["votepollid"] && href_list["votetype"]) - var/pollid = text2num(href_list["votepollid"]) - var/votetype = href_list["votetype"] - //lets take data from the user to decide what kind of poll this is, without validating it - //what could go wrong - switch(votetype) - if(POLLTYPE_OPTION) - var/optionid = text2num(href_list["voteoptionid"]) - if(vote_on_poll(pollid, optionid)) - to_chat(usr, "Vote successful.") - else - to_chat(usr, "Vote failed, please try again or contact an administrator.") - if(POLLTYPE_TEXT) - var/replytext = href_list["replytext"] - if(log_text_poll_reply(pollid, replytext)) - to_chat(usr, "Feedback logging successful.") - else - to_chat(usr, "Feedback logging failed, please try again or contact an administrator.") - if(POLLTYPE_RATING) - var/id_min = text2num(href_list["minid"]) - var/id_max = text2num(href_list["maxid"]) - - if( (id_max - id_min) > 100 ) //Basic exploit prevention - //(protip, this stops no exploits) - to_chat(usr, "The option ID difference is too big. Please contact administration or the database admin.") - return - - for(var/optionid = id_min; optionid <= id_max; optionid++) - if(!isnull(href_list["o[optionid]"])) //Test if this optionid was replied to - var/rating - if(href_list["o[optionid]"] == "abstain") - rating = null - else - rating = text2num(href_list["o[optionid]"]) - if(!isnum(rating) || !ISINTEGER(rating)) - return - - if(!vote_on_numval_poll(pollid, optionid, rating)) - to_chat(usr, "Vote failed, please try again or contact an administrator.") - return - to_chat(usr, "Vote successful.") - if(POLLTYPE_MULTI) - var/id_min = text2num(href_list["minoptionid"]) - var/id_max = text2num(href_list["maxoptionid"]) - - if( (id_max - id_min) > 100 ) //Basic exploit prevention - to_chat(usr, "The option ID difference is too big. Please contact administration or the database admin.") - return - - for(var/optionid = id_min; optionid <= id_max; optionid++) - if(!isnull(href_list["option_[optionid]"])) //Test if this optionid was selected - var/i = vote_on_multi_poll(pollid, optionid) - switch(i) - if(0) - continue - if(1) - to_chat(usr, "Vote failed, please try again or contact an administrator.") - return - if(2) - to_chat(usr, "Maximum replies reached.") - break - to_chat(usr, "Vote successful.") - if(POLLTYPE_IRV) - if (!href_list["IRVdata"]) - to_chat(src, "No ordering data found. Please try again or contact an administrator.") - return - var/list/votelist = splittext(href_list["IRVdata"], ",") - if (!vote_on_irv_poll(pollid, votelist)) - to_chat(src, "Vote failed, please try again or contact an administrator.") - return - to_chat(src, "Vote successful.") - -//When you cop out of the round (NB: this HAS A SLEEP FOR PLAYER INPUT IN IT) -/mob/dead/new_player/proc/make_me_an_observer() - if(QDELETED(src) || !src.client) - ready = PLAYER_NOT_READY - return FALSE - - var/this_is_like_playing_right = alert(src,"Are you sure you wish to observe? You will not be able to play this round!","Player Setup","Yes","No") - - if(QDELETED(src) || !src.client || this_is_like_playing_right != "Yes") - ready = PLAYER_NOT_READY - src << browse(null, "window=playersetup") //closes the player setup window - new_player_panel() - return FALSE - - var/mob/dead/observer/observer = new() - spawning = TRUE - - observer.started_as_observer = TRUE - close_spawn_windows() - var/obj/effect/landmark/observer_start/O = locate(/obj/effect/landmark/observer_start) in GLOB.landmarks_list - to_chat(src, "Now teleporting.") - if (O) - observer.forceMove(O.loc) - else - to_chat(src, "Teleporting failed. Ahelp an admin please") - stack_trace("There's no freaking observer landmark available on this map or you're making observers before the map is initialised") - observer.key = key - observer.client = client - observer.set_ghost_appearance() - if(observer.client && observer.client.prefs) - observer.real_name = observer.client.prefs.real_name - observer.name = observer.real_name - observer.update_icon() - observer.stop_sound_channel(CHANNEL_LOBBYMUSIC) - QDEL_NULL(mind) - qdel(src) - return TRUE - -/proc/get_job_unavailable_error_message(retval, jobtitle) - switch(retval) - if(JOB_AVAILABLE) - return "[jobtitle] is available." - if(JOB_UNAVAILABLE_GENERIC) - return "[jobtitle] is unavailable." - if(JOB_UNAVAILABLE_BANNED) - return "You are currently banned from [jobtitle]." - if(JOB_UNAVAILABLE_PLAYTIME) - return "You do not have enough relevant playtime for [jobtitle]." - if(JOB_UNAVAILABLE_ACCOUNTAGE) - return "Your account is not old enough for [jobtitle]." - if(JOB_UNAVAILABLE_SLOTFULL) - return "[jobtitle] is already filled to capacity." - return "Error: Unknown job availability." - -/mob/dead/new_player/proc/IsJobUnavailable(rank, latejoin = FALSE) - var/datum/job/job = SSjob.GetJob(rank) - if(!job) - return JOB_UNAVAILABLE_GENERIC - if((job.current_positions >= job.total_positions) && job.total_positions != -1) - if(job.title == "Assistant") - if(isnum(client.player_age) && client.player_age <= 14) //Newbies can always be assistants - return JOB_AVAILABLE - for(var/datum/job/J in SSjob.occupations) - if(J && J.current_positions < J.total_positions && J.title != job.title) - return JOB_UNAVAILABLE_SLOTFULL - else - return JOB_UNAVAILABLE_SLOTFULL - if(jobban_isbanned(src,rank)) - return JOB_UNAVAILABLE_BANNED - if(QDELETED(src)) - return JOB_UNAVAILABLE_GENERIC - if(!job.player_old_enough(client)) - return JOB_UNAVAILABLE_ACCOUNTAGE - if(job.required_playtime_remaining(client)) - return JOB_UNAVAILABLE_PLAYTIME - if(latejoin && !job.special_check_latejoin(client)) - return JOB_UNAVAILABLE_GENERIC - return JOB_AVAILABLE - -/mob/dead/new_player/proc/AttemptLateSpawn(rank) - var/error = IsJobUnavailable(rank) - if(error != JOB_AVAILABLE) - alert(src, get_job_unavailable_error_message(error, rank)) - return FALSE - - if(SSticker.late_join_disabled) - alert(src, "An administrator has disabled late join spawning.") - return FALSE - - var/arrivals_docked = TRUE - if(SSshuttle.arrivals) - close_spawn_windows() //In case we get held up - if(SSshuttle.arrivals.damaged && CONFIG_GET(flag/arrivals_shuttle_require_safe_latejoin)) - src << alert("The arrivals shuttle is currently malfunctioning! You cannot join.") - return FALSE - - if(CONFIG_GET(flag/arrivals_shuttle_require_undocked)) - SSshuttle.arrivals.RequireUndocked(src) - arrivals_docked = SSshuttle.arrivals.mode != SHUTTLE_CALL - - //Remove the player from the join queue if he was in one and reset the timer - SSticker.queued_players -= src - SSticker.queue_delay = 4 - - SSjob.AssignRole(src, rank, 1) - - var/mob/living/character = create_character(TRUE) //creates the human and transfers vars and mind - var/equip = SSjob.EquipRank(character, rank, TRUE) - if(isliving(equip)) //Borgs get borged in the equip, so we need to make sure we handle the new mob. - character = equip - - var/datum/job/job = SSjob.GetJob(rank) - - if(job && !job.override_latejoin_spawn(character)) - SSjob.SendToLateJoin(character) - if(!arrivals_docked) - var/obj/screen/splash/Spl = new(character.client, TRUE) - Spl.Fade(TRUE) - character.playsound_local(get_turf(character), 'sound/voice/ApproachingTG.ogg', 25) - - character.update_parallax_teleport() - - SSticker.minds += character.mind - - var/mob/living/carbon/human/humanc - if(ishuman(character)) - humanc = character //Let's retypecast the var to be human, - - if(humanc) //These procs all expect humans - GLOB.data_core.manifest_inject(humanc) - if(SSshuttle.arrivals) - SSshuttle.arrivals.QueueAnnounce(humanc, rank) - else - AnnounceArrival(humanc, rank) - AddEmploymentContract(humanc) - if(GLOB.highlander) - to_chat(humanc, "THERE CAN BE ONLY ONE!!!") - humanc.make_scottish() - - if(GLOB.summon_guns_triggered) - give_guns(humanc) - if(GLOB.summon_magic_triggered) - give_magic(humanc) - - GLOB.joined_player_list += character.ckey - GLOB.latejoiners += character - - if(CONFIG_GET(flag/allow_latejoin_antagonists) && humanc) //Borgs aren't allowed to be antags. Will need to be tweaked if we get true latejoin ais. - if(SSshuttle.emergency) - switch(SSshuttle.emergency.mode) - if(SHUTTLE_RECALL, SHUTTLE_IDLE) - SSticker.mode.make_antag_chance(humanc) - if(SHUTTLE_CALL) - if(SSshuttle.emergency.timeLeft(1) > initial(SSshuttle.emergencyCallTime)*0.5) - SSticker.mode.make_antag_chance(humanc) - - if(humanc && CONFIG_GET(flag/roundstart_traits)) - SSquirks.AssignQuirks(humanc, humanc.client, TRUE, FALSE, job, FALSE) - - log_manifest(character.mind.key,character.mind,character,latejoin = TRUE) - -/mob/dead/new_player/proc/AddEmploymentContract(mob/living/carbon/human/employee) - //TODO: figure out a way to exclude wizards/nukeops/demons from this. - for(var/C in GLOB.employmentCabinets) - var/obj/structure/filingcabinet/employment/employmentCabinet = C - if(!employmentCabinet.virgin) - employmentCabinet.addFile(employee) - - -/mob/dead/new_player/proc/LateChoices() - - var/level = "green" - switch(GLOB.security_level) - if(SEC_LEVEL_BLUE) - level = "blue" - if(SEC_LEVEL_AMBER) - level = "amber" - if(SEC_LEVEL_RED) - level = "red" - if(SEC_LEVEL_DELTA) - level = "delta" - - var/dat = "
Round Duration: [DisplayTimeText(world.time - SSticker.round_start_time)]
Alert Level: [capitalize(level)]
" - - if(SSshuttle.emergency) - switch(SSshuttle.emergency.mode) - if(SHUTTLE_ESCAPE) - dat += "
The station has been evacuated.

" - if(SHUTTLE_CALL) - if(!SSshuttle.canRecall()) - dat += "
The station is currently undergoing evacuation procedures.

" - - var/available_job_count = 0 - for(var/datum/job/job in SSjob.occupations) - if(job && IsJobUnavailable(job.title, TRUE) == JOB_AVAILABLE) - available_job_count++ - for(var/spawner in GLOB.mob_spawners) - if(!LAZYLEN(spawner)) - continue - var/obj/effect/mob_spawn/S = pick(GLOB.mob_spawners[spawner]) - if(!istype(S) || !S.can_latejoin()) - continue - available_job_count++ - break - - if(!available_job_count) - dat += "
There are currently no open positions!
" - - else - dat += "
Choose from the following open positions:

" - var/list/categorizedJobs = list( - "Command" = list(jobs = list(), titles = GLOB.command_positions, color = "#aac1ee"), - "Engineering" = list(jobs = list(), titles = GLOB.engineering_positions, color = "#ffd699"), - "Supply" = list(jobs = list(), titles = GLOB.supply_positions, color = "#ead4ae"), - "Miscellaneous" = list(jobs = list(), titles = list(), color = "#ffffff", colBreak = TRUE), - "Ghost Role" = list(jobs = list(), titles = GLOB.mob_spawners, color = "#ffffff"), - "Synthetic" = list(jobs = list(), titles = GLOB.nonhuman_positions, color = "#ccffcc"), - "Service" = list(jobs = list(), titles = GLOB.civilian_positions, color = "#cccccc"), - "Medical" = list(jobs = list(), titles = GLOB.medical_positions, color = "#99ffe6", colBreak = TRUE), - "Science" = list(jobs = list(), titles = GLOB.science_positions, color = "#e6b3e6"), - "Security" = list(jobs = list(), titles = GLOB.security_positions, color = "#ff9999"), - ) - for(var/spawner in GLOB.mob_spawners) - if(!LAZYLEN(spawner)) - continue - var/obj/effect/mob_spawn/S = pick(GLOB.mob_spawners[spawner]) - if(!istype(S) || !S.can_latejoin()) - continue - categorizedJobs["Ghost Role"]["jobs"] += spawner - - for(var/datum/job/job in SSjob.occupations) - if(job && IsJobUnavailable(job.title, TRUE) == JOB_AVAILABLE) - var/categorized = FALSE - for(var/jobcat in categorizedJobs) - var/list/jobs = categorizedJobs[jobcat]["jobs"] - if(job.title in categorizedJobs[jobcat]["titles"]) - categorized = TRUE - if(jobcat == "Command") - - if(job.title == "Captain") // Put captain at top of command jobs - jobs.Insert(1, job) - else - jobs += job - else // Put heads at top of non-command jobs - if(job.title in GLOB.command_positions) - jobs.Insert(1, job) - else - jobs += job - if(!categorized) - categorizedJobs["Miscellaneous"]["jobs"] += job - - - dat += "
" - for(var/jobcat in categorizedJobs) - if(categorizedJobs[jobcat]["colBreak"]) - dat += "" - if(!length(categorizedJobs[jobcat]["jobs"])) - continue - var/color = categorizedJobs[jobcat]["color"] - dat += "
" - dat += "[jobcat]" - for(var/datum/job/job in categorizedJobs[jobcat]["jobs"]) - var/position_class = "otherPosition" - if(job.title in GLOB.command_positions) - position_class = "commandPosition" - if(job in SSjob.prioritized_jobs) - dat += "[job.title] ([job.current_positions])" - else - dat += "[job.title] ([job.current_positions])" - categorizedJobs[jobcat]["jobs"] -= job - - for(var/spawner in categorizedJobs[jobcat]["jobs"]) - dat += "[spawner]" - - dat += "

" - dat += "
" - dat += "" - - // Removing the old window method but leaving it here for reference - //src << browse(dat, "window=latechoices;size=300x640;can_close=1") - - // Added the new browser window method - var/datum/browser/popup = new(src, "latechoices", "Choose Profession", 680, 580) - popup.add_stylesheet("playeroptions", 'html/browser/playeroptions.css') - popup.set_content(dat) - popup.open(FALSE) // FALSE is passed to open so that it doesn't use the onclose() proc - - -/mob/dead/new_player/proc/create_character(transfer_after) - spawning = 1 - close_spawn_windows() - - var/mob/living/carbon/human/H = new(loc) - - var/frn = CONFIG_GET(flag/force_random_names) - if(!frn) - frn = jobban_isbanned(src, "appearance") - if(QDELETED(src)) - return - if(frn) - client.prefs.random_character() - client.prefs.real_name = client.prefs.pref_species.random_name(gender,1) - client.prefs.copy_to(H) - H.dna.update_dna_identity() - if(mind) - if(transfer_after) - mind.late_joiner = TRUE - mind.active = 0 //we wish to transfer the key manually - mind.transfer_to(H) //won't transfer key since the mind is not active - - H.name = real_name - - . = H - new_character = . - if(transfer_after) - transfer_character() - -/mob/dead/new_player/proc/transfer_character() - . = new_character - if(.) - new_character.key = key //Manually transfer the key to log them in - new_character.stop_sound_channel(CHANNEL_LOBBYMUSIC) - new_character = null - qdel(src) - -/mob/dead/new_player/proc/ViewManifest() - var/dat = "" - dat += "

Crew Manifest

" - dat += GLOB.data_core.get_manifest(OOC = 1) - - src << browse(dat, "window=manifest;size=387x420;can_close=1") - -/mob/dead/new_player/Move() - return 0 - - -/mob/dead/new_player/proc/close_spawn_windows() - - src << browse(null, "window=latechoices") //closes late choices window - src << browse(null, "window=playersetup") //closes the player setup window - src << browse(null, "window=preferences") //closes job selection - src << browse(null, "window=mob_occupation") - src << browse(null, "window=latechoices") //closes late job selection +#define LINKIFY_READY(string, value) "[string]" + +/mob/dead/new_player + var/ready = 0 + var/spawning = 0//Referenced when you want to delete the new_player later on in the code. + + flags_1 = NONE + + invisibility = INVISIBILITY_ABSTRACT + + density = FALSE + stat = DEAD + canmove = FALSE + + anchored = TRUE // don't get pushed around + + var/mob/living/new_character //for instant transfer once the round is set up + + //Used to make sure someone doesn't get spammed with messages if they're ineligible for roles + var/ineligible_for_roles = FALSE + +/mob/dead/new_player/Initialize() + if(client && SSticker.state == GAME_STATE_STARTUP) + var/obj/screen/splash/S = new(client, TRUE, TRUE) + S.Fade(TRUE) + + if(length(GLOB.newplayer_start)) + forceMove(pick(GLOB.newplayer_start)) + else + forceMove(locate(1,1,1)) + + ComponentInitialize() + + . = ..() + +/mob/dead/new_player/prepare_huds() + return + +/mob/dead/new_player/proc/new_player_panel() + var/output = "

Welcome, [client ? client.prefs.real_name : "Unknown User"]

" + output += "

Setup Character

" + + if(SSticker.current_state <= GAME_STATE_PREGAME) + switch(ready) + if(PLAYER_NOT_READY) + output += "

\[ [LINKIFY_READY("Ready", PLAYER_READY_TO_PLAY)] | Not Ready | [LINKIFY_READY("Observe", PLAYER_READY_TO_OBSERVE)] \]

" + if(PLAYER_READY_TO_PLAY) + output += "

\[ Ready | [LINKIFY_READY("Not Ready", PLAYER_NOT_READY)] | [LINKIFY_READY("Observe", PLAYER_READY_TO_OBSERVE)] \]

" + if(PLAYER_READY_TO_OBSERVE) + output += "

\[ [LINKIFY_READY("Ready", PLAYER_READY_TO_PLAY)] | [LINKIFY_READY("Not Ready", PLAYER_NOT_READY)] | Observe \]

" + else + output += "

View the Crew Manifest

" + output += "

Join Game!

" + output += "

[LINKIFY_READY("Observe", PLAYER_READY_TO_OBSERVE)]

" + + if(!IsGuestKey(src.key)) + if (SSdbcore.Connect()) + var/isadmin = 0 + if(src.client && src.client.holder) + isadmin = 1 + var/datum/DBQuery/query_get_new_polls = SSdbcore.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM [format_table_name("poll_vote")] WHERE ckey = \"[sanitizeSQL(ckey)]\") AND id NOT IN (SELECT pollid FROM [format_table_name("poll_textreply")] WHERE ckey = \"[sanitizeSQL(ckey)]\")") + var/rs = REF(src) + if(query_get_new_polls.Execute()) + var/newpoll = 0 + if(query_get_new_polls.NextRow()) + newpoll = 1 + + if(newpoll) + output += "

Show Player Polls (NEW!)

" + else + output += "

Show Player Polls

" + qdel(query_get_new_polls) + if(QDELETED(src)) + return + + output += "
" + + //src << browse(output,"window=playersetup;size=210x240;can_close=0") + var/datum/browser/popup = new(src, "playersetup", "
New Player Options
", 250, 265) + popup.set_window_options("can_close=0") + popup.set_content(output) + popup.open(FALSE) + +/mob/dead/new_player/Topic(href, href_list[]) + if(src != usr) + return 0 + + if(!client) + return 0 + + //Determines Relevent Population Cap + var/relevant_cap + var/hpc = CONFIG_GET(number/hard_popcap) + var/epc = CONFIG_GET(number/extreme_popcap) + if(hpc && epc) + relevant_cap = min(hpc, epc) + else + relevant_cap = max(hpc, epc) + + if(href_list["show_preferences"]) + client.prefs.ShowChoices(src) + return 1 + + if(href_list["ready"]) + var/tready = text2num(href_list["ready"]) + //Avoid updating ready if we're after PREGAME (they should use latejoin instead) + //This is likely not an actual issue but I don't have time to prove that this + //no longer is required + if(SSticker.current_state <= GAME_STATE_PREGAME) + ready = tready + //if it's post initialisation and they're trying to observe we do the needful + if(!SSticker.current_state < GAME_STATE_PREGAME && tready == PLAYER_READY_TO_OBSERVE) + ready = tready + make_me_an_observer() + return + + if(href_list["refresh"]) + src << browse(null, "window=playersetup") //closes the player setup window + new_player_panel() + + if(href_list["late_join"]) + if(!SSticker || !SSticker.IsRoundInProgress()) + to_chat(usr, "The round is either not ready, or has already finished...") + return + + if(href_list["late_join"] == "override") + LateChoices() + return + + if(SSticker.queued_players.len || (relevant_cap && living_player_count() >= relevant_cap && !(ckey(key) in GLOB.admin_datums))) + to_chat(usr, "[CONFIG_GET(string/hard_popcap_message)]") + + var/queue_position = SSticker.queued_players.Find(usr) + if(queue_position == 1) + to_chat(usr, "You are next in line to join the game. You will be notified when a slot opens up.") + else if(queue_position) + to_chat(usr, "There are [queue_position-1] players in front of you in the queue to join the game.") + else + SSticker.queued_players += usr + to_chat(usr, "You have been added to the queue to join the game. Your position in queue is [SSticker.queued_players.len].") + return + LateChoices() + + if(href_list["manifest"]) + ViewManifest() + + if(href_list["SelectedJob"]) + + if(!GLOB.enter_allowed) + to_chat(usr, "There is an administrative lock on entering the game!") + return + + if(SSticker.queued_players.len && !(ckey(key) in GLOB.admin_datums)) + if((living_player_count() >= relevant_cap) || (src != SSticker.queued_players[1])) + to_chat(usr, "Server is full.") + return + + AttemptLateSpawn(href_list["SelectedJob"]) + return + + if(href_list["JoinAsGhostRole"]) + if(!GLOB.enter_allowed) + to_chat(usr, " There is an administrative lock on entering the game!") + + if(SSticker.queued_players.len && !(ckey(key) in GLOB.admin_datums)) + if((living_player_count() >= relevant_cap) || (src != SSticker.queued_players[1])) + to_chat(usr, "Server is full.") + return + + var/obj/effect/mob_spawn/MS = pick(GLOB.mob_spawners[href_list["JoinAsGhostRole"]]) + if(MS.attack_ghost(src, latejoinercalling = TRUE)) + SSticker.queued_players -= src + SSticker.queue_delay = 4 + qdel(src) + + if(!ready && href_list["preference"]) + if(client) + client.prefs.process_link(src, href_list) + else if(!href_list["late_join"]) + new_player_panel() + + if(href_list["showpoll"]) + handle_player_polling() + return + + if(href_list["pollid"]) + var/pollid = href_list["pollid"] + if(istext(pollid)) + pollid = text2num(pollid) + if(isnum(pollid) && ISINTEGER(pollid)) + src.poll_player(pollid) + return + + if(href_list["votepollid"] && href_list["votetype"]) + var/pollid = text2num(href_list["votepollid"]) + var/votetype = href_list["votetype"] + //lets take data from the user to decide what kind of poll this is, without validating it + //what could go wrong + switch(votetype) + if(POLLTYPE_OPTION) + var/optionid = text2num(href_list["voteoptionid"]) + if(vote_on_poll(pollid, optionid)) + to_chat(usr, "Vote successful.") + else + to_chat(usr, "Vote failed, please try again or contact an administrator.") + if(POLLTYPE_TEXT) + var/replytext = href_list["replytext"] + if(log_text_poll_reply(pollid, replytext)) + to_chat(usr, "Feedback logging successful.") + else + to_chat(usr, "Feedback logging failed, please try again or contact an administrator.") + if(POLLTYPE_RATING) + var/id_min = text2num(href_list["minid"]) + var/id_max = text2num(href_list["maxid"]) + + if( (id_max - id_min) > 100 ) //Basic exploit prevention + //(protip, this stops no exploits) + to_chat(usr, "The option ID difference is too big. Please contact administration or the database admin.") + return + + for(var/optionid = id_min; optionid <= id_max; optionid++) + if(!isnull(href_list["o[optionid]"])) //Test if this optionid was replied to + var/rating + if(href_list["o[optionid]"] == "abstain") + rating = null + else + rating = text2num(href_list["o[optionid]"]) + if(!isnum(rating) || !ISINTEGER(rating)) + return + + if(!vote_on_numval_poll(pollid, optionid, rating)) + to_chat(usr, "Vote failed, please try again or contact an administrator.") + return + to_chat(usr, "Vote successful.") + if(POLLTYPE_MULTI) + var/id_min = text2num(href_list["minoptionid"]) + var/id_max = text2num(href_list["maxoptionid"]) + + if( (id_max - id_min) > 100 ) //Basic exploit prevention + to_chat(usr, "The option ID difference is too big. Please contact administration or the database admin.") + return + + for(var/optionid = id_min; optionid <= id_max; optionid++) + if(!isnull(href_list["option_[optionid]"])) //Test if this optionid was selected + var/i = vote_on_multi_poll(pollid, optionid) + switch(i) + if(0) + continue + if(1) + to_chat(usr, "Vote failed, please try again or contact an administrator.") + return + if(2) + to_chat(usr, "Maximum replies reached.") + break + to_chat(usr, "Vote successful.") + if(POLLTYPE_IRV) + if (!href_list["IRVdata"]) + to_chat(src, "No ordering data found. Please try again or contact an administrator.") + return + var/list/votelist = splittext(href_list["IRVdata"], ",") + if (!vote_on_irv_poll(pollid, votelist)) + to_chat(src, "Vote failed, please try again or contact an administrator.") + return + to_chat(src, "Vote successful.") + +//When you cop out of the round (NB: this HAS A SLEEP FOR PLAYER INPUT IN IT) +/mob/dead/new_player/proc/make_me_an_observer() + if(QDELETED(src) || !src.client) + ready = PLAYER_NOT_READY + return FALSE + + var/this_is_like_playing_right = alert(src,"Are you sure you wish to observe? You will not be able to play this round!","Player Setup","Yes","No") + + if(QDELETED(src) || !src.client || this_is_like_playing_right != "Yes") + ready = PLAYER_NOT_READY + src << browse(null, "window=playersetup") //closes the player setup window + new_player_panel() + return FALSE + + var/mob/dead/observer/observer = new() + spawning = TRUE + + observer.started_as_observer = TRUE + close_spawn_windows() + var/obj/effect/landmark/observer_start/O = locate(/obj/effect/landmark/observer_start) in GLOB.landmarks_list + to_chat(src, "Now teleporting.") + if (O) + observer.forceMove(O.loc) + else + to_chat(src, "Teleporting failed. Ahelp an admin please") + stack_trace("There's no freaking observer landmark available on this map or you're making observers before the map is initialised") + observer.key = key + observer.client = client + observer.set_ghost_appearance() + if(observer.client && observer.client.prefs) + observer.real_name = observer.client.prefs.real_name + observer.name = observer.real_name + observer.update_icon() + observer.stop_sound_channel(CHANNEL_LOBBYMUSIC) + QDEL_NULL(mind) + qdel(src) + return TRUE + +/proc/get_job_unavailable_error_message(retval, jobtitle) + switch(retval) + if(JOB_AVAILABLE) + return "[jobtitle] is available." + if(JOB_UNAVAILABLE_GENERIC) + return "[jobtitle] is unavailable." + if(JOB_UNAVAILABLE_BANNED) + return "You are currently banned from [jobtitle]." + if(JOB_UNAVAILABLE_PLAYTIME) + return "You do not have enough relevant playtime for [jobtitle]." + if(JOB_UNAVAILABLE_ACCOUNTAGE) + return "Your account is not old enough for [jobtitle]." + if(JOB_UNAVAILABLE_SLOTFULL) + return "[jobtitle] is already filled to capacity." + return "Error: Unknown job availability." + +/mob/dead/new_player/proc/IsJobUnavailable(rank, latejoin = FALSE) + var/datum/job/job = SSjob.GetJob(rank) + if(!job) + return JOB_UNAVAILABLE_GENERIC + if((job.current_positions >= job.total_positions) && job.total_positions != -1) + if(job.title == "Assistant") + if(isnum(client.player_age) && client.player_age <= 14) //Newbies can always be assistants + return JOB_AVAILABLE + for(var/datum/job/J in SSjob.occupations) + if(J && J.current_positions < J.total_positions && J.title != job.title) + return JOB_UNAVAILABLE_SLOTFULL + else + return JOB_UNAVAILABLE_SLOTFULL + if(jobban_isbanned(src,rank)) + return JOB_UNAVAILABLE_BANNED + if(QDELETED(src)) + return JOB_UNAVAILABLE_GENERIC + if(!job.player_old_enough(client)) + return JOB_UNAVAILABLE_ACCOUNTAGE + if(job.required_playtime_remaining(client)) + return JOB_UNAVAILABLE_PLAYTIME + if(latejoin && !job.special_check_latejoin(client)) + return JOB_UNAVAILABLE_GENERIC + return JOB_AVAILABLE + +/mob/dead/new_player/proc/AttemptLateSpawn(rank) + var/error = IsJobUnavailable(rank) + if(error != JOB_AVAILABLE) + alert(src, get_job_unavailable_error_message(error, rank)) + return FALSE + + if(SSticker.late_join_disabled) + alert(src, "An administrator has disabled late join spawning.") + return FALSE + + var/arrivals_docked = TRUE + if(SSshuttle.arrivals) + close_spawn_windows() //In case we get held up + if(SSshuttle.arrivals.damaged && CONFIG_GET(flag/arrivals_shuttle_require_safe_latejoin)) + src << alert("The arrivals shuttle is currently malfunctioning! You cannot join.") + return FALSE + + if(CONFIG_GET(flag/arrivals_shuttle_require_undocked)) + SSshuttle.arrivals.RequireUndocked(src) + arrivals_docked = SSshuttle.arrivals.mode != SHUTTLE_CALL + + //Remove the player from the join queue if he was in one and reset the timer + SSticker.queued_players -= src + SSticker.queue_delay = 4 + + SSjob.AssignRole(src, rank, 1) + + var/mob/living/character = create_character(TRUE) //creates the human and transfers vars and mind + var/equip = SSjob.EquipRank(character, rank, TRUE) + if(isliving(equip)) //Borgs get borged in the equip, so we need to make sure we handle the new mob. + character = equip + + var/datum/job/job = SSjob.GetJob(rank) + + if(job && !job.override_latejoin_spawn(character)) + SSjob.SendToLateJoin(character) + if(!arrivals_docked) + var/obj/screen/splash/Spl = new(character.client, TRUE) + Spl.Fade(TRUE) + character.playsound_local(get_turf(character), 'sound/voice/ApproachingTG.ogg', 25) + + character.update_parallax_teleport() + + SSticker.minds += character.mind + + var/mob/living/carbon/human/humanc + if(ishuman(character)) + humanc = character //Let's retypecast the var to be human, + + if(humanc) //These procs all expect humans + GLOB.data_core.manifest_inject(humanc) + if(SSshuttle.arrivals) + SSshuttle.arrivals.QueueAnnounce(humanc, rank) + else + AnnounceArrival(humanc, rank) + AddEmploymentContract(humanc) + if(GLOB.highlander) + to_chat(humanc, "THERE CAN BE ONLY ONE!!!") + humanc.make_scottish() + + if(GLOB.summon_guns_triggered) + give_guns(humanc) + if(GLOB.summon_magic_triggered) + give_magic(humanc) + + GLOB.joined_player_list += character.ckey + GLOB.latejoiners += character + + if(CONFIG_GET(flag/allow_latejoin_antagonists) && humanc) //Borgs aren't allowed to be antags. Will need to be tweaked if we get true latejoin ais. + if(SSshuttle.emergency) + switch(SSshuttle.emergency.mode) + if(SHUTTLE_RECALL, SHUTTLE_IDLE) + SSticker.mode.make_antag_chance(humanc) + if(SHUTTLE_CALL) + if(SSshuttle.emergency.timeLeft(1) > initial(SSshuttle.emergencyCallTime)*0.5) + SSticker.mode.make_antag_chance(humanc) + + if(humanc && CONFIG_GET(flag/roundstart_traits)) + SSquirks.AssignQuirks(humanc, humanc.client, TRUE, FALSE, job, FALSE) + + log_manifest(character.mind.key,character.mind,character,latejoin = TRUE) + +/mob/dead/new_player/proc/AddEmploymentContract(mob/living/carbon/human/employee) + //TODO: figure out a way to exclude wizards/nukeops/demons from this. + for(var/C in GLOB.employmentCabinets) + var/obj/structure/filingcabinet/employment/employmentCabinet = C + if(!employmentCabinet.virgin) + employmentCabinet.addFile(employee) + + +/mob/dead/new_player/proc/LateChoices() + + var/level = "green" + switch(GLOB.security_level) + if(SEC_LEVEL_GREEN) + level = "green" + if(SEC_LEVEL_BLUE) + level = "blue" + if(SEC_LEVEL_AMBER) + level = "amber" + if(SEC_LEVEL_RED) + level = "red" + if(SEC_LEVEL_DELTA) + level = "delta" + + var/dat = "
Round Duration: [DisplayTimeText(world.time - SSticker.round_start_time)]
Alert Level: [capitalize(level)]
" + if(SSshuttle.emergency) + switch(SSshuttle.emergency.mode) + if(SHUTTLE_ESCAPE) + dat += "
The station has been evacuated.

" + if(SHUTTLE_CALL) + if(!SSshuttle.canRecall()) + dat += "
The station is currently undergoing evacuation procedures.

" + for(var/datum/job/prioritized_job in SSjob.prioritized_jobs) + if(prioritized_job.current_positions >= prioritized_job.total_positions) + SSjob.prioritized_jobs -= prioritized_job + dat += "
" + var/column_counter = 0 + var/free_space = 0 + for(var/list/category in list(GLOB.command_positions) + list(GLOB.supply_positions) + list(GLOB.engineering_positions) + list(GLOB.nonhuman_positions - "pAI") + list(GLOB.civilian_positions) + list(GLOB.medical_positions) + list(GLOB.science_positions) + list(GLOB.security_positions)) + var/cat_color = "fff" //random default + if(SSjob.name_occupations && SSjob.name_occupations[category[1]]) + cat_color = SSjob.name_occupations[category[1]].selection_color //use the color of the first job in the category (the department head) as the category color + else + cat_color = SSjob.occupations[category[1]].selection_color + dat += "
" + dat += "[SSjob.name_occupations[category[1]].exp_type_department]" + + var/list/dept_dat = list() + for(var/job in category) + var/datum/job/job_datum = SSjob.name_occupations[job] + if(job_datum && IsJobUnavailable(job_datum.title, TRUE) == JOB_AVAILABLE) + var/command_bold = "" + if(job in GLOB.command_positions) + command_bold = " command" + if(job_datum in SSjob.prioritized_jobs) + dept_dat += "[job_datum.title] ([job_datum.current_positions])" + else + dept_dat += "[job_datum.title] ([job_datum.current_positions])" + if(!dept_dat.len) + dept_dat += "No positions open." + dat += jointext(dept_dat, "") + dat += "

" + column_counter++ + if(free_space <=4) + free_space++ + if(column_counter > 0 && (column_counter % 3 == 0)) + dat += "
" + if(free_space >= 5 && (free_space % 5 == 0) && (column_counter % 3 != 0)) + free_space = 0 + column_counter = 0 + dat += "" + + dat += "
" + + var/available_ghosts = 0 + for(var/spawner in GLOB.mob_spawners) + if(!LAZYLEN(spawner)) + continue + var/obj/effect/mob_spawn/S = pick(GLOB.mob_spawners[spawner]) + if(!istype(S) || !S.can_latejoin()) + continue + available_ghosts++ + break + + if(!available_ghosts) + dat += "
There are currently no open ghost spawners.
" + else + var/list/categorizedJobs = list("Ghost Role" = list(jobs = list(), titles = GLOB.mob_spawners, color = "#ffffff")) + for(var/spawner in GLOB.mob_spawners) + if(!LAZYLEN(spawner)) + continue + var/obj/effect/mob_spawn/S = pick(GLOB.mob_spawners[spawner]) + if(!istype(S) || !S.can_latejoin()) + continue + categorizedJobs["Ghost Role"]["jobs"] += spawner + + dat += "
" + for(var/jobcat in categorizedJobs) + if(!length(categorizedJobs[jobcat]["jobs"])) + continue + var/color = categorizedJobs[jobcat]["color"] + dat += "
" + dat += "[jobcat]" + for(var/spawner in categorizedJobs[jobcat]["jobs"]) + dat += "[spawner]" + + dat += "

" + dat += "
" + dat += "" + + var/datum/browser/popup = new(src, "latechoices", "Choose Profession", 720, 600) + popup.add_stylesheet("playeroptions", 'html/browser/playeroptions.css') + popup.set_content(jointext(dat, "")) + popup.open(FALSE) // FALSE is passed to open so that it doesn't use the onclose() proc + +/mob/dead/new_player/proc/create_character(transfer_after) + spawning = 1 + close_spawn_windows() + + var/mob/living/carbon/human/H = new(loc) + + var/frn = CONFIG_GET(flag/force_random_names) + if(!frn) + frn = jobban_isbanned(src, "appearance") + if(QDELETED(src)) + return + if(frn) + client.prefs.random_character() + client.prefs.real_name = client.prefs.pref_species.random_name(gender,1) + client.prefs.copy_to(H) + H.dna.update_dna_identity() + if(mind) + if(transfer_after) + mind.late_joiner = TRUE + mind.active = 0 //we wish to transfer the key manually + mind.transfer_to(H) //won't transfer key since the mind is not active + + H.name = real_name + + . = H + new_character = . + if(transfer_after) + transfer_character() + +/mob/dead/new_player/proc/transfer_character() + . = new_character + if(.) + new_character.key = key //Manually transfer the key to log them in + new_character.stop_sound_channel(CHANNEL_LOBBYMUSIC) + new_character = null + qdel(src) + +/mob/dead/new_player/proc/ViewManifest() + var/dat = "" + dat += "

Crew Manifest

" + dat += GLOB.data_core.get_manifest(OOC = 1) + + src << browse(dat, "window=manifest;size=387x420;can_close=1") + +/mob/dead/new_player/Move() + return 0 + + +/mob/dead/new_player/proc/close_spawn_windows() + + src << browse(null, "window=latechoices") //closes late choices window + src << browse(null, "window=playersetup") //closes the player setup window + src << browse(null, "window=preferences") //closes job selection + src << browse(null, "window=mob_occupation") + src << browse(null, "window=latechoices") //closes late job selection + +/* Used to make sure that a player has a valid job preference setup, used to knock players out of eligibility for anything if their prefs don't make sense. + A "valid job preference setup" in this situation means at least having one job set to low, or not having "return to lobby" enabled + Prevents "antag rolling" by setting antag prefs on, all jobs to never, and "return to lobby if preferences not availible" + Doing so would previously allow you to roll for antag, then send you back to lobby if you didn't get an antag role + This also does some admin notification and logging as well, as well as some extra logic to make sure things don't go wrong +*/ + +/mob/dead/new_player/proc/check_preferences() + if(!client) + return FALSE //Not sure how this would get run without the mob having a client, but let's just be safe. + if(client.prefs.joblessrole != RETURNTOLOBBY) + return TRUE + // If they have antags enabled, they're potentially doing this on purpose instead of by accident. Notify admins if so. + var/has_antags = FALSE + if(client.prefs.be_special.len > 0) + has_antags = TRUE + if(client.prefs.job_preferences.len == 0) + if(!ineligible_for_roles) + to_chat(src, "You have no jobs enabled, along with return to lobby if job is unavailable. This makes you ineligible for any round start role, please update your job preferences.") + ineligible_for_roles = TRUE + ready = PLAYER_NOT_READY + if(has_antags) + log_admin("[src.ckey] just got booted back to lobby with no jobs, but antags enabled.") + message_admins("[src.ckey] just got booted back to lobby with no jobs enabled, but antag rolling enabled. Likely antag rolling abuse.") + + return FALSE //This is the only case someone should actually be completely blocked from antag rolling as well + return TRUE diff --git a/code/modules/mob/dead/new_player/preferences_setup.dm b/code/modules/mob/dead/new_player/preferences_setup.dm index 6e91b58506..b08fadefcb 100644 --- a/code/modules/mob/dead/new_player/preferences_setup.dm +++ b/code/modules/mob/dead/new_player/preferences_setup.dm @@ -24,50 +24,35 @@ age = rand(AGE_MIN,AGE_MAX) /datum/preferences/proc/update_preview_icon() - // Silicons only need a very basic preview since there is no customization for them. -// var/wide_icon = FALSE //CITDEL THINGS -// if(features["taur"] != "None") -// wide_icon = TRUE - if(job_engsec_high) - switch(job_engsec_high) - if(AI_JF) - parent.show_character_previews(image('icons/mob/ai.dmi', resolve_ai_icon(preferred_ai_core_display), dir = SOUTH)) - return - if(CYBORG) - parent.show_character_previews(image('icons/mob/robots.dmi', icon_state = "robot", dir = SOUTH)) - return + // Determine what job is marked as 'High' priority, and dress them up as such. + var/datum/job/previewJob + var/highest_pref = 0 + for(var/job in job_preferences) + if(job_preferences[job] > highest_pref) + previewJob = SSjob.GetJob(job) + highest_pref = job_preferences[job] + + if(previewJob) + // Silicons only need a very basic preview since there is no customization for them. + if(istype(previewJob,/datum/job/ai)) + parent.show_character_previews(image('icons/mob/ai.dmi', icon_state = resolve_ai_icon(preferred_ai_core_display), dir = SOUTH)) + return + if(istype(previewJob,/datum/job/cyborg)) + parent.show_character_previews(image('icons/mob/robots.dmi', icon_state = "robot", dir = SOUTH)) + return // Set up the dummy for its photoshoot var/mob/living/carbon/human/dummy/mannequin = generate_or_wait_for_human_dummy(DUMMY_HUMAN_SLOT_PREFERENCES) mannequin.cut_overlays() + // Apply the Dummy's preview background first so we properly layer everything else on top of it. mannequin.add_overlay(mutable_appearance('modular_citadel/icons/ui/backgrounds.dmi', bgstate, layer = SPACE_LAYER)) copy_to(mannequin) - // Determine what job is marked as 'High' priority, and dress them up as such. - var/datum/job/previewJob - var/highRankFlag = job_civilian_high | job_medsci_high | job_engsec_high - - if(job_civilian_low & ASSISTANT) - previewJob = SSjob.GetJob("Assistant") - else if(highRankFlag) - var/highDeptFlag - if(job_civilian_high) - highDeptFlag = CIVILIAN - else if(job_medsci_high) - highDeptFlag = MEDSCI - else if(job_engsec_high) - highDeptFlag = ENGSEC - - for(var/datum/job/job in SSjob.occupations) - if(job.flag == highRankFlag && job.department_flag == highDeptFlag) - previewJob = job - break - if(previewJob) - if(current_tab != 2) - mannequin.job = previewJob.title - previewJob.equip(mannequin, TRUE) + mannequin.job = previewJob.title + previewJob.equip(mannequin, TRUE, preference_source = parent) COMPILE_OVERLAYS(mannequin) parent.show_character_previews(new /mutable_appearance(mannequin)) unset_busy_human_dummy(DUMMY_HUMAN_SLOT_PREFERENCES) + diff --git a/tgstation.dme b/tgstation.dme index 1a1151b951..e3050ec8e5 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -1799,17 +1799,39 @@ #include "code\modules\jobs\access.dm" #include "code\modules\jobs\job_exp.dm" #include "code\modules\jobs\jobs.dm" +#include "code\modules\jobs\job_types\_job.dm" +#include "code\modules\jobs\job_types\ai.dm" #include "code\modules\jobs\job_types\assistant.dm" +#include "code\modules\jobs\job_types\atmospheric_technician.dm" +#include "code\modules\jobs\job_types\bartender.dm" +#include "code\modules\jobs\job_types\botanist.dm" #include "code\modules\jobs\job_types\captain.dm" -#include "code\modules\jobs\job_types\cargo_service.dm" -#include "code\modules\jobs\job_types\civilian.dm" -#include "code\modules\jobs\job_types\civilian_chaplain.dm" -#include "code\modules\jobs\job_types\engineering.dm" -#include "code\modules\jobs\job_types\job.dm" -#include "code\modules\jobs\job_types\medical.dm" -#include "code\modules\jobs\job_types\science.dm" -#include "code\modules\jobs\job_types\security.dm" -#include "code\modules\jobs\job_types\silicon.dm" +#include "code\modules\jobs\job_types\cargo_technician.dm" +#include "code\modules\jobs\job_types\chaplain.dm" +#include "code\modules\jobs\job_types\chemist.dm" +#include "code\modules\jobs\job_types\chief_engineer.dm" +#include "code\modules\jobs\job_types\chief_medical_officer.dm" +#include "code\modules\jobs\job_types\clown.dm" +#include "code\modules\jobs\job_types\cook.dm" +#include "code\modules\jobs\job_types\curator.dm" +#include "code\modules\jobs\job_types\cyborg.dm" +#include "code\modules\jobs\job_types\detective.dm" +#include "code\modules\jobs\job_types\geneticist.dm" +#include "code\modules\jobs\job_types\head_of_personnel.dm" +#include "code\modules\jobs\job_types\head_of_security.dm" +#include "code\modules\jobs\job_types\janitor.dm" +#include "code\modules\jobs\job_types\lawyer.dm" +#include "code\modules\jobs\job_types\medical_doctor.dm" +#include "code\modules\jobs\job_types\mime.dm" +#include "code\modules\jobs\job_types\quartermaster.dm" +#include "code\modules\jobs\job_types\research_director.dm" +#include "code\modules\jobs\job_types\roboticist.dm" +#include "code\modules\jobs\job_types\scientist.dm" +#include "code\modules\jobs\job_types\security_officer.dm" +#include "code\modules\jobs\job_types\shaft_miner.dm" +#include "code\modules\jobs\job_types\station_engineer.dm" +#include "code\modules\jobs\job_types\virologist.dm" +#include "code\modules\jobs\job_types\warden.dm" #include "code\modules\jobs\map_changes\map_changes.dm" #include "code\modules\keybindings\bindings_admin.dm" #include "code\modules\keybindings\bindings_atom.dm"