mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Refactors some job variables from the Economy file (what the fuck) and swaps created types for lists in bot access assignment.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/datum/job/assistant
|
||||
title = "Assistant"
|
||||
flag = ASSISTANT
|
||||
department = "Civilian"
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = -1
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/datum/job/chaplain
|
||||
title = "Chaplain"
|
||||
flag = CHAPLAIN
|
||||
department = "Civilian"
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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"
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user