diff --git a/baystation12.dme b/baystation12.dme index 0bbdaff97b3..0c2a7bef0b2 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -931,7 +931,6 @@ #include "code\modules\economy\EFTPOS.dm" #include "code\modules\economy\Events.dm" #include "code\modules\economy\Events_Mundane.dm" -#include "code\modules\economy\Job_Departments.dm" #include "code\modules\economy\TradeDestinations.dm" #include "code\modules\events\alien_infestation.dm" #include "code\modules\events\blob.dm" diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 68c74c614e9..6e65b47e006 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -48,7 +48,7 @@ var/global/list/underwear_f = list("Red" = "f1", "White" = "f2", "Yellow" = "f3" var/global/list/undershirt_t = list("Black Tank top" = "u1", "White Tank top" = "u2", "Black shirt" = "u3", "White shirt" = "u4", "None") //Backpacks var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt") - +var/global/list/exclude_jobs = list(/datum/job/ai,/datum/job/cyborg) ////////////////////////// /////Initial Building///// ////////////////////////// @@ -88,7 +88,8 @@ var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Al sort_surgeries() //List of job. I can't believe this was calculated multiple times per tick! - paths = typesof(/datum/job) -list(/datum/job,/datum/job/ai,/datum/job/cyborg) + paths = typesof(/datum/job)-/datum/job + paths -= exclude_jobs for(var/T in paths) var/datum/job/J = new T joblist[J.title] = J diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 7f2ec98d120..2625af077c4 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -407,7 +407,7 @@ /proc/get_all_jobs() var/list/all_jobs = list() var/list/all_datums = typesof(/datum/job) - all_datums.Remove(list(/datum/job,/datum/job/ai,/datum/job/cyborg)) + all_datums -= exclude_jobs var/datum/job/jobdatum for(var/jobtype in all_datums) jobdatum = new jobtype diff --git a/code/game/jobs/job/assistant.dm b/code/game/jobs/job/assistant.dm index 32118034127..d876118a346 100644 --- a/code/game/jobs/job/assistant.dm +++ b/code/game/jobs/job/assistant.dm @@ -1,6 +1,7 @@ /datum/job/assistant title = "Assistant" flag = ASSISTANT + department = "Civilian" department_flag = CIVILIAN faction = "Station" total_positions = -1 diff --git a/code/game/jobs/job/captain.dm b/code/game/jobs/job/captain.dm index 06513c05f9f..f9cd48c6de4 100644 --- a/code/game/jobs/job/captain.dm +++ b/code/game/jobs/job/captain.dm @@ -3,6 +3,8 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) /datum/job/captain title = "Captain" flag = CAPTAIN + department = "Command" + head_position = 1 department_flag = ENGSEC faction = "Station" total_positions = 1 @@ -50,6 +52,8 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) /datum/job/hop title = "Head of Personnel" flag = HOP + department = "Civilian" + head_position = 1 department_flag = CIVILIAN faction = "Station" total_positions = 1 diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm index 64209f675b3..062571655d9 100644 --- a/code/game/jobs/job/civilian.dm +++ b/code/game/jobs/job/civilian.dm @@ -2,6 +2,7 @@ /datum/job/bartender title = "Bartender" flag = BARTENDER + department = "Civilian" department_flag = CIVILIAN faction = "Station" total_positions = 1 @@ -44,6 +45,7 @@ /datum/job/chef title = "Chef" flag = CHEF + department = "Civilian" department_flag = CIVILIAN faction = "Station" total_positions = 2 @@ -74,6 +76,7 @@ /datum/job/hydro title = "Gardener" flag = BOTANIST + department = "Civilian" department_flag = CIVILIAN faction = "Station" total_positions = 2 @@ -108,6 +111,7 @@ /datum/job/qm title = "Quartermaster" flag = QUARTERMASTER + department = "Cargo" department_flag = CIVILIAN faction = "Station" total_positions = 1 @@ -138,6 +142,7 @@ /datum/job/cargo_tech title = "Cargo Technician" flag = CARGOTECH + department = "Cargo" department_flag = CIVILIAN faction = "Station" total_positions = 2 @@ -166,6 +171,7 @@ /datum/job/mining title = "Shaft Miner" flag = MINER + department = "Cargo" department_flag = CIVILIAN faction = "Station" total_positions = 3 @@ -277,6 +283,7 @@ /datum/job/janitor title = "Janitor" flag = JANITOR + department = "Civilian" department_flag = CIVILIAN faction = "Station" total_positions = 1 @@ -305,6 +312,7 @@ /datum/job/librarian title = "Librarian" flag = LIBRARIAN + department = "Civilian" department_flag = CIVILIAN faction = "Station" total_positions = 1 @@ -334,6 +342,7 @@ /datum/job/lawyer title = "Internal Affairs Agent" flag = LAWYER + department = "Civilian" department_flag = CIVILIAN faction = "Station" total_positions = 2 diff --git a/code/game/jobs/job/civilian_chaplain.dm b/code/game/jobs/job/civilian_chaplain.dm index e7ce82b5956..4131ec9b55f 100644 --- a/code/game/jobs/job/civilian_chaplain.dm +++ b/code/game/jobs/job/civilian_chaplain.dm @@ -2,6 +2,7 @@ /datum/job/chaplain title = "Chaplain" flag = CHAPLAIN + department = "Civilian" department_flag = CIVILIAN faction = "Station" total_positions = 1 diff --git a/code/game/jobs/job/engineering.dm b/code/game/jobs/job/engineering.dm index 8677f99728e..249c103c87a 100644 --- a/code/game/jobs/job/engineering.dm +++ b/code/game/jobs/job/engineering.dm @@ -1,6 +1,8 @@ /datum/job/chief_engineer title = "Chief Engineer" flag = CHIEF + head_position = 1 + department = "Engineering" department_flag = ENGSEC faction = "Station" total_positions = 1 @@ -44,6 +46,7 @@ /datum/job/engineer title = "Station Engineer" flag = ENGINEER + department = "Engineering" department_flag = ENGSEC faction = "Station" total_positions = 5 @@ -79,6 +82,7 @@ /datum/job/atmos title = "Atmospheric Technician" flag = ATMOSTECH + department = "Engineering" department_flag = ENGSEC faction = "Station" total_positions = 3 diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index c0d9bd44b37..e155cbc9ae3 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -41,6 +41,10 @@ //If you have use_age_restriction_for_jobs config option enabled and the database set up, this option will add a requirement for players to be at least minimal_player_age days old. (meaning they first signed in at least that many days before.) var/minimal_player_age = 0 + var/department = null + var/head_position = 0 + + /datum/job/proc/equip(var/mob/living/carbon/human/H) return 1 diff --git a/code/game/jobs/job/medical.dm b/code/game/jobs/job/medical.dm index 13702911528..51bed17f3c2 100644 --- a/code/game/jobs/job/medical.dm +++ b/code/game/jobs/job/medical.dm @@ -1,6 +1,8 @@ /datum/job/cmo title = "Chief Medical Officer" flag = CMO + head_position = 1 + department = "Medical" department_flag = MEDSCI faction = "Station" total_positions = 1 @@ -39,6 +41,7 @@ /datum/job/doctor title = "Medical Doctor" flag = DOCTOR + department = "Medical" department_flag = MEDSCI faction = "Station" total_positions = 5 @@ -104,6 +107,7 @@ /datum/job/chemist title = "Chemist" flag = CHEMIST + department = "Medical" department_flag = MEDSCI faction = "Station" total_positions = 2 @@ -135,6 +139,7 @@ /datum/job/geneticist title = "Geneticist" flag = GENETICIST + department = "Medical" department_flag = MEDSCI faction = "Station" total_positions = 0 @@ -164,6 +169,7 @@ /datum/job/psychiatrist title = "Psychiatrist" flag = PSYCHIATRIST + department = "Medical" department_flag = MEDSCI faction = "Station" total_positions = 1 @@ -201,6 +207,7 @@ /datum/job/Paramedic title = "Paramedic" flag = PARAMEDIC + department = "Medical" department_flag = MEDSCI faction = "Station" total_positions = 2 diff --git a/code/game/jobs/job/science.dm b/code/game/jobs/job/science.dm index c5832280646..6142296d72e 100644 --- a/code/game/jobs/job/science.dm +++ b/code/game/jobs/job/science.dm @@ -1,6 +1,8 @@ /datum/job/rd title = "Research Director" flag = RD + head_position = 1 + department = "Science" department_flag = MEDSCI faction = "Station" total_positions = 1 @@ -40,6 +42,7 @@ /datum/job/scientist title = "Scientist" flag = SCIENTIST + department = "Science" department_flag = MEDSCI faction = "Station" total_positions = 5 @@ -72,6 +75,7 @@ /datum/job/xenobiologist title = "Xenobiologist" flag = XENOBIOLOGIST + department = "Science" department_flag = MEDSCI faction = "Station" total_positions = 3 @@ -102,6 +106,7 @@ /datum/job/roboticist title = "Roboticist" flag = ROBOTICIST + department = "Science" department_flag = MEDSCI faction = "Station" total_positions = 2 diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index 6d25f7fe58b..1a0e3bdf3ae 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -1,6 +1,8 @@ /datum/job/hos title = "Head of Security" flag = HOS + head_position = 1 + department = "Security" department_flag = ENGSEC faction = "Station" total_positions = 1 @@ -47,6 +49,7 @@ /datum/job/warden title = "Warden" flag = WARDEN + department = "Security" department_flag = ENGSEC faction = "Station" total_positions = 1 @@ -84,6 +87,7 @@ /datum/job/detective title = "Detective" flag = DETECTIVE + department = "Security" department_flag = ENGSEC faction = "Station" total_positions = 2 @@ -128,6 +132,7 @@ /datum/job/officer title = "Security Officer" flag = OFFICER + department = "Security" department_flag = ENGSEC faction = "Station" total_positions = 3 diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 2c67fbcae25..b7fde8f8f25 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -225,10 +225,11 @@ var/global/datum/controller/occupations/job_master SetupOccupations() //Holder for Triumvirate is stored in the ticker, this just processes it - if(ticker) - for(var/datum/job/ai/A in occupations) - if(ticker.triai) + if(ticker && ticker.triai) + for(var/datum/job/A in occupations) + if(A.title == "AI") A.spawn_positions = 3 + break //Get the players who are ready for(var/mob/new_player/player in player_list) @@ -245,7 +246,7 @@ var/global/datum/controller/occupations/job_master //People who wants to be assistants, sure, go on. Debug("DO, Running Assistant Check 1") - var/datum/job/assist = new /datum/job/assistant() + var/datum/job/assist = new DEFAULT_TYPE () var/list/assistant_candidates = FindOccupationCandidates(assist, 3) Debug("AC1, Candidates: [assistant_candidates.len]") for(var/mob/new_player/player in assistant_candidates) diff --git a/code/game/machinery/bots/cleanbot.dm b/code/game/machinery/bots/cleanbot.dm index 30f6dfaa8cb..f4d9dd0c593 100644 --- a/code/game/machinery/bots/cleanbot.dm +++ b/code/game/machinery/bots/cleanbot.dm @@ -51,10 +51,9 @@ should_patrol = 1 src.botcard = new /obj/item/weapon/card/id(src) - var/datum/job/janitor/J = new/datum/job/janitor - src.botcard.access = J.get_access() - - src.locked = 0 // Start unlocked so roboticist can set them to patrol. + src.botcard.access = list(access_janitor, access_maint_tunnels) + + src.locked = 0 // Start unlocked so roboticist can set them to patrol. if(radio_controller) radio_controller.add_object(src, beacon_freq, filter = RADIO_NAVBEACONS) diff --git a/code/game/machinery/bots/medbot.dm b/code/game/machinery/bots/medbot.dm index a83f59d03fd..fbcb7d448ee 100644 --- a/code/game/machinery/bots/medbot.dm +++ b/code/game/machinery/bots/medbot.dm @@ -75,8 +75,7 @@ src.botcard = new /obj/item/weapon/card/id(src) if(isnull(src.botcard_access) || (src.botcard_access.len < 1)) - var/datum/job/doctor/J = new/datum/job/doctor - src.botcard.access = J.get_access() + src.botcard.access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics) else src.botcard.access = src.botcard_access diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index ea406286480..56f33676d57 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -59,9 +59,7 @@ ..() wires = new(src) botcard = new(src) - var/datum/job/cargo_tech/J = new/datum/job/cargo_tech - botcard.access = J.get_access() -// botcard.access += access_robotics //Why --Ikki + botcard.access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station) cell = new(src) cell.charge = 2000 cell.maxcharge = 2000 diff --git a/code/game/machinery/bots/secbot.dm b/code/game/machinery/bots/secbot.dm index 6aa43c1b390..c3acade5890 100644 --- a/code/game/machinery/bots/secbot.dm +++ b/code/game/machinery/bots/secbot.dm @@ -91,8 +91,7 @@ update_icon() spawn(3) src.botcard = new /obj/item/weapon/card/id(src) - var/datum/job/detective/J = new/datum/job/detective - src.botcard.access = J.get_access() + src.botcard.access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court) if(radio_controller) radio_controller.add_object(src, control_freq, filter = RADIO_SECBOT) radio_controller.add_object(src, beacon_freq, filter = RADIO_NAVBEACONS) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 9f95abdc8ca..3348ae6cdd0 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -281,8 +281,7 @@ registered_name = "Captain" assignment = "Captain" New() - var/datum/job/captain/J = new/datum/job/captain - access = J.get_access() + access = get_all_accesses() ..() /obj/item/weapon/card/id/centcom diff --git a/code/global.dm b/code/global.dm index 13a62b38ce9..39ef138914f 100644 --- a/code/global.dm +++ b/code/global.dm @@ -257,3 +257,5 @@ var/max_explosion_range = 14 // Announcer intercom, because too much stuff creates an intercom for one message then hard del()s it. var/global/obj/item/device/radio/intercom/global_announcer = new(null) + +var/list/station_departments = list("Command", "Medical", "Engineering", "Science", "Security", "Cargo", "Civilian") diff --git a/code/modules/economy/Job_Departments.dm b/code/modules/economy/Job_Departments.dm deleted file mode 100644 index 64abe66acc1..00000000000 --- a/code/modules/economy/Job_Departments.dm +++ /dev/null @@ -1,70 +0,0 @@ -var/list/station_departments = list("Command", "Medical", "Engineering", "Science", "Security", "Cargo", "Civilian") - -// The department the job belongs to. -/datum/job/var/department = null - -// Whether this is a head position -/datum/job/var/head_position = 0 - -/datum/job/captain/department = "Command" -/datum/job/captain/head_position = 1 - -/datum/job/hop/department = "Civilian" -/datum/job/hop/head_position = 1 - -/datum/job/assistant/department = "Civilian" - -/datum/job/bartender/department = "Civilian" - -/datum/job/chef/department = "Civilian" - -/datum/job/hydro/department = "Civilian" - -/datum/job/mining/department = "Civilian" - -/datum/job/janitor/department = "Civilian" - -/datum/job/librarian/department = "Civilian" - -/datum/job/lawyer/department = "Civilian" - -/datum/job/chaplain/department = "Civilian" - -/datum/job/qm/department = "Cargo" -/datum/job/qm/head_position = 1 - -/datum/job/cargo_tech/department = "Cargo" - -/datum/job/chief_engineer/department = "Engineering" -/datum/job/chief_engineer/head_position = 1 - -/datum/job/engineer/department = "Engineering" - -/datum/job/atmos/department = "Engineering" - -/datum/job/cmo/department = "Medical" -/datum/job/cmo/head_position = 1 - -/datum/job/doctor/department = "Medical" - -/datum/job/chemist/department = "Medical" - -/datum/job/geneticist/department = "Medical" - -/datum/job/psychiatrist/department = "Medical" - -/datum/job/rd/department = "Science" -/datum/job/rd/head_position = 1 - -/datum/job/scientist/department = "Science" - -/datum/job/roboticist/department = "Science" - -/datum/job/hos/department = "Security" -/datum/job/hos/head_position = 1 - -/datum/job/warden/department = "Security" - -/datum/job/detective/department = "Security" - -/datum/job/officer/department = "Security" \ No newline at end of file diff --git a/code/setup.dm b/code/setup.dm index f47566d1eb8..37e225f0381 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -762,3 +762,5 @@ var/list/be_special_flags = list( //General-purpose life speed define for plants. #define HYDRO_SPEED_MULTIPLIER 1 #define NANO_IGNORE_DISTANCE 1 + +#define DEFAULT_TYPE /datum/job/assistant \ No newline at end of file