mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-15 04:32:14 +00:00
Half-Refactors Jobs (#6762)
* Somewhat cleans up a piece of job code, makes new ID computers not be awful. * Changes ROLE_ defines to DEPARTMENT_ to be clearer. Backports the new ID computer's assignment section of its UI to the old ID computer. * Swaps back to southern cross map. * Removes a block of commented code.
This commit is contained in:
@@ -3,26 +3,38 @@
|
||||
|
||||
//Picks from the list, with some safeties, and returns the "default" arg if it fails
|
||||
#define DEFAULTPICK(L, default) ((istype(L, /list) && L:len) ? pick(L) : default)
|
||||
|
||||
// Ensures L is initailized after this point
|
||||
#define LAZYINITLIST(L) if (!L) L = list()
|
||||
|
||||
// Sets a L back to null iff it is empty
|
||||
#define UNSETEMPTY(L) if (L && !length(L)) L = null
|
||||
|
||||
// Removes I from list L, and sets I to null if it is now empty
|
||||
#define LAZYREMOVE(L, I) if(L) { L -= I; if(!length(L)) { L = null; } }
|
||||
// Adds I to L, initalizing I if necessary
|
||||
|
||||
// Adds I to L, initalizing L if necessary
|
||||
#define LAZYADD(L, I) if(!L) { L = list(); } L += I;
|
||||
|
||||
#define LAZYOR(L, I) if(!L) { L = list(); } L |= I;
|
||||
|
||||
#define LAZYFIND(L, V) L ? L.Find(V) : 0
|
||||
|
||||
// Reads I from L safely - Works with both associative and traditional lists.
|
||||
#define LAZYACCESS(L, I) (L ? (isnum(I) ? (I > 0 && I <= length(L) ? L[I] : null) : L[I]) : null)
|
||||
|
||||
// Turns LAZYINITLIST(L) L[K] = V into ... for associated lists
|
||||
#define LAZYSET(L, K, V) if(!L) { L = list(); } L[K] = V;
|
||||
|
||||
// Reads the length of L, returning 0 if null
|
||||
#define LAZYLEN(L) length(L)
|
||||
|
||||
// Null-safe L.Cut()
|
||||
#define LAZYCLEARLIST(L) if(L) L.Cut()
|
||||
|
||||
// Reads L or an empty list if L is not a list. Note: Does NOT assign, L may be an expression.
|
||||
#define SANITIZE_LIST(L) ( islist(L) ? L : list() )
|
||||
|
||||
#define reverseList(L) reverseRange(L.Copy())
|
||||
|
||||
// binary search sorted insert
|
||||
|
||||
@@ -237,17 +237,20 @@
|
||||
#define ANTAG_SHARED "Shared"
|
||||
#define ANTAG_KNOWN "Known"
|
||||
|
||||
// Job groups
|
||||
#define ROLE_COMMAND "command"
|
||||
#define ROLE_SECURITY "security"
|
||||
#define ROLE_ENGINEERING "engineering"
|
||||
#define ROLE_MEDICAL "medical"
|
||||
#define ROLE_RESEARCH "research"
|
||||
#define ROLE_CARGO "cargo"
|
||||
#define ROLE_CIVILIAN "civilian"
|
||||
#define ROLE_SYNTHETIC "synthetic"
|
||||
#define ROLE_UNKNOWN "unknown"
|
||||
#define ROLE_EVERYONE "everyone"
|
||||
// Departments.
|
||||
#define DEPARTMENT_COMMAND "Command"
|
||||
#define DEPARTMENT_SECURITY "Security"
|
||||
#define DEPARTMENT_ENGINEERING "Engineering"
|
||||
#define DEPARTMENT_MEDICAL "Medical"
|
||||
#define DEPARTMENT_RESEARCH "Research"
|
||||
#define DEPARTMENT_CARGO "Cargo"
|
||||
#define DEPARTMENT_CIVILIAN "Civilian"
|
||||
#define DEPARTMENT_PLANET "Planetside" // I hate having this be here and not in a SC file. Hopefully someday the manifest can be rewritten to be map-agnostic.
|
||||
#define DEPARTMENT_SYNTHETIC "Synthetic"
|
||||
|
||||
// These are mostly for the department guessing code and event system.
|
||||
#define DEPARTMENT_UNKNOWN "Unknown"
|
||||
#define DEPARTMENT_EVERYONE "Everyone"
|
||||
|
||||
// Canonical spellings of TSCs, so typos never have to happen again due to human error.
|
||||
#define TSC_NT "NanoTrasen"
|
||||
|
||||
@@ -69,6 +69,7 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G
|
||||
#define INIT_ORDER_XENOARCH -20
|
||||
#define INIT_ORDER_CIRCUIT -21
|
||||
#define INIT_ORDER_AI -22
|
||||
#define INIT_ORDER_JOB -23
|
||||
|
||||
|
||||
// Subsystem fire priority, from lowest to highest priority
|
||||
|
||||
@@ -34,12 +34,23 @@
|
||||
|
||||
// Sorts jobs by department, and then by flag within department
|
||||
/proc/cmp_job_datums(var/datum/job/a, var/datum/job/b)
|
||||
. = sorttext(b.department, a.department)
|
||||
if (. == 0) //Same department, push up if they're a head
|
||||
. = b.head_position - a.head_position
|
||||
if (. == 0) //Already in head/nothead spot, sort by name
|
||||
. = 0
|
||||
if( LAZYLEN(a.departments) && LAZYLEN(b.departments) )
|
||||
var/list/common_departments = a.departments & b.departments // Makes a list that contains only departments that were in both.
|
||||
if(!common_departments.len)
|
||||
. = sorttext(b.departments[1], a.departments[1])
|
||||
|
||||
if(. == 0) //Same department, push up if they're a head
|
||||
. = b.sorting_order - a.sorting_order
|
||||
|
||||
if(. == 0) //Already in same sorting order, sort by name
|
||||
. = sorttext(b.title, a.title)
|
||||
|
||||
/proc/cmp_department_datums(var/datum/department/a, var/datum/department/b)
|
||||
. = b.sorting_order - a.sorting_order // First, sort by the sorting order vars.
|
||||
if(. == 0) // If they have the same var, then sort by name.
|
||||
. = sorttext(b.name, a.name)
|
||||
|
||||
// Sorts entries in a performance stats list.
|
||||
/proc/cmp_generic_stat_item_time(list/A, list/B)
|
||||
. = B[STAT_ENTRY_TIME] - A[STAT_ENTRY_TIME]
|
||||
|
||||
108
code/controllers/subsystems/job.dm
Normal file
108
code/controllers/subsystems/job.dm
Normal file
@@ -0,0 +1,108 @@
|
||||
SUBSYSTEM_DEF(job)
|
||||
name = "Job"
|
||||
init_order = INIT_ORDER_JOB
|
||||
flags = SS_NO_FIRE
|
||||
|
||||
var/list/occupations = list() //List of all jobs
|
||||
var/list/datum/job/name_occupations = list() //Dict of all jobs, keys are titles
|
||||
var/list/type_occupations = list() //Dict of all jobs, keys are types
|
||||
|
||||
var/list/department_datums = list()
|
||||
var/debug_messages = FALSE
|
||||
|
||||
|
||||
/datum/controller/subsystem/job/Initialize(timeofday)
|
||||
if(!department_datums.len)
|
||||
setup_departments()
|
||||
if(!occupations.len)
|
||||
setup_occupations()
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/job/proc/setup_occupations(faction = "Station")
|
||||
occupations = list()
|
||||
var/list/all_jobs = subtypesof(/datum/job)
|
||||
if(!all_jobs.len)
|
||||
to_chat(world, span("warning", "Error setting up jobs, no job datums found"))
|
||||
return FALSE
|
||||
|
||||
for(var/J in all_jobs)
|
||||
var/datum/job/job = new J()
|
||||
if(!job)
|
||||
continue
|
||||
if(job.faction != faction)
|
||||
continue
|
||||
occupations += job
|
||||
name_occupations[job.title] = job
|
||||
type_occupations[J] = job
|
||||
if(LAZYLEN(job.departments))
|
||||
add_to_departments(job)
|
||||
|
||||
sortTim(occupations, /proc/cmp_job_datums)
|
||||
for(var/D in department_datums)
|
||||
var/datum/department/dept = department_datums[D]
|
||||
sortTim(dept.jobs, /proc/cmp_job_datums, TRUE)
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/controller/subsystem/job/proc/add_to_departments(datum/job/J)
|
||||
for(var/D in J.departments)
|
||||
var/datum/department/dept = LAZYACCESS(department_datums, D)
|
||||
if(!istype(dept))
|
||||
job_debug_message("Job '[J.title]' is defined as being inside department '[D]', but it does not exist.")
|
||||
continue
|
||||
dept.jobs[J.title] = J
|
||||
|
||||
/datum/controller/subsystem/job/proc/setup_departments()
|
||||
for(var/t in subtypesof(/datum/department))
|
||||
var/datum/department/D = new t()
|
||||
department_datums[D.name] = D
|
||||
|
||||
sortTim(department_datums, /proc/cmp_department_datums, TRUE)
|
||||
|
||||
/datum/controller/subsystem/job/proc/get_all_department_datums()
|
||||
var/list/dept_datums = list()
|
||||
for(var/D in department_datums)
|
||||
dept_datums += department_datums[D]
|
||||
return dept_datums
|
||||
|
||||
/datum/controller/subsystem/job/proc/get_job(rank)
|
||||
if(!occupations.len)
|
||||
setup_occupations()
|
||||
return name_occupations[rank]
|
||||
|
||||
/datum/controller/subsystem/job/proc/get_job_type(jobtype)
|
||||
if(!occupations.len)
|
||||
setup_occupations()
|
||||
return type_occupations[jobtype]
|
||||
|
||||
// Determines if a job title is inside of a specific department.
|
||||
// Useful to replace the old `if(job_title in command_positions)` code.
|
||||
/datum/controller/subsystem/job/proc/is_job_in_department(rank, target_department_name)
|
||||
var/datum/department/D = LAZYACCESS(department_datums, target_department_name)
|
||||
if(istype(D))
|
||||
return LAZYFIND(D.jobs, rank) ? TRUE : FALSE
|
||||
return FALSE
|
||||
|
||||
// Returns a list of all job names in a specific department.
|
||||
/datum/controller/subsystem/job/proc/get_job_titles_in_department(target_department_name)
|
||||
var/datum/department/D = LAZYACCESS(department_datums, target_department_name)
|
||||
if(istype(D))
|
||||
var/list/job_titles = list()
|
||||
for(var/J in D.jobs)
|
||||
job_titles += J
|
||||
return job_titles
|
||||
|
||||
job_debug_message("Was asked to get job titles for a non-existant department '[target_department_name]'.")
|
||||
return list()
|
||||
|
||||
|
||||
|
||||
// Someday it might be good to port code/game/jobs/job_controller.dm to here and clean it up.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/datum/controller/subsystem/job/proc/job_debug_message(message)
|
||||
if(debug_messages)
|
||||
log_debug("JOB DEBUG: [message]")
|
||||
@@ -54,25 +54,25 @@
|
||||
//to_world("[name]: [rank]")
|
||||
//cael - to prevent multiple appearances of a player/job combination, add a continue after each line
|
||||
var/department = 0
|
||||
if(real_rank in command_positions)
|
||||
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_COMMAND))
|
||||
heads[name] = rank
|
||||
department = 1
|
||||
if(real_rank in security_positions)
|
||||
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_SECURITY))
|
||||
sec[name] = rank
|
||||
department = 1
|
||||
if(real_rank in engineering_positions)
|
||||
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_ENGINEERING))
|
||||
eng[name] = rank
|
||||
department = 1
|
||||
if(real_rank in medical_positions)
|
||||
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_MEDICAL))
|
||||
med[name] = rank
|
||||
department = 1
|
||||
if(real_rank in science_positions)
|
||||
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_RESEARCH))
|
||||
sci[name] = rank
|
||||
department = 1
|
||||
if(real_rank in cargo_positions)
|
||||
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_CARGO))
|
||||
car[name] = rank
|
||||
department = 1
|
||||
if(real_rank in civilian_positions)
|
||||
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_CIVILIAN))
|
||||
civ[name] = rank
|
||||
department = 1
|
||||
if(!department && !(name in heads))
|
||||
|
||||
@@ -83,54 +83,54 @@ var/global/list/PDA_Manifest = list()
|
||||
var/isactive = t.fields["p_stat"]
|
||||
var/department = 0
|
||||
var/depthead = 0 // Department Heads will be placed at the top of their lists.
|
||||
if(real_rank in command_positions)
|
||||
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_COMMAND))
|
||||
heads[++heads.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
depthead = 1
|
||||
if(rank=="Colony Director" && heads.len != 1)
|
||||
heads.Swap(1,heads.len)
|
||||
|
||||
if(real_rank in security_positions)
|
||||
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_SECURITY))
|
||||
sec[++sec.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && sec.len != 1)
|
||||
sec.Swap(1,sec.len)
|
||||
|
||||
if(real_rank in engineering_positions)
|
||||
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_ENGINEERING))
|
||||
eng[++eng.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && eng.len != 1)
|
||||
eng.Swap(1,eng.len)
|
||||
|
||||
if(real_rank in medical_positions)
|
||||
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_MEDICAL))
|
||||
med[++med.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && med.len != 1)
|
||||
med.Swap(1,med.len)
|
||||
|
||||
if(real_rank in science_positions)
|
||||
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_RESEARCH))
|
||||
sci[++sci.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && sci.len != 1)
|
||||
sci.Swap(1,sci.len)
|
||||
|
||||
if(real_rank in planet_positions)
|
||||
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_PLANET))
|
||||
pla[++pla.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
|
||||
if(real_rank in cargo_positions)
|
||||
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_CARGO))
|
||||
car[++car.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && car.len != 1)
|
||||
car.Swap(1,car.len)
|
||||
|
||||
if(real_rank in civilian_positions)
|
||||
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_CARGO))
|
||||
civ[++civ.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && civ.len != 1)
|
||||
civ.Swap(1,civ.len)
|
||||
|
||||
if(real_rank in nonhuman_positions)
|
||||
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_SYNTHETIC))
|
||||
bot[++bot.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ var/datum/antagonist/loyalists/loyalists
|
||||
return
|
||||
global_objectives = list()
|
||||
for(var/mob/living/carbon/human/player in mob_list)
|
||||
if(!player.mind || player.stat==2 || !(player.mind.assigned_role in command_positions))
|
||||
if(!player.mind || player.stat==2 || !(SSjob.is_job_in_department(player.mind.assigned_role, DEPARTMENT_COMMAND)))
|
||||
continue
|
||||
var/datum/objective/protect/loyal_obj = new
|
||||
loyal_obj.target = player.mind
|
||||
|
||||
@@ -42,7 +42,7 @@ var/datum/antagonist/revolutionary/revs
|
||||
return
|
||||
global_objectives = list()
|
||||
for(var/mob/living/carbon/human/player in mob_list)
|
||||
if(!player.mind || player.stat==2 || !(player.mind.assigned_role in command_positions))
|
||||
if(!player.mind || player.stat==2 || !(SSjob.is_job_in_department(player.mind.assigned_role, DEPARTMENT_COMMAND)))
|
||||
continue
|
||||
var/datum/objective/rev/rev_obj = new
|
||||
rev_obj.target = player.mind
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/datum/job/assistant
|
||||
title = "Assistant"
|
||||
flag = ASSISTANT
|
||||
department = "Civilian"
|
||||
departments = list(DEPARTMENT_CIVILIAN)
|
||||
sorting_order = -1
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = -1
|
||||
|
||||
@@ -3,7 +3,8 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
||||
/datum/job/captain
|
||||
title = "Colony Director"
|
||||
flag = CAPTAIN
|
||||
department = "Command"
|
||||
departments = list(DEPARTMENT_COMMAND)
|
||||
sorting_order = 3 // Above everyone.
|
||||
head_position = 1
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
@@ -35,7 +36,8 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
||||
/datum/job/hop
|
||||
title = "Head of Personnel"
|
||||
flag = HOP
|
||||
department = "Command"
|
||||
departments = list(DEPARTMENT_CIVILIAN, DEPARTMENT_CARGO, DEPARTMENT_COMMAND)
|
||||
sorting_order = 2 // Above the QM, below captain.
|
||||
head_position = 1
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
@@ -69,7 +71,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
||||
/datum/job/secretary
|
||||
title = "Command Secretary"
|
||||
flag = BRIDGE
|
||||
department = "Command"
|
||||
departments = list(DEPARTMENT_COMMAND)
|
||||
head_position = 1
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/datum/job/bartender
|
||||
title = "Bartender"
|
||||
flag = BARTENDER
|
||||
department = "Civilian"
|
||||
departments = list(DEPARTMENT_CIVILIAN)
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
@@ -19,7 +19,7 @@
|
||||
/datum/job/chef
|
||||
title = "Chef"
|
||||
flag = CHEF
|
||||
department = "Civilian"
|
||||
departments = list(DEPARTMENT_CIVILIAN)
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
@@ -35,7 +35,7 @@
|
||||
/datum/job/hydro
|
||||
title = "Botanist"
|
||||
flag = BOTANIST
|
||||
department = "Civilian"
|
||||
departments = list(DEPARTMENT_CIVILIAN)
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
@@ -52,7 +52,8 @@
|
||||
/datum/job/qm
|
||||
title = "Quartermaster"
|
||||
flag = QUARTERMASTER
|
||||
department = "Cargo"
|
||||
departments = list(DEPARTMENT_CARGO)
|
||||
sorting_order = 1 // QM is above the cargo techs, but below the HoP.
|
||||
head_position = 1
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
@@ -72,7 +73,7 @@
|
||||
/datum/job/cargo_tech
|
||||
title = "Cargo Technician"
|
||||
flag = CARGOTECH
|
||||
department = "Cargo"
|
||||
departments = list(DEPARTMENT_CARGO)
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
@@ -87,7 +88,7 @@
|
||||
/datum/job/mining
|
||||
title = "Shaft Miner"
|
||||
flag = MINER
|
||||
department = "Cargo"
|
||||
departments = list(DEPARTMENT_CARGO)
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 3
|
||||
@@ -105,7 +106,7 @@
|
||||
/datum/job/janitor
|
||||
title = "Janitor"
|
||||
flag = JANITOR
|
||||
department = "Civilian"
|
||||
departments = list(DEPARTMENT_CIVILIAN)
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
@@ -122,7 +123,7 @@
|
||||
/datum/job/librarian
|
||||
title = "Librarian"
|
||||
flag = LIBRARIAN
|
||||
department = "Civilian"
|
||||
departments = list(DEPARTMENT_CIVILIAN)
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
@@ -139,7 +140,7 @@
|
||||
/datum/job/lawyer
|
||||
title = "Internal Affairs Agent"
|
||||
flag = LAWYER
|
||||
department = "Civilian"
|
||||
departments = list(DEPARTMENT_CIVILIAN)
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/datum/job/chaplain
|
||||
title = "Chaplain"
|
||||
flag = CHAPLAIN
|
||||
department = "Civilian"
|
||||
departments = list(DEPARTMENT_CIVILIAN)
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
|
||||
79
code/game/jobs/job/department.dm
Normal file
79
code/game/jobs/job/department.dm
Normal file
@@ -0,0 +1,79 @@
|
||||
// A datum that holds information about a specific department.
|
||||
// It is held inside, and managed by, the SSjob subsystem automatically,
|
||||
// just define a department, and put that department's name in one or more job datums' departments list.
|
||||
|
||||
/datum/department
|
||||
var/name = "NOPE" // Name used in UIs, and the index for the department assoc list in SSjob.
|
||||
var/short_name = "NO" // Shorter name, used for things like external Topic() responses.
|
||||
var/color = "#000000" // Color to use in UIs to represent this department.
|
||||
var/list/jobs = list() // Assoc list. Key is the job title, and the value is a reference to the job datum. Populated by SSjob subsystem.
|
||||
var/sorting_order = 0 // Used to sort departments, e.g. Command always being on top.
|
||||
var/visible = TRUE // If false, it should not show up on things like the manifest or ID computer.
|
||||
var/assignable = TRUE // Similar for above, but only for ID computers and such. Used for silicon department.
|
||||
var/centcom_only = FALSE
|
||||
|
||||
/datum/department/command
|
||||
name = DEPARTMENT_COMMAND
|
||||
short_name = "Heads"
|
||||
color = "#3333FF"
|
||||
sorting_order = 10
|
||||
|
||||
/datum/department/security
|
||||
name = DEPARTMENT_SECURITY
|
||||
short_name = "Sec"
|
||||
color = "#8E0000"
|
||||
sorting_order = 6
|
||||
|
||||
/datum/department/engineering
|
||||
name = DEPARTMENT_ENGINEERING
|
||||
short_name = "Eng"
|
||||
color = "#B27300"
|
||||
sorting_order = 5
|
||||
|
||||
/datum/department/medical
|
||||
name = DEPARTMENT_MEDICAL
|
||||
short_name = "Med"
|
||||
color = "#006600"
|
||||
sorting_order = 4
|
||||
|
||||
/datum/department/research
|
||||
name = DEPARTMENT_RESEARCH
|
||||
short_name = "Sci"
|
||||
color = "#A65BA6"
|
||||
sorting_order = 3
|
||||
|
||||
/datum/department/cargo
|
||||
name = DEPARTMENT_CARGO
|
||||
short_name = "Car"
|
||||
color = "#BB9040"
|
||||
sorting_order = 2
|
||||
|
||||
/datum/department/civilian
|
||||
name = DEPARTMENT_CIVILIAN
|
||||
short_name = "Civ"
|
||||
color = "#A32800"
|
||||
sorting_order = 1
|
||||
|
||||
// Mostly for if someone wanted to rewrite manifest code to be map-agnostic.
|
||||
/datum/department/misc
|
||||
name = "Miscellaneous"
|
||||
short_name = "Misc"
|
||||
color = "#666666"
|
||||
sorting_order = 0
|
||||
assignable = FALSE
|
||||
|
||||
/datum/department/synthetic
|
||||
name = DEPARTMENT_SYNTHETIC
|
||||
short_name = "Bot"
|
||||
color = "#222222"
|
||||
sorting_order = -1
|
||||
assignable = FALSE
|
||||
|
||||
// This one isn't very useful since no real centcom jobs exist yet.
|
||||
// Instead the jobs like ERT are hardcoded in.
|
||||
/datum/department/centcom
|
||||
name = "Central Command"
|
||||
short_name = "Centcom"
|
||||
color = "#A52A2A"
|
||||
sorting_order = 20 // Above Command.
|
||||
centcom_only = TRUE
|
||||
@@ -2,7 +2,8 @@
|
||||
title = "Chief Engineer"
|
||||
flag = CHIEF
|
||||
head_position = 1
|
||||
department = "Engineering"
|
||||
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_COMMAND)
|
||||
sorting_order = 2
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
@@ -31,7 +32,7 @@
|
||||
/datum/job/engineer
|
||||
title = "Station Engineer"
|
||||
flag = ENGINEER
|
||||
department = "Engineering"
|
||||
departments = list(DEPARTMENT_ENGINEERING)
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 5
|
||||
@@ -50,7 +51,7 @@
|
||||
/datum/job/atmos
|
||||
title = "Atmospheric Technician"
|
||||
flag = ATMOSTECH
|
||||
department = "Engineering"
|
||||
departments = list(DEPARTMENT_ENGINEERING)
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 3
|
||||
|
||||
@@ -16,8 +16,10 @@
|
||||
var/list/alt_titles // List of alternate titles, if any
|
||||
var/req_admin_notify // 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/minimal_player_age = 0 // 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/department = null // Does this position have a department tag?
|
||||
var/list/departments = list() // List of departments this job belongs to, if any. The first one on the list will be the 'primary' department.
|
||||
var/sorting_order = 0 // Used for sorting jobs so boss jobs go above regular ones, and their boss's boss is above that. Higher numbers = higher in sorting.
|
||||
var/head_position = 0 // Is this position Command?
|
||||
var/assignable = TRUE // Should it show up on things like the ID computer?
|
||||
var/minimum_character_age = 0
|
||||
var/ideal_character_age = 30
|
||||
var/has_headset = TRUE //Do people with this job need to be given headsets and told how to use them? E.g. Cyborgs don't.
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
title = "Chief Medical Officer"
|
||||
flag = CMO
|
||||
head_position = 1
|
||||
department = "Medical"
|
||||
departments = list(DEPARTMENT_MEDICAL, DEPARTMENT_COMMAND)
|
||||
sorting_order = 2
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
@@ -27,7 +28,7 @@
|
||||
/datum/job/doctor
|
||||
title = "Medical Doctor"
|
||||
flag = DOCTOR
|
||||
department = "Medical"
|
||||
departments = list(DEPARTMENT_MEDICAL)
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 5
|
||||
@@ -48,7 +49,7 @@
|
||||
/datum/job/chemist
|
||||
title = "Chemist"
|
||||
flag = CHEMIST
|
||||
department = "Medical"
|
||||
departments = list(DEPARTMENT_MEDICAL)
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
@@ -68,7 +69,7 @@
|
||||
/datum/job/geneticist
|
||||
title = "Geneticist"
|
||||
flag = GENETICIST
|
||||
department = "Medical"
|
||||
departments = list(DEPARTMENT_MEDICAL, DEPARTMENT_RESEARCH)
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 0
|
||||
@@ -85,7 +86,7 @@
|
||||
/datum/job/psychiatrist
|
||||
title = "Psychiatrist"
|
||||
flag = PSYCHIATRIST
|
||||
department = "Medical"
|
||||
departments = list(DEPARTMENT_MEDICAL)
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
@@ -101,7 +102,7 @@
|
||||
/datum/job/paramedic
|
||||
title = "Paramedic"
|
||||
flag = PARAMEDIC
|
||||
department = "Medical"
|
||||
departments = list(DEPARTMENT_MEDICAL)
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
title = "Research Director"
|
||||
flag = RD
|
||||
head_position = 1
|
||||
department = "Science"
|
||||
departments = list(DEPARTMENT_RESEARCH, DEPARTMENT_COMMAND)
|
||||
sorting_order = 2
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
@@ -30,7 +31,7 @@
|
||||
/datum/job/scientist
|
||||
title = "Scientist"
|
||||
flag = SCIENTIST
|
||||
department = "Science"
|
||||
departments = list(DEPARTMENT_RESEARCH)
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 5
|
||||
@@ -49,7 +50,7 @@
|
||||
/datum/job/xenobiologist
|
||||
title = "Xenobiologist"
|
||||
flag = XENOBIOLOGIST
|
||||
department = "Science"
|
||||
departments = list(DEPARTMENT_RESEARCH)
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 3
|
||||
@@ -68,7 +69,7 @@
|
||||
/datum/job/roboticist
|
||||
title = "Roboticist"
|
||||
flag = ROBOTICIST
|
||||
department = "Science"
|
||||
departments = list(DEPARTMENT_RESEARCH)
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
title = "Head of Security"
|
||||
flag = HOS
|
||||
head_position = 1
|
||||
department = "Security"
|
||||
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_COMMAND)
|
||||
sorting_order = 2
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
@@ -28,7 +29,8 @@
|
||||
/datum/job/warden
|
||||
title = "Warden"
|
||||
flag = WARDEN
|
||||
department = "Security"
|
||||
departments = list(DEPARTMENT_SECURITY)
|
||||
sorting_order = 1
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 1
|
||||
@@ -44,7 +46,7 @@
|
||||
/datum/job/detective
|
||||
title = "Detective"
|
||||
flag = DETECTIVE
|
||||
department = "Security"
|
||||
departments = list(DEPARTMENT_SECURITY)
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
@@ -61,7 +63,7 @@
|
||||
/datum/job/officer
|
||||
title = "Security Officer"
|
||||
flag = OFFICER
|
||||
department = "Security"
|
||||
departments = list(DEPARTMENT_SECURITY)
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 4
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
/datum/job/ai
|
||||
title = "AI"
|
||||
flag = AI
|
||||
departments = list(DEPARTMENT_SYNTHETIC)
|
||||
sorting_order = 1 // Be above their borgs.
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 0 // Not used for AI, see is_position_available below and modules/mob/living/silicon/ai/latejoin.dm
|
||||
@@ -12,6 +14,7 @@
|
||||
account_allowed = 0
|
||||
economic_modifier = 0
|
||||
has_headset = FALSE
|
||||
assignable = FALSE
|
||||
|
||||
/datum/job/ai/equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
@@ -28,6 +31,7 @@
|
||||
/datum/job/cyborg
|
||||
title = "Cyborg"
|
||||
flag = CYBORG
|
||||
departments = list(DEPARTMENT_SYNTHETIC)
|
||||
department_flag = ENGSEC
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
@@ -39,6 +43,7 @@
|
||||
account_allowed = 0
|
||||
economic_modifier = 0
|
||||
has_headset = FALSE
|
||||
assignable = FALSE
|
||||
|
||||
/datum/job/cyborg/equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
|
||||
@@ -113,7 +113,7 @@ var/global/datum/controller/occupations/job_master
|
||||
if(istype(job, GetJob("Assistant"))) // We don't want to give him assistant, that's boring!
|
||||
continue
|
||||
|
||||
if(job.title in command_positions) //If you want a command position, select it!
|
||||
if(SSjob.is_job_in_department(job.title, DEPARTMENT_COMMAND)) //If you want a command position, select it!
|
||||
continue
|
||||
|
||||
if(jobban_isbanned(player, job.title))
|
||||
@@ -143,7 +143,7 @@ var/global/datum/controller/occupations/job_master
|
||||
///This proc is called before the level loop of DivideOccupations() and will try to select a head, ignoring ALL non-head preferences for every level until it locates a head or runs out of levels to check
|
||||
proc/FillHeadPosition()
|
||||
for(var/level = 1 to 3)
|
||||
for(var/command_position in command_positions)
|
||||
for(var/command_position in SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND))
|
||||
var/datum/job/job = GetJob(command_position)
|
||||
if(!job) continue
|
||||
var/list/candidates = FindOccupationCandidates(job, level)
|
||||
@@ -183,7 +183,7 @@ var/global/datum/controller/occupations/job_master
|
||||
|
||||
///This proc is called at the start of the level loop of DivideOccupations() and will cause head jobs to be checked before any other jobs of the same level
|
||||
proc/CheckHeadPositions(var/level)
|
||||
for(var/command_position in command_positions)
|
||||
for(var/command_position in SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND))
|
||||
var/datum/job/job = GetJob(command_position)
|
||||
if(!job) continue
|
||||
var/list/candidates = FindOccupationCandidates(job, level)
|
||||
@@ -421,9 +421,9 @@ var/global/datum/controller/occupations/job_master
|
||||
log_game("JOINED [key_name(H)] as \"[rank]\"")
|
||||
|
||||
// If they're head, give them the account info for their department
|
||||
if(H.mind && job.head_position)
|
||||
if(H.mind && job.head_position && LAZYLEN(job.departments))
|
||||
var/remembered_info = ""
|
||||
var/datum/money_account/department_account = department_accounts[job.department]
|
||||
var/datum/money_account/department_account = department_accounts[job.departments[1]]
|
||||
|
||||
if(department_account)
|
||||
remembered_info += "<b>Your department's account number is:</b> #[department_account.account_number]<br>"
|
||||
|
||||
@@ -44,91 +44,8 @@ var/const/CHAPLAIN =(1<<10)
|
||||
var/const/ASSISTANT =(1<<11)
|
||||
var/const/BRIDGE =(1<<12)
|
||||
|
||||
|
||||
var/list/assistant_occupations = list(
|
||||
)
|
||||
|
||||
|
||||
var/list/command_positions = list(
|
||||
"Colony Director",
|
||||
"Head of Personnel",
|
||||
"Head of Security",
|
||||
"Chief Engineer",
|
||||
"Research Director",
|
||||
"Chief Medical Officer",
|
||||
"Command Secretary"
|
||||
)
|
||||
|
||||
|
||||
var/list/engineering_positions = list(
|
||||
"Chief Engineer",
|
||||
"Station Engineer",
|
||||
"Atmospheric Technician",
|
||||
)
|
||||
|
||||
|
||||
var/list/medical_positions = list(
|
||||
"Chief Medical Officer",
|
||||
"Medical Doctor",
|
||||
"Geneticist",
|
||||
"Psychiatrist",
|
||||
"Chemist",
|
||||
"Paramedic"
|
||||
)
|
||||
|
||||
|
||||
var/list/science_positions = list(
|
||||
"Research Director",
|
||||
"Scientist",
|
||||
"Geneticist", //Part of both medical and science
|
||||
"Roboticist",
|
||||
"Xenobiologist"
|
||||
)
|
||||
|
||||
//BS12 EDIT
|
||||
var/list/cargo_positions = list(
|
||||
"Quartermaster",
|
||||
"Cargo Technician",
|
||||
"Shaft Miner"
|
||||
)
|
||||
|
||||
var/list/civilian_positions = list(
|
||||
"Head of Personnel",
|
||||
"Bartender",
|
||||
"Botanist",
|
||||
"Chef",
|
||||
"Janitor",
|
||||
"Librarian",
|
||||
"Lawyer",
|
||||
"Chaplain",
|
||||
"Assistant"
|
||||
)
|
||||
|
||||
|
||||
var/list/security_positions = list(
|
||||
"Head of Security",
|
||||
"Warden",
|
||||
"Detective",
|
||||
"Security Officer"
|
||||
)
|
||||
|
||||
|
||||
var/list/planet_positions = list(
|
||||
"Explorer",
|
||||
"Pilot",
|
||||
"Search and Rescue"
|
||||
)
|
||||
|
||||
|
||||
var/list/nonhuman_positions = list(
|
||||
"AI",
|
||||
"Cyborg",
|
||||
"pAI"
|
||||
)
|
||||
|
||||
|
||||
/proc/guest_jobbans(var/job)
|
||||
return ((job in command_positions) || (job in nonhuman_positions) || (job in security_positions))
|
||||
return ( (job in SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND)) || (job in SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC)) || (job in SSjob.get_job_titles_in_department(DEPARTMENT_SECURITY)) )
|
||||
|
||||
/proc/get_job_datums()
|
||||
var/list/occupations = list()
|
||||
|
||||
@@ -101,17 +101,18 @@
|
||||
data["centcom_access"] = is_centcom()
|
||||
data["all_centcom_access"] = null
|
||||
data["regions"] = null
|
||||
data["id_rank"] = modify && modify.assignment ? modify.assignment : "Unassigned"
|
||||
|
||||
data["jobs"] = list(
|
||||
list("cat" = "Engineering", "jobs" = format_jobs(engineering_positions)),
|
||||
list("cat" = "Medical", "jobs" = format_jobs(medical_positions)),
|
||||
list("cat" = "Science", "jobs" = format_jobs(science_positions)),
|
||||
list("cat" = "Security", "jobs" = format_jobs(security_positions)),
|
||||
list("cat" = "Cargo", "jobs" = format_jobs(cargo_positions)),
|
||||
list("cat" = "Planetside", "jobs" = format_jobs(planet_positions)),
|
||||
list("cat" = "Civilian", "jobs" = format_jobs(civilian_positions)),
|
||||
list("cat" = "CentCom", "jobs" = format_jobs(get_all_centcom_jobs()))
|
||||
)
|
||||
var/list/departments = list()
|
||||
for(var/D in SSjob.get_all_department_datums())
|
||||
var/datum/department/dept = D
|
||||
if(!dept.assignable) // No AI ID cards for you.
|
||||
continue
|
||||
if(dept.centcom_only && !is_centcom())
|
||||
continue
|
||||
departments[++departments.len] = list("department_name" = dept.name, "jobs" = format_jobs(SSjob.get_job_titles_in_department(dept.name)) )
|
||||
|
||||
data["departments"] = departments
|
||||
|
||||
if (modify && is_centcom())
|
||||
var/list/all_centcom_access = list()
|
||||
@@ -208,16 +209,10 @@
|
||||
if(is_centcom())
|
||||
access = get_centcom_access(t1)
|
||||
else
|
||||
var/datum/job/jobdatum
|
||||
for(var/jobtype in typesof(/datum/job))
|
||||
var/datum/job/J = new jobtype
|
||||
if(ckey(J.title) == ckey(t1))
|
||||
jobdatum = J
|
||||
break
|
||||
var/datum/job/jobdatum = SSjob.get_job(t1)
|
||||
if(!jobdatum)
|
||||
to_chat(usr, "<span class='warning'>No log exists for this job: [t1]</span>")
|
||||
return
|
||||
|
||||
access = jobdatum.get_access()
|
||||
|
||||
modify.access = access
|
||||
|
||||
@@ -148,14 +148,14 @@ var/world_topic_spam_protect_time = world.timeofday
|
||||
else if(T == "manifest")
|
||||
var/list/positions = list()
|
||||
var/list/set_names = list(
|
||||
"heads" = command_positions,
|
||||
"sec" = security_positions,
|
||||
"eng" = engineering_positions,
|
||||
"med" = medical_positions,
|
||||
"sci" = science_positions,
|
||||
"car" = cargo_positions,
|
||||
"civ" = civilian_positions,
|
||||
"bot" = nonhuman_positions
|
||||
"heads" = SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND),
|
||||
"sec" = SSjob.get_job_titles_in_department(DEPARTMENT_SECURITY),
|
||||
"eng" = SSjob.get_job_titles_in_department(DEPARTMENT_ENGINEERING),
|
||||
"med" = SSjob.get_job_titles_in_department(DEPARTMENT_MEDICAL),
|
||||
"sci" = SSjob.get_job_titles_in_department(DEPARTMENT_RESEARCH),
|
||||
"car" = SSjob.get_job_titles_in_department(DEPARTMENT_CARGO),
|
||||
"civ" = SSjob.get_job_titles_in_department(DEPARTMENT_CIVILIAN),
|
||||
"bot" = SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC)
|
||||
)
|
||||
|
||||
for(var/datum/data/record/t in data_core.general)
|
||||
|
||||
@@ -300,7 +300,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
output += "<option value=''>--</option>"
|
||||
for(var/j in get_all_jobs())
|
||||
output += "<option value='[j]'>[j]</option>"
|
||||
for(var/j in nonhuman_positions)
|
||||
for(var/j in SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC))
|
||||
output += "<option value='[j]'>[j]</option>"
|
||||
var/list/bantypes = list("traitor","changeling","operative","revolutionary","cultist","wizard") //For legacy bans.
|
||||
for(var/antag_type in all_antag_types) // Grab other bans.
|
||||
|
||||
@@ -394,8 +394,8 @@
|
||||
//Regular jobs
|
||||
//Command (Blue)
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr align='center' bgcolor='ccccff'><th colspan='[length(command_positions)]'><a href='?src=\ref[src];jobban3=commanddept;jobban4=\ref[M]'>Command Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in command_positions)
|
||||
jobs += "<tr align='center' bgcolor='ccccff'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND))]'><a href='?src=\ref[src];jobban3=commanddept;jobban4=\ref[M]'>Command Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND))
|
||||
if(!jobPos) continue
|
||||
var/datum/job/job = job_master.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
@@ -415,8 +415,8 @@
|
||||
//Security (Red)
|
||||
counter = 0
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='ffddf0'><th colspan='[length(security_positions)]'><a href='?src=\ref[src];jobban3=securitydept;jobban4=\ref[M]'>Security Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in security_positions)
|
||||
jobs += "<tr bgcolor='ffddf0'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_SECURITY))]'><a href='?src=\ref[src];jobban3=securitydept;jobban4=\ref[M]'>Security Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_SECURITY))
|
||||
if(!jobPos) continue
|
||||
var/datum/job/job = job_master.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
@@ -436,8 +436,8 @@
|
||||
//Engineering (Yellow)
|
||||
counter = 0
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='fff5cc'><th colspan='[length(engineering_positions)]'><a href='?src=\ref[src];jobban3=engineeringdept;jobban4=\ref[M]'>Engineering Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in engineering_positions)
|
||||
jobs += "<tr bgcolor='fff5cc'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_ENGINEERING))]'><a href='?src=\ref[src];jobban3=engineeringdept;jobban4=\ref[M]'>Engineering Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_ENGINEERING))
|
||||
if(!jobPos) continue
|
||||
var/datum/job/job = job_master.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
@@ -457,8 +457,8 @@
|
||||
//Cargo (Yellow)
|
||||
counter = 0
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='fff5cc'><th colspan='[length(cargo_positions)]'><a href='?src=\ref[src];jobban3=cargodept;jobban4=\ref[M]'>Cargo Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in cargo_positions)
|
||||
jobs += "<tr bgcolor='fff5cc'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_CARGO))]'><a href='?src=\ref[src];jobban3=cargodept;jobban4=\ref[M]'>Cargo Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_CARGO))
|
||||
if(!jobPos) continue
|
||||
var/datum/job/job = job_master.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
@@ -478,8 +478,8 @@
|
||||
//Medical (White)
|
||||
counter = 0
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='ffeef0'><th colspan='[length(medical_positions)]'><a href='?src=\ref[src];jobban3=medicaldept;jobban4=\ref[M]'>Medical Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in medical_positions)
|
||||
jobs += "<tr bgcolor='ffeef0'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_MEDICAL))]'><a href='?src=\ref[src];jobban3=medicaldept;jobban4=\ref[M]'>Medical Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_MEDICAL))
|
||||
if(!jobPos) continue
|
||||
var/datum/job/job = job_master.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
@@ -499,8 +499,8 @@
|
||||
//Science (Purple)
|
||||
counter = 0
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='e79fff'><th colspan='[length(science_positions)]'><a href='?src=\ref[src];jobban3=sciencedept;jobban4=\ref[M]'>Science Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in science_positions)
|
||||
jobs += "<tr bgcolor='e79fff'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_RESEARCH))]'><a href='?src=\ref[src];jobban3=sciencedept;jobban4=\ref[M]'>Science Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_RESEARCH))
|
||||
if(!jobPos) continue
|
||||
var/datum/job/job = job_master.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
@@ -520,8 +520,8 @@
|
||||
//Civilian (Grey)
|
||||
counter = 0
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='dddddd'><th colspan='[length(civilian_positions)]'><a href='?src=\ref[src];jobban3=civiliandept;jobban4=\ref[M]'>Civilian Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in civilian_positions)
|
||||
jobs += "<tr bgcolor='dddddd'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_CIVILIAN))]'><a href='?src=\ref[src];jobban3=civiliandept;jobban4=\ref[M]'>Civilian Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_CIVILIAN))
|
||||
if(!jobPos) continue
|
||||
var/datum/job/job = job_master.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
@@ -547,8 +547,8 @@
|
||||
//Non-Human (Green)
|
||||
counter = 0
|
||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
||||
jobs += "<tr bgcolor='ccffcc'><th colspan='[length(nonhuman_positions)+1]'><a href='?src=\ref[src];jobban3=nonhumandept;jobban4=\ref[M]'>Non-human Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in nonhuman_positions)
|
||||
jobs += "<tr bgcolor='ccffcc'><th colspan='[length(SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC))+1]'><a href='?src=\ref[src];jobban3=nonhumandept;jobban4=\ref[M]'>Non-human Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC))
|
||||
if(!jobPos) continue
|
||||
var/datum/job/job = job_master.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
@@ -635,50 +635,50 @@
|
||||
var/list/joblist = list()
|
||||
switch(href_list["jobban3"])
|
||||
if("commanddept")
|
||||
for(var/jobPos in command_positions)
|
||||
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND))
|
||||
if(!jobPos) continue
|
||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
joblist += temp.title
|
||||
if("securitydept")
|
||||
for(var/jobPos in security_positions)
|
||||
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_SECURITY))
|
||||
if(!jobPos) continue
|
||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
joblist += temp.title
|
||||
if("engineeringdept")
|
||||
for(var/jobPos in engineering_positions)
|
||||
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_ENGINEERING))
|
||||
if(!jobPos) continue
|
||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
joblist += temp.title
|
||||
if("cargodept")
|
||||
for(var/jobPos in cargo_positions)
|
||||
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_CARGO))
|
||||
if(!jobPos) continue
|
||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
joblist += temp.title
|
||||
if("medicaldept")
|
||||
for(var/jobPos in medical_positions)
|
||||
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_MEDICAL))
|
||||
if(!jobPos) continue
|
||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
joblist += temp.title
|
||||
if("sciencedept")
|
||||
for(var/jobPos in science_positions)
|
||||
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_RESEARCH))
|
||||
if(!jobPos) continue
|
||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
joblist += temp.title
|
||||
if("civiliandept")
|
||||
for(var/jobPos in civilian_positions)
|
||||
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_CIVILIAN))
|
||||
if(!jobPos) continue
|
||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
joblist += temp.title
|
||||
if("nonhumandept")
|
||||
joblist += "pAI"
|
||||
for(var/jobPos in nonhuman_positions)
|
||||
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC))
|
||||
if(!jobPos) continue
|
||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
if((pref.job_civilian_low & ASSISTANT) && job.type != /datum/job/assistant)
|
||||
. += "<font color=grey>[rank]</font></td><td></td></tr>"
|
||||
continue
|
||||
if((rank in command_positions) || (rank == "AI"))//Bold head jobs
|
||||
if((rank in SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND) ) || (rank == "AI"))//Bold head jobs
|
||||
. += "<b>[rank]</b>"
|
||||
else
|
||||
. += "[rank]"
|
||||
|
||||
@@ -206,16 +206,16 @@ var/list/event_last_fired = list()
|
||||
else if(istype(R.module, /obj/item/weapon/robot_module/robot/research))
|
||||
active_with_role["Scientist"]++
|
||||
|
||||
if(M.mind.assigned_role in engineering_positions)
|
||||
if(M.mind.assigned_role in SSjob.get_job_titles_in_department(DEPARTMENT_ENGINEERING))
|
||||
active_with_role["Engineer"]++
|
||||
|
||||
if(M.mind.assigned_role in medical_positions)
|
||||
if(M.mind.assigned_role in SSjob.get_job_titles_in_department(DEPARTMENT_MEDICAL))
|
||||
active_with_role["Medical"]++
|
||||
|
||||
if(M.mind.assigned_role in security_positions)
|
||||
if(M.mind.assigned_role in SSjob.get_job_titles_in_department(DEPARTMENT_SECURITY))
|
||||
active_with_role["Security"]++
|
||||
|
||||
if(M.mind.assigned_role in science_positions)
|
||||
if(M.mind.assigned_role in SSjob.get_job_titles_in_department(DEPARTMENT_RESEARCH))
|
||||
active_with_role["Scientist"]++
|
||||
|
||||
if(M.mind.assigned_role == "AI")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/atmos_leak
|
||||
name = "atmospherics leak"
|
||||
departments = list(ROLE_ENGINEERING, ROLE_SYNTHETIC)
|
||||
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_SYNTHETIC)
|
||||
var/area/target_area // Chosen target area
|
||||
var/area/target_turf // Chosen target turf in target_area
|
||||
var/gas_type // Chosen gas to release
|
||||
@@ -74,4 +74,4 @@
|
||||
playsound(target_turf, 'sound/effects/smoke.ogg', 50, 1)
|
||||
|
||||
/datum/gm_action/atmos_leak/get_weight()
|
||||
return 15 + (metric.count_people_in_department(ROLE_ENGINEERING) * 10 + metric.count_people_in_department(ROLE_SYNTHETIC) * 30) // Synthetics are counted in higher value because they can wirelessly connect to alarms.
|
||||
return 15 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10 + metric.count_people_in_department(DEPARTMENT_SYNTHETIC) * 30) // Synthetics are counted in higher value because they can wirelessly connect to alarms.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/blob
|
||||
name = "blob infestation"
|
||||
departments = list(ROLE_ENGINEERING, ROLE_SECURITY, ROLE_MEDICAL)
|
||||
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_SECURITY, DEPARTMENT_MEDICAL)
|
||||
chaotic = 25
|
||||
|
||||
var/list/area/excluded = list(
|
||||
@@ -62,9 +62,9 @@
|
||||
command_announcement.Announce("Confirmed outbreak of level 7 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
|
||||
|
||||
/datum/gm_action/blob/get_weight()
|
||||
var/engineers = metric.count_people_in_department(ROLE_ENGINEERING)
|
||||
var/security = metric.count_people_in_department(ROLE_SECURITY)
|
||||
var/medical = metric.count_people_in_department(ROLE_MEDICAL)
|
||||
var/engineers = metric.count_people_in_department(DEPARTMENT_ENGINEERING)
|
||||
var/security = metric.count_people_in_department(DEPARTMENT_SECURITY)
|
||||
var/medical = metric.count_people_in_department(DEPARTMENT_MEDICAL)
|
||||
|
||||
var/assigned_staff = engineers + security
|
||||
if(engineers || security) // Medical only counts if one of the other two exists, and even then they count as half.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/datum/gm_action/brand_intelligence
|
||||
name = "rampant vending machines"
|
||||
length = 30 MINUTES
|
||||
departments = list(ROLE_ENGINEERING, ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_EVERYONE)
|
||||
|
||||
var/list/obj/machinery/vending/vendingMachines = list()
|
||||
var/list/obj/machinery/vending/infectedVendingMachines = list()
|
||||
@@ -66,4 +66,4 @@
|
||||
infectedMachine.shoot_inventory = 0
|
||||
|
||||
/datum/gm_action/brand_intelligence/get_weight()
|
||||
return 60 + (metric.count_people_in_department(ROLE_ENGINEERING) * 20)
|
||||
return 60 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/datum/gm_action/camera_damage
|
||||
name = "random camera damage"
|
||||
reusable = TRUE
|
||||
departments = list(ROLE_SYNTHETIC, ROLE_ENGINEERING)
|
||||
departments = list(DEPARTMENT_SYNTHETIC, DEPARTMENT_ENGINEERING)
|
||||
|
||||
/datum/gm_action/camera_damage/start()
|
||||
var/obj/machinery/camera/C = acquire_random_camera()
|
||||
@@ -49,4 +49,4 @@
|
||||
return T && C.can_use() && istype(C.loc, /turf) && (T.z in using_map.player_levels)
|
||||
|
||||
/datum/gm_action/camera_damage/get_weight()
|
||||
return 40 + (metric.count_people_in_department(ROLE_ENGINEERING) * 20) + (metric.count_people_in_department(ROLE_SYNTHETIC) * 40)
|
||||
return 40 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20) + (metric.count_people_in_department(DEPARTMENT_SYNTHETIC) * 40)
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
/datum/gm_action/canister_leak
|
||||
name = "Canister Leak"
|
||||
departments = list(ROLE_ENGINEERING)
|
||||
departments = list(DEPARTMENT_ENGINEERING)
|
||||
chaotic = 20
|
||||
|
||||
/datum/gm_action/canister_leak/get_weight()
|
||||
return metric.count_people_in_department(ROLE_ENGINEERING) * 30
|
||||
return metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 30
|
||||
|
||||
/datum/gm_action/canister_leak/start()
|
||||
..()
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
//carp_migration
|
||||
/datum/gm_action/carp_migration
|
||||
name = "carp migration"
|
||||
departments = list(ROLE_SECURITY, ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_EVERYONE)
|
||||
chaotic = 50
|
||||
var/list/spawned_carp = list()
|
||||
var/carp_amount = 0
|
||||
length = 20 MINUTES
|
||||
|
||||
/datum/gm_action/carp_migration/get_weight()
|
||||
return 50 + (metric.count_people_in_department(ROLE_SECURITY) * 10) + (metric.count_all_space_mobs() * 20)
|
||||
return 50 + (metric.count_people_in_department(DEPARTMENT_SECURITY) * 10) + (metric.count_all_space_mobs() * 20)
|
||||
|
||||
/datum/gm_action/carp_migration/announce()
|
||||
var/announcement = "Unknown biological entities have been detected near [station_name()], please stand-by."
|
||||
@@ -17,12 +17,12 @@
|
||||
/datum/gm_action/carp_migration/set_up()
|
||||
// Higher filled roles means more groups of fish.
|
||||
var/station_strength = 0
|
||||
station_strength += (metric.count_people_in_department(ROLE_SECURITY) * 3)
|
||||
station_strength += (metric.count_people_in_department(ROLE_ENGINEERING) * 2)
|
||||
station_strength += metric.count_people_in_department(ROLE_MEDICAL)
|
||||
station_strength += (metric.count_people_in_department(DEPARTMENT_SECURITY) * 3)
|
||||
station_strength += (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 2)
|
||||
station_strength += metric.count_people_in_department(DEPARTMENT_MEDICAL)
|
||||
|
||||
// Less active emergency response departments tones the event down.
|
||||
var/activeness = ((metric.assess_department(ROLE_SECURITY) + metric.assess_department(ROLE_ENGINEERING) + metric.assess_department(ROLE_MEDICAL)) / 3)
|
||||
var/activeness = ((metric.assess_department(DEPARTMENT_SECURITY) + metric.assess_department(DEPARTMENT_ENGINEERING) + metric.assess_department(DEPARTMENT_MEDICAL)) / 3)
|
||||
activeness = max(activeness, 20)
|
||||
|
||||
carp_amount = CEILING(station_strength * (activeness / 100) + 1, 1)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/datum/gm_action/comms_blackout
|
||||
name = "communications blackout"
|
||||
departments = list(ROLE_ENGINEERING, ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_EVERYONE)
|
||||
chaotic = 35
|
||||
|
||||
/datum/gm_action/comms_blackout/get_weight()
|
||||
return 50 + (metric.count_people_in_department(ROLE_ENGINEERING) * 40)
|
||||
return 50 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 40)
|
||||
|
||||
/datum/gm_action/comms_blackout/announce()
|
||||
if(prob(33))
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/datum/gm_action/security_drill
|
||||
name = "security drills"
|
||||
departments = list(ROLE_SECURITY, ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_EVERYONE)
|
||||
|
||||
/datum/gm_action/security_drill/announce()
|
||||
spawn(rand(1 MINUTE, 2 MINUTES))
|
||||
command_announcement.Announce("[pick("A NanoTrasen security director", "A Vir-Gov correspondant", "Local Sif authoritiy")] has advised the enactment of [pick("a rampant wildlife", "a fire", "a hostile boarding", "a nonstandard", "a bomb", "an emergent intelligence")] drill with the personnel onboard \the [station_name()].", "Security Advisement")
|
||||
|
||||
/datum/gm_action/security_drill/get_weight()
|
||||
return max(-20, 10 + gm.staleness - (gm.danger * 2)) + (metric.count_people_in_department(ROLE_SECURITY) * 5) + (metric.count_people_in_department(ROLE_EVERYONE) * 1.5)
|
||||
return max(-20, 10 + gm.staleness - (gm.danger * 2)) + (metric.count_people_in_department(DEPARTMENT_SECURITY) * 5) + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 1.5)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/dust
|
||||
name = "dust"
|
||||
departments = list(ROLE_ENGINEERING)
|
||||
departments = list(DEPARTMENT_ENGINEERING)
|
||||
chaotic = 10
|
||||
reusable = TRUE
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
command_announcement.Announce("Debris resulting from activity on another nearby asteroid is approaching your colony.", "Dust Alert")
|
||||
|
||||
/datum/gm_action/dust/get_weight()
|
||||
var/engineers = metric.count_people_in_department(ROLE_ENGINEERING)
|
||||
var/engineers = metric.count_people_in_department(DEPARTMENT_ENGINEERING)
|
||||
var/weight = 30 + (engineers * 25)
|
||||
return weight
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/electrical_storm
|
||||
name = "electrical storm"
|
||||
departments = list(ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_EVERYONE)
|
||||
reusable = TRUE
|
||||
var/lightsoutAmount = 1
|
||||
var/lightsoutRange = 25
|
||||
@@ -30,4 +30,4 @@
|
||||
apc.overload_lighting()
|
||||
|
||||
/datum/gm_action/electrical_storm/get_weight()
|
||||
return 30 + (metric.count_people_in_department(ROLE_ENGINEERING) * 15) + (metric.count_people_in_department(ROLE_EVERYONE) * 5)
|
||||
return 30 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 15) + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/electrified_door
|
||||
name = "airlock short-circuit"
|
||||
departments = list(ROLE_ENGINEERING, ROLE_MEDICAL)
|
||||
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_MEDICAL)
|
||||
chaotic = 10
|
||||
var/obj/machinery/door/airlock/chosen_door
|
||||
var/area/target_area
|
||||
@@ -72,4 +72,4 @@
|
||||
chosen_door.update_icon()
|
||||
|
||||
/datum/gm_action/electrified_door/get_weight()
|
||||
return 10 + (metric.count_people_in_department(ROLE_ENGINEERING) * 5 + metric.count_people_in_department(ROLE_MEDICAL) * 10)
|
||||
return 10 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 5 + metric.count_people_in_department(DEPARTMENT_MEDICAL) * 10)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/gravity
|
||||
name = "gravity failure"
|
||||
departments = list(ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_EVERYONE)
|
||||
length = 600
|
||||
var/list/zLevels
|
||||
|
||||
@@ -33,4 +33,4 @@
|
||||
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored")
|
||||
|
||||
/datum/gm_action/gravity/get_weight()
|
||||
return 30 + (metric.count_people_in_department(ROLE_EVERYONE) * 20)
|
||||
return 30 + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 20)
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
|
||||
/datum/gm_action/grid_check
|
||||
name = "grid check"
|
||||
departments = list(ROLE_ENGINEERING, ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_EVERYONE)
|
||||
chaotic = 20
|
||||
|
||||
/datum/gm_action/grid_check/get_weight()
|
||||
return 50 + (metric.count_people_in_department(ROLE_ENGINEERING) * 30)
|
||||
return 50 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 30)
|
||||
|
||||
/datum/gm_action/grid_check/start()
|
||||
..()
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
/datum/gm_action/infestation
|
||||
name = "animal infestation"
|
||||
departments = list(ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_EVERYONE)
|
||||
var/location
|
||||
var/locstring
|
||||
var/vermin
|
||||
@@ -100,7 +100,7 @@
|
||||
command_announcement.Announce("Bioscans indicate that [vermstring] have been breeding in [locstring]. Clear them out, before this starts to affect productivity.", "Vermin infestation")
|
||||
|
||||
/datum/gm_action/infestation/get_weight()
|
||||
return 5 + (metric.count_people_in_department(ROLE_EVERYONE) * 20)
|
||||
return 5 + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 20)
|
||||
|
||||
#undef LOC_KITCHEN
|
||||
#undef LOC_ATMOS
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/ionstorm
|
||||
name = "ion storm"
|
||||
departments = list(ROLE_SYNTHETIC)
|
||||
departments = list(DEPARTMENT_SYNTHETIC)
|
||||
var/botEmagChance = 0.5
|
||||
var/list/players = list()
|
||||
var/active = FALSE
|
||||
@@ -45,6 +45,6 @@
|
||||
ion_storm_announcement()
|
||||
|
||||
/datum/gm_action/ionstorm/get_weight()
|
||||
var/bots = metric.count_people_in_department(ROLE_SYNTHETIC)
|
||||
var/bots = metric.count_people_in_department(DEPARTMENT_SYNTHETIC)
|
||||
var/weight = 5 + (bots * 20)
|
||||
return weight
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/datum/gm_action/manifest_malfunction
|
||||
name = "manifest malfunction"
|
||||
enabled = TRUE
|
||||
departments = list(ROLE_SECURITY, ROLE_SYNTHETIC, ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_SYNTHETIC, DEPARTMENT_EVERYONE)
|
||||
chaotic = 3
|
||||
reusable = FALSE
|
||||
length = 0
|
||||
@@ -21,10 +21,10 @@
|
||||
/datum/gm_action/manifest_malfunction/get_weight()
|
||||
. = -10
|
||||
|
||||
var/security = metric.count_people_in_department(ROLE_SECURITY)
|
||||
var/security = metric.count_people_in_department(DEPARTMENT_SECURITY)
|
||||
|
||||
if(security && data_core)
|
||||
. += (metric.count_people_in_department(ROLE_EVERYONE) * 5) - (metric.count_people_in_department(ROLE_SYNTHETIC) * 5)
|
||||
. += (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5) - (metric.count_people_in_department(DEPARTMENT_SYNTHETIC) * 5)
|
||||
|
||||
return .
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/datum/gm_action/meteor_defense
|
||||
name = "meteor defense"
|
||||
departments = list(ROLE_ENGINEERING, ROLE_CARGO)
|
||||
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_CARGO)
|
||||
chaotic = 50
|
||||
var/direction = null
|
||||
var/dir_text = null
|
||||
@@ -11,9 +11,9 @@
|
||||
var/meteor_types
|
||||
|
||||
/datum/gm_action/meteor_defense/get_weight()
|
||||
var/engineers = metric.count_people_in_department(ROLE_ENGINEERING)
|
||||
var/cargo = metric.count_people_in_department(ROLE_CARGO)
|
||||
var/bots = metric.count_people_in_department(ROLE_SYNTHETIC)
|
||||
var/engineers = metric.count_people_in_department(DEPARTMENT_ENGINEERING)
|
||||
var/cargo = metric.count_people_in_department(DEPARTMENT_CARGO)
|
||||
var/bots = metric.count_people_in_department(DEPARTMENT_SYNTHETIC)
|
||||
var/weight = (max(engineers - 1, 0) * 20) // If only one engineer exists, no meteors for now.
|
||||
|
||||
if(engineers >= 2)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/datum/gm_action/money_hacker
|
||||
name = "bank account hacker"
|
||||
departments = list(ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_EVERYONE)
|
||||
reusable = TRUE
|
||||
var/datum/money_account/affected_account
|
||||
var/active
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/money_lotto
|
||||
name = "lottery win"
|
||||
departments = list(ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_EVERYONE)
|
||||
var/winner_name = "John Smith"
|
||||
var/winner_sum = 0
|
||||
var/deposit_success = 0
|
||||
@@ -36,4 +36,4 @@
|
||||
news_network.SubmitArticle(body, author, channel, null, 1)
|
||||
|
||||
/datum/gm_action/money_lotto/get_weight()
|
||||
return 25 * metric.count_people_in_department(ROLE_EVERYONE)
|
||||
return 25 * metric.count_people_in_department(DEPARTMENT_EVERYONE)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/pda_spam
|
||||
name = "PDA spam"
|
||||
departments = list(ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_EVERYONE)
|
||||
reusable = TRUE
|
||||
var/last_spam_time = 0
|
||||
var/obj/machinery/message_server/useMS
|
||||
@@ -126,4 +126,4 @@
|
||||
to_chat(L, "\icon[P] <b>Message from [sender] (Unknown / spam?), </b>\"[message]\" (Unable to Reply)")
|
||||
|
||||
/datum/gm_action/pda_spam/get_weight()
|
||||
return 25 * metric.count_people_in_department(ROLE_EVERYONE)
|
||||
return 25 * metric.count_people_in_department(DEPARTMENT_EVERYONE)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/datum/gm_action/planet_weather_shift
|
||||
name = "sudden weather shift"
|
||||
enabled = TRUE
|
||||
departments = list(ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_EVERYONE)
|
||||
reusable = TRUE
|
||||
var/datum/planet/target_planet
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/prison_break
|
||||
name = "prison break"
|
||||
departments = list(ROLE_SECURITY, ROLE_SYNTHETIC)
|
||||
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_SYNTHETIC)
|
||||
|
||||
var/start_time = 0
|
||||
var/active = FALSE // Are we doing stuff?
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
/datum/gm_action/prison_break/get_weight()
|
||||
var/afflicted_staff = 0
|
||||
var/assigned_staff = metric.count_people_in_department(ROLE_ENGINEERING)
|
||||
var/assigned_staff = metric.count_people_in_department(DEPARTMENT_ENGINEERING)
|
||||
for(var/department in departments)
|
||||
afflicted_staff += round(metric.count_people_in_department(department) / 2)
|
||||
|
||||
@@ -27,14 +27,14 @@
|
||||
|
||||
/datum/gm_action/prison_break/virology
|
||||
name = "virology breakout"
|
||||
departments = list(ROLE_MEDICAL, ROLE_SYNTHETIC)
|
||||
departments = list(DEPARTMENT_MEDICAL, DEPARTMENT_SYNTHETIC)
|
||||
eventDept = "Medical"
|
||||
areaName = list("Virology")
|
||||
areaType = list(/area/medical/virology, /area/medical/virologyaccess)
|
||||
|
||||
/datum/gm_action/prison_break/xenobiology
|
||||
name = "xenobiology breakout"
|
||||
departments = list(ROLE_RESEARCH, ROLE_SYNTHETIC)
|
||||
departments = list(DEPARTMENT_RESEARCH, DEPARTMENT_SYNTHETIC)
|
||||
eventDept = "Science"
|
||||
areaName = list("Xenobiology")
|
||||
areaType = list(/area/rnd/xenobiology)
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
/datum/gm_action/prison_break/station
|
||||
name = "station-wide breakout"
|
||||
departments = list(ROLE_SECURITY, ROLE_MEDICAL, ROLE_RESEARCH, ROLE_SYNTHETIC)
|
||||
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_MEDICAL, DEPARTMENT_RESEARCH, DEPARTMENT_SYNTHETIC)
|
||||
eventDept = "Station"
|
||||
areaName = list("Brig","Virology","Xenobiology")
|
||||
areaType = list(/area/security/prison, /area/security/brig, /area/medical/virology, /area/medical/virologyaccess, /area/rnd/xenobiology)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/radiation_storm
|
||||
name = "radiation storm"
|
||||
departments = list(ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_EVERYONE)
|
||||
reusable = TRUE
|
||||
|
||||
var/enterBelt = 30
|
||||
@@ -64,4 +64,4 @@
|
||||
revoke_maint_all_access()
|
||||
|
||||
/datum/gm_action/radiation_storm/get_weight()
|
||||
return 20 + (metric.count_people_in_department(ROLE_MEDICAL) * 10) + (metric.count_all_space_mobs() * 40) + (metric.count_people_in_department(ROLE_EVERYONE) * 20)
|
||||
return 20 + (metric.count_people_in_department(DEPARTMENT_MEDICAL) * 10) + (metric.count_all_space_mobs() * 40) + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 20)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// The random spawn proc on the antag datum will handle announcing the spawn and whatnot.
|
||||
/datum/gm_action/random_antag
|
||||
name = "random antagonist"
|
||||
departments = list(ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_EVERYONE)
|
||||
chaotic = 30
|
||||
reusable = TRUE
|
||||
|
||||
@@ -19,5 +19,5 @@
|
||||
/datum/gm_action/random_antag/get_weight()
|
||||
. = ..()
|
||||
if(gm)
|
||||
var/weight = max(0, (metric.count_people_in_department(ROLE_SECURITY) * 20) + (metric.count_people_in_department(ROLE_EVERYONE) * 5) + gm.staleness)
|
||||
var/weight = max(0, (metric.count_people_in_department(DEPARTMENT_SECURITY) * 20) + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5) + gm.staleness)
|
||||
return weight
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/rogue_drone
|
||||
name = "rogue drones"
|
||||
departments = list(ROLE_SECURITY)
|
||||
departments = list(DEPARTMENT_SECURITY)
|
||||
chaotic = 60
|
||||
length = 20 MINUTES
|
||||
var/list/drones_list = list()
|
||||
@@ -60,4 +60,4 @@
|
||||
command_announcement.Announce("We're disappointed at the loss of the drones, but the survivors have been recovered.", "Rogue drone alert")
|
||||
|
||||
/datum/gm_action/rogue_drone/get_weight()
|
||||
return 20 + (metric.count_people_in_department(ROLE_SECURITY) * 10) + (metric.count_all_space_mobs() * 30)
|
||||
return 20 + (metric.count_people_in_department(DEPARTMENT_SECURITY) * 10) + (metric.count_all_space_mobs() * 30)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/security_screening
|
||||
name = "security screening"
|
||||
departments = list(ROLE_SECURITY, ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_EVERYONE)
|
||||
|
||||
var/list/species_weights = list(
|
||||
SPECIES_SKRELL = 9,
|
||||
@@ -46,4 +46,4 @@
|
||||
command_announcement.Announce("[pick("A nearby Navy vessel", "A Solar official", "A Vir-Gov official", "A NanoTrasen board director")] has requested the screening of [pick("every other", "every", "suspicious", "willing")] [pickweight(end_weights)] personnel onboard \the [station_name()].", "Security Advisement")
|
||||
|
||||
/datum/gm_action/security_screening/get_weight()
|
||||
return max(-20, 10 + round(gm.staleness * 1.5) - (gm.danger * 2)) + (metric.count_people_in_department(ROLE_SECURITY) * 10) + (metric.count_people_in_department(ROLE_EVERYONE) * 1.5)
|
||||
return max(-20, 10 + round(gm.staleness * 1.5) - (gm.danger * 2)) + (metric.count_people_in_department(DEPARTMENT_SECURITY) * 10) + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 1.5)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/datum/gm_action/shipping_error
|
||||
name = "shipping error"
|
||||
departments = list(ROLE_CARGO)
|
||||
departments = list(DEPARTMENT_CARGO)
|
||||
reusable = TRUE
|
||||
|
||||
/datum/gm_action/shipping_error/get_weight()
|
||||
var/cargo = metric.count_people_in_department(ROLE_CARGO)
|
||||
var/cargo = metric.count_people_in_department(DEPARTMENT_CARGO)
|
||||
var/weight = (cargo * 40)
|
||||
return weight
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
radiate()
|
||||
|
||||
/datum/gm_action/solar_storm/get_weight()
|
||||
return 20 + (metric.count_people_in_department(ROLE_ENGINEERING) * 10) + (metric.count_all_space_mobs() * 30)
|
||||
return 20 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 10) + (metric.count_all_space_mobs() * 30)
|
||||
|
||||
/datum/gm_action/solar_storm/proc/radiate()
|
||||
// Note: Too complicated to be worth trying to use the radiation system for this. Its only in space anyway, so we make an exception in this case.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/spacevine
|
||||
name = "space-vine infestation"
|
||||
departments = list(ROLE_ENGINEERING)
|
||||
departments = list(DEPARTMENT_ENGINEERING)
|
||||
chaotic = 2
|
||||
|
||||
/datum/gm_action/spacevine/start()
|
||||
@@ -11,4 +11,4 @@
|
||||
level_seven_announcement()
|
||||
|
||||
/datum/gm_action/spacevine/get_weight()
|
||||
return 20 + (metric.count_people_in_department(ROLE_ENGINEERING) * 20) + (metric.count_people_in_department(ROLE_EVERYONE) * 10)
|
||||
return 20 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 20) + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 10)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/spider_infestation
|
||||
name = "spider infestation"
|
||||
departments = list(ROLE_SECURITY, ROLE_MEDICAL, ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_MEDICAL, DEPARTMENT_EVERYONE)
|
||||
chaotic = 30
|
||||
|
||||
severity = 1
|
||||
@@ -10,9 +10,9 @@
|
||||
var/spawntype = /obj/effect/spider/spiderling
|
||||
|
||||
/datum/gm_action/spider_infestation/set_up()
|
||||
severity = pickweight(EVENT_LEVEL_MUNDANE = max(1,(12 - (3 * metric.count_people_in_department(ROLE_SECURITY)))),
|
||||
EVENT_LEVEL_MODERATE = (7 + (2 * metric.count_people_in_department(ROLE_SECURITY))),
|
||||
EVENT_LEVEL_MAJOR = (1 + (2 * metric.count_people_in_department(ROLE_SECURITY)))
|
||||
severity = pickweight(EVENT_LEVEL_MUNDANE = max(1,(12 - (3 * metric.count_people_in_department(DEPARTMENT_SECURITY)))),
|
||||
EVENT_LEVEL_MODERATE = (7 + (2 * metric.count_people_in_department(DEPARTMENT_SECURITY))),
|
||||
EVENT_LEVEL_MAJOR = (1 + (2 * metric.count_people_in_department(DEPARTMENT_SECURITY)))
|
||||
)
|
||||
|
||||
switch(severity)
|
||||
@@ -47,9 +47,9 @@
|
||||
spawncount--
|
||||
|
||||
/datum/gm_action/spider_infestation/get_weight()
|
||||
var/security = metric.count_people_in_department(ROLE_SECURITY)
|
||||
var/medical = metric.count_people_in_department(ROLE_MEDICAL)
|
||||
var/engineering = metric.count_people_in_department(ROLE_ENGINEERING)
|
||||
var/security = metric.count_people_in_department(DEPARTMENT_SECURITY)
|
||||
var/medical = metric.count_people_in_department(DEPARTMENT_MEDICAL)
|
||||
var/engineering = metric.count_people_in_department(DEPARTMENT_ENGINEERING)
|
||||
|
||||
var/assigned_staff = security + round(medical / 2) + round(engineering / 2)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/spontaneous_appendicitis
|
||||
name = "appendicitis"
|
||||
departments = list(ROLE_MEDICAL, ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_MEDICAL, DEPARTMENT_EVERYONE)
|
||||
chaotic = 1
|
||||
|
||||
/datum/gm_action/spontaneous_appendicitis/start()
|
||||
@@ -10,4 +10,4 @@
|
||||
break
|
||||
|
||||
/datum/gm_action/spontaneous_appendicitis/get_weight()
|
||||
return max(0, -5 + (metric.count_people_in_department(ROLE_MEDICAL) * 10))
|
||||
return max(0, -5 + (metric.count_people_in_department(DEPARTMENT_MEDICAL) * 10))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/station_fund_raise
|
||||
name = "local funding drive"
|
||||
departments = list(ROLE_SECURITY, ROLE_CARGO, ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_CARGO, DEPARTMENT_EVERYONE)
|
||||
|
||||
/datum/gm_action/station_fund_raise/announce()
|
||||
spawn(rand(1 MINUTE, 2 MINUTES))
|
||||
@@ -11,4 +11,4 @@
|
||||
if(station_account.money <= 80000)
|
||||
weight_modifier = 1
|
||||
|
||||
return (max(-20, 10 + gm.staleness) + ((metric.count_people_in_department(ROLE_SECURITY) + (metric.count_people_in_department(ROLE_CARGO))) * 5) + (metric.count_people_in_department(ROLE_EVERYONE) * 3)) * weight_modifier
|
||||
return (max(-20, 10 + gm.staleness) + ((metric.count_people_in_department(DEPARTMENT_SECURITY) + (metric.count_people_in_department(DEPARTMENT_CARGO))) * 5) + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 3)) * weight_modifier
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/stowaway
|
||||
name = "stowaway pod"
|
||||
departments = list(ROLE_EVERYONE, ROLE_SECURITY)
|
||||
departments = list(DEPARTMENT_EVERYONE, DEPARTMENT_SECURITY)
|
||||
chaotic = 10
|
||||
observers_used = TRUE
|
||||
var/area/target_area // Chosen target area
|
||||
@@ -72,7 +72,7 @@
|
||||
say_dead_object("A <span class='notice'>[HP.occupant_type]</span> pod is now available in \the [target_area].", HP)
|
||||
|
||||
/datum/gm_action/stowaway/get_weight()
|
||||
return -20 + (metric.count_people_in_department(ROLE_SECURITY) * 15 + metric.count_people_in_department(ROLE_SYNTHETIC) * 5 + metric.count_people_in_department(ROLE_EVERYONE) * 1)
|
||||
return -20 + (metric.count_people_in_department(DEPARTMENT_SECURITY) * 15 + metric.count_people_in_department(DEPARTMENT_SYNTHETIC) * 5 + metric.count_people_in_department(DEPARTMENT_EVERYONE) * 1)
|
||||
|
||||
/datum/gm_action/stowaway/announce()
|
||||
spawn(rand(15 MINUTES, 30 MINUTES))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/datum/gm_action/nanotrasen_budget_allocation
|
||||
name = "supply point to cargo budget"
|
||||
enabled = TRUE
|
||||
departments = list(ROLE_CARGO)
|
||||
departments = list(DEPARTMENT_CARGO)
|
||||
chaotic = 0
|
||||
reusable = TRUE
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
/datum/gm_action/nanotrasen_budget_allocation/get_weight()
|
||||
. = round(SC.points / 15)
|
||||
|
||||
var/cargo = metric.count_people_in_department(ROLE_CARGO)
|
||||
var/personnel = metric.count_people_in_department(ROLE_EVERYONE)
|
||||
var/cargo = metric.count_people_in_department(DEPARTMENT_CARGO)
|
||||
var/personnel = metric.count_people_in_department(DEPARTMENT_EVERYONE)
|
||||
if(cargo)
|
||||
. = round(SC.points / (10 + personnel)) + cargo * 10
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/datum/gm_action/request
|
||||
name = "general request"
|
||||
departments = list(ROLE_CARGO)
|
||||
departments = list(DEPARTMENT_CARGO)
|
||||
|
||||
/datum/gm_action/request/announce()
|
||||
spawn(rand(1 MINUTE, 2 MINUTES))
|
||||
command_announcement.Announce("[pick("A nearby vessel", "A Solar contractor", "A Skrellian contractor", "A NanoTrasen board director")] has requested the delivery of [pick("one","two","three","several")] [pick("medical","engineering","research","civilian")] supply packages. The [station_name()] has been tasked with completing this request.", "Supply Request")
|
||||
|
||||
/datum/gm_action/request/get_weight()
|
||||
return max(15, 15 + round(gm.staleness / 2) - gm.danger) + (metric.count_people_in_department(ROLE_CARGO) * 10)
|
||||
return max(15, 15 + round(gm.staleness / 2) - gm.danger) + (metric.count_people_in_department(DEPARTMENT_CARGO) * 10)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/datum/gm_action/surprise_carp_attack
|
||||
name = "surprise carp attack"
|
||||
departments = list(ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_EVERYONE)
|
||||
reusable = TRUE
|
||||
chaotic = 10
|
||||
var/mob/living/victim = null
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
/datum/gm_action/surprise_meteors
|
||||
name = "surprise meteors"
|
||||
departments = list(ROLE_ENGINEERING)
|
||||
departments = list(DEPARTMENT_ENGINEERING)
|
||||
chaotic = 25
|
||||
|
||||
/datum/gm_action/surprise_meteors/get_weight()
|
||||
var/engineers = metric.count_people_in_department(ROLE_ENGINEERING)
|
||||
var/engineers = metric.count_people_in_department(DEPARTMENT_ENGINEERING)
|
||||
var/weight = (max(engineers - 1, 0) * 25) // If only one engineer exists, no meteors for now.
|
||||
return weight
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/swarm_boarder
|
||||
name = "swarmer shell"
|
||||
departments = list(ROLE_EVERYONE, ROLE_SECURITY, ROLE_ENGINEERING)
|
||||
departments = list(DEPARTMENT_EVERYONE, DEPARTMENT_SECURITY, DEPARTMENT_ENGINEERING)
|
||||
chaotic = 60
|
||||
observers_used = TRUE
|
||||
var/area/target_area // Chosen target area
|
||||
@@ -67,7 +67,7 @@
|
||||
new swarmertype(target_turf)
|
||||
|
||||
/datum/gm_action/swarm_boarder/get_weight()
|
||||
return max(0, -60 + (metric.count_people_in_department(ROLE_SECURITY) * 10 + metric.count_people_in_department(ROLE_SYNTHETIC) * 5))
|
||||
return max(0, -60 + (metric.count_people_in_department(DEPARTMENT_SECURITY) * 10 + metric.count_people_in_department(DEPARTMENT_SYNTHETIC) * 5))
|
||||
|
||||
/datum/gm_action/swarm_boarder/announce()
|
||||
spawn(rand(5 MINUTES, 15 MINUTES))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/datum/gm_action/viral_infection
|
||||
name = "viral infection"
|
||||
departments = list(ROLE_MEDICAL)
|
||||
departments = list(DEPARTMENT_MEDICAL)
|
||||
chaotic = 5
|
||||
var/list/viruses = list()
|
||||
severity = 1
|
||||
@@ -80,4 +80,4 @@
|
||||
message_admins("Virus event affecting [english_list(used_candidates_links)] started; Viruses: [english_list(used_viruses_links)]")
|
||||
|
||||
/datum/gm_action/viral_infection/get_weight()
|
||||
return (metric.count_people_in_department(ROLE_MEDICAL) * 20)
|
||||
return (metric.count_people_in_department(DEPARTMENT_MEDICAL) * 20)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/viral_outbreak
|
||||
name = "viral outbreak"
|
||||
departments = list(ROLE_MEDICAL, ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_MEDICAL, DEPARTMENT_EVERYONE)
|
||||
chaotic = 30
|
||||
severity = 1
|
||||
var/list/candidates = list()
|
||||
@@ -29,9 +29,9 @@
|
||||
severity--
|
||||
|
||||
/datum/gm_action/viral_outbreak/get_weight()
|
||||
var/medical = metric.count_people_in_department(ROLE_MEDICAL)
|
||||
var/security = metric.count_people_in_department(ROLE_SECURITY)
|
||||
var/everyone = metric.count_people_in_department(ROLE_EVERYONE)
|
||||
var/medical = metric.count_people_in_department(DEPARTMENT_MEDICAL)
|
||||
var/security = metric.count_people_in_department(DEPARTMENT_SECURITY)
|
||||
var/everyone = metric.count_people_in_department(DEPARTMENT_EVERYONE)
|
||||
|
||||
var/assigned_staff = medical + round(security / 2)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/wallrot
|
||||
name = "wall rot"
|
||||
departments = list(ROLE_ENGINEERING)
|
||||
departments = list(DEPARTMENT_ENGINEERING)
|
||||
reusable = TRUE
|
||||
var/turf/simulated/wall/center
|
||||
severity = 1
|
||||
@@ -40,4 +40,4 @@
|
||||
break
|
||||
|
||||
/datum/gm_action/wallrot/get_weight()
|
||||
return 60 + (metric.count_people_in_department(ROLE_ENGINEERING) * 35)
|
||||
return 60 + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 35)
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
/datum/gm_action/waste_disposal
|
||||
name = "waste disposal"
|
||||
departments = list(ROLE_CARGO)
|
||||
departments = list(DEPARTMENT_CARGO)
|
||||
chaotic = 0
|
||||
|
||||
/datum/gm_action/waste_disposal/get_weight()
|
||||
return metric.count_people_in_department(ROLE_CARGO) * 50
|
||||
return metric.count_people_in_department(DEPARTMENT_CARGO) * 50
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/gm_action/window_break
|
||||
name = "window breach"
|
||||
departments = list(ROLE_ENGINEERING)
|
||||
departments = list(DEPARTMENT_ENGINEERING)
|
||||
chaotic = 5
|
||||
var/obj/structure/window/chosen_window
|
||||
var/list/obj/structure/window/collateral_windows
|
||||
@@ -75,4 +75,4 @@
|
||||
command_announcement.Announce("Structural integrity of windows at [chosen_location.loc.name] is failing. Immediate repair or replacement is advised.", "Structural Alert")
|
||||
|
||||
/datum/gm_action/window_break/get_weight()
|
||||
return 20 * metric.count_people_in_department(ROLE_ENGINEERING)
|
||||
return 20 * metric.count_people_in_department(DEPARTMENT_ENGINEERING)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "space-time anomalies"
|
||||
chaotic = 70
|
||||
length = 12 MINUTES
|
||||
departments = list(ROLE_EVERYONE)
|
||||
departments = list(DEPARTMENT_EVERYONE)
|
||||
severity = 1
|
||||
|
||||
/datum/gm_action/wormholes/set_up() // 1 out of 5 will be full-duration wormholes, meaning up to a minute long.
|
||||
@@ -17,7 +17,7 @@
|
||||
wormhole_event(length / 2, (severity / 3))
|
||||
|
||||
/datum/gm_action/wormholes/get_weight()
|
||||
return 10 + max(0, -30 + (metric.count_people_in_department(ROLE_EVERYONE) * 5) + (metric.count_people_in_department(ROLE_ENGINEERING) + 10) + (metric.count_people_in_department(ROLE_MEDICAL) * 20))
|
||||
return 10 + max(0, -30 + (metric.count_people_in_department(DEPARTMENT_EVERYONE) * 5) + (metric.count_people_in_department(DEPARTMENT_ENGINEERING) + 10) + (metric.count_people_in_department(DEPARTMENT_MEDICAL) * 20))
|
||||
|
||||
/datum/gm_action/wormholes/end()
|
||||
command_announcement.Announce("There are no more space-time anomalies detected on the station.", "Anomaly Alert")
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
for(var/datum/gm_action/action in available_actions)
|
||||
if(!action.enabled)
|
||||
continue
|
||||
if(ROLE_EVERYONE in action.departments)
|
||||
if(DEPARTMENT_EVERYONE in action.departments)
|
||||
best_actions.Add(action)
|
||||
log_debug("[action.name] is being considered because it involves everyone.")
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// This proc tries to find the department of an arbitrary mob.
|
||||
/datum/metric/proc/guess_department(var/mob/M)
|
||||
var/list/found_roles = list()
|
||||
. = ROLE_UNKNOWN
|
||||
. = DEPARTMENT_UNKNOWN
|
||||
|
||||
// Records are usually the most reliable way to get what job someone is.
|
||||
var/datum/data/record/R = find_general_record("name", M.real_name)
|
||||
@@ -10,7 +10,7 @@
|
||||
var/recorded_rank = R.fields["real_rank"]
|
||||
found_roles = role_name_to_department(recorded_rank)
|
||||
. = found_roles[1]
|
||||
if(. != ROLE_UNKNOWN) // We found the correct department, so we can stop now.
|
||||
if(. != DEPARTMENT_UNKNOWN) // We found the correct department, so we can stop now.
|
||||
return
|
||||
|
||||
// They have a custom title, aren't crew, or someone deleted their record, so we need a fallback method.
|
||||
@@ -18,16 +18,16 @@
|
||||
if(M.mind)
|
||||
found_roles = role_name_to_department(M.mind.assigned_role)
|
||||
. = found_roles[1]
|
||||
if(. != ROLE_UNKNOWN)
|
||||
if(. != DEPARTMENT_UNKNOWN)
|
||||
return
|
||||
|
||||
// At this point, they don't have a mind, or for some reason assigned_role didn't work.
|
||||
found_roles = role_name_to_department(M.job)
|
||||
. = found_roles[1]
|
||||
if(. != ROLE_UNKNOWN)
|
||||
if(. != DEPARTMENT_UNKNOWN)
|
||||
return
|
||||
|
||||
return ROLE_UNKNOWN // Welp.
|
||||
return DEPARTMENT_UNKNOWN // Welp.
|
||||
|
||||
// Feed this proc the name of a job, and it will try to figure out what department they are apart of.
|
||||
// Note that this returns a list, as some jobs are in more than one department, like Command. The 'primary' department is the first
|
||||
@@ -35,32 +35,32 @@
|
||||
/datum/metric/proc/role_name_to_department(var/role_name)
|
||||
var/list/result = list()
|
||||
|
||||
if(role_name in security_positions)
|
||||
result += ROLE_SECURITY
|
||||
if(SSjob.is_job_in_department(role_name, DEPARTMENT_SECURITY))
|
||||
result += DEPARTMENT_SECURITY
|
||||
|
||||
if(role_name in engineering_positions)
|
||||
result += ROLE_ENGINEERING
|
||||
if(SSjob.is_job_in_department(role_name, DEPARTMENT_ENGINEERING))
|
||||
result += DEPARTMENT_ENGINEERING
|
||||
|
||||
if(role_name in medical_positions)
|
||||
result += ROLE_MEDICAL
|
||||
if(SSjob.is_job_in_department(role_name, DEPARTMENT_MEDICAL))
|
||||
result += DEPARTMENT_MEDICAL
|
||||
|
||||
if(role_name in science_positions)
|
||||
result += ROLE_RESEARCH
|
||||
if(SSjob.is_job_in_department(role_name, DEPARTMENT_RESEARCH))
|
||||
result += DEPARTMENT_RESEARCH
|
||||
|
||||
if(role_name in cargo_positions)
|
||||
result += ROLE_CARGO
|
||||
if(SSjob.is_job_in_department(role_name, DEPARTMENT_CARGO))
|
||||
result += DEPARTMENT_CARGO
|
||||
|
||||
if(role_name in civilian_positions)
|
||||
result += ROLE_CIVILIAN
|
||||
if(SSjob.is_job_in_department(role_name, DEPARTMENT_CIVILIAN))
|
||||
result += DEPARTMENT_CIVILIAN
|
||||
|
||||
if(role_name in nonhuman_positions)
|
||||
result += ROLE_SYNTHETIC
|
||||
if(SSjob.is_job_in_department(role_name, DEPARTMENT_SYNTHETIC))
|
||||
result += DEPARTMENT_SYNTHETIC
|
||||
|
||||
if(role_name in command_positions) // We do Command last, since we consider command to only be a primary department for hop/admin.
|
||||
result += ROLE_COMMAND
|
||||
if(SSjob.is_job_in_department(role_name, DEPARTMENT_COMMAND)) // We do Command last, since we consider command to only be a primary department for hop/admin.
|
||||
result += DEPARTMENT_COMMAND
|
||||
|
||||
if(!result.len) // No department was found.
|
||||
result += ROLE_UNKNOWN
|
||||
result += DEPARTMENT_UNKNOWN
|
||||
return result
|
||||
|
||||
/datum/metric/proc/count_people_in_department(var/department)
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
/datum/metric
|
||||
var/list/departments = list(
|
||||
ROLE_COMMAND,
|
||||
ROLE_SECURITY,
|
||||
ROLE_ENGINEERING,
|
||||
ROLE_MEDICAL,
|
||||
ROLE_RESEARCH,
|
||||
ROLE_CARGO,
|
||||
ROLE_CIVILIAN,
|
||||
ROLE_SYNTHETIC
|
||||
DEPARTMENT_COMMAND,
|
||||
DEPARTMENT_SECURITY,
|
||||
DEPARTMENT_ENGINEERING,
|
||||
DEPARTMENT_MEDICAL,
|
||||
DEPARTMENT_RESEARCH,
|
||||
DEPARTMENT_CARGO,
|
||||
DEPARTMENT_CIVILIAN,
|
||||
DEPARTMENT_SYNTHETIC
|
||||
)
|
||||
|
||||
|
||||
@@ -44,14 +44,16 @@
|
||||
data["id_owner"] = id_card && id_card.registered_name ? id_card.registered_name : "-----"
|
||||
data["id_name"] = id_card ? id_card.name : "-----"
|
||||
|
||||
data["command_jobs"] = format_jobs(command_positions)
|
||||
data["engineering_jobs"] = format_jobs(engineering_positions)
|
||||
data["medical_jobs"] = format_jobs(medical_positions)
|
||||
data["science_jobs"] = format_jobs(science_positions)
|
||||
data["security_jobs"] = format_jobs(security_positions)
|
||||
data["cargo_jobs"] = format_jobs(cargo_positions)
|
||||
data["civilian_jobs"] = format_jobs(civilian_positions)
|
||||
data["centcom_jobs"] = format_jobs(get_all_centcom_jobs())
|
||||
var/list/departments = list()
|
||||
for(var/D in SSjob.get_all_department_datums())
|
||||
var/datum/department/dept = D
|
||||
if(!dept.assignable) // No AI ID cards for you.
|
||||
continue
|
||||
if(dept.centcom_only && !is_centcom)
|
||||
continue
|
||||
departments[++departments.len] = list("department_name" = dept.name, "jobs" = format_jobs(SSjob.get_job_titles_in_department(dept.name)) )
|
||||
|
||||
data["departments"] = departments
|
||||
|
||||
data["all_centcom_access"] = is_centcom ? get_accesses(1) : null
|
||||
data["regions"] = get_accesses()
|
||||
|
||||
@@ -50,10 +50,15 @@ var/const/access_explorer = 43
|
||||
return get_all_station_access()
|
||||
*/
|
||||
|
||||
/datum/department/planetside
|
||||
name = DEPARTMENT_PLANET
|
||||
color = "#555555"
|
||||
sorting_order = 2 // Same as cargo in importance.
|
||||
|
||||
/datum/job/pilot
|
||||
title = "Pilot"
|
||||
flag = PILOT
|
||||
department = "Civilian"
|
||||
departments = list(DEPARTMENT_PLANET)
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
@@ -68,12 +73,12 @@ var/const/access_explorer = 43
|
||||
/datum/job/explorer
|
||||
title = "Explorer"
|
||||
flag = EXPLORER
|
||||
department = "Civilian"
|
||||
departments = list(DEPARTMENT_PLANET)
|
||||
department_flag = CIVILIAN
|
||||
faction = "Station"
|
||||
total_positions = 4
|
||||
spawn_positions = 4
|
||||
supervisors = "the explorer leader and the head of personnel"
|
||||
supervisors = "the head of personnel"
|
||||
selection_color = "#515151"
|
||||
economic_modifier = 4
|
||||
access = list(access_explorer)
|
||||
@@ -88,7 +93,7 @@ var/const/access_explorer = 43
|
||||
/datum/job/sar
|
||||
title = "Search and Rescue"
|
||||
flag = SAR
|
||||
department = "Medical"
|
||||
departments = list(DEPARTMENT_MEDICAL, DEPARTMENT_PLANET)
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
|
||||
@@ -59,37 +59,6 @@
|
||||
<hr>
|
||||
|
||||
{{if data.authenticated}}
|
||||
<script type="text/javascript">
|
||||
function markRed(){
|
||||
var nameField = document.getElementById('namefield');
|
||||
nameField.style.backgroundColor = "#FFDDDD";
|
||||
}
|
||||
function markGreen(){
|
||||
var nameField = document.getElementById('namefield');
|
||||
nameField.style.backgroundColor = "#DDFFDD";
|
||||
}
|
||||
function markAccountGreen(){
|
||||
var nameField = document.getElementById('accountfield');
|
||||
nameField.style.backgroundColor = "#DDFFDD";
|
||||
}
|
||||
function markAccountRed(){
|
||||
var nameField = document.getElementById('accountfield');
|
||||
nameField.style.backgroundColor = "#FFDDDD";
|
||||
}
|
||||
function showAll(){
|
||||
var allJobsSlot = document.getElementById('allvalue.jobsslot');
|
||||
allJobsSlot.innerHTML = "<a href='#' onclick='hideAll()'>Hide</a><br>";
|
||||
var allJobs = document.getElementById('all-value.jobs');
|
||||
allJobs.style.display = 'block';
|
||||
}
|
||||
function hideAll(){
|
||||
var allJobsSlot = document.getElementById('allvalue.jobsslot');
|
||||
allJobsSlot.innerHTML = "<a href='#' onclick='showAll()'>{{:data.target_rank}}</a>";
|
||||
var allJobs = document.getElementById('all-value.jobs');
|
||||
allJobs.style.display = 'none';
|
||||
}
|
||||
</script>
|
||||
|
||||
{{if data.has_modify}}
|
||||
<div class='item'>
|
||||
<h2>Details</h2>
|
||||
@@ -137,32 +106,24 @@
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
<span id='allvalue.jobsslot'><a href='#' onclick='showAll()'>{{:data.target_rank}}</a></span>
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div id="all-value.jobs" style='display: none;'>
|
||||
<div id="all-value.jobs">
|
||||
<table>
|
||||
{{for data.departments}}
|
||||
<tr>
|
||||
<th>{{:value.department_name}}</th>
|
||||
<td>
|
||||
{{for value.jobs :jobValue:jobIndex}}
|
||||
{{:helper.link(jobValue.display_name, '', {'choice' : 'assign', 'assign_target' : jobValue.job}, data.id_rank == jobValue.job ? 'disabled' : null)}}
|
||||
{{/for}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/for}}
|
||||
<tr>
|
||||
<th>Special</th>
|
||||
<td>
|
||||
{{:helper.link("Colony Director", '', {'choice' : 'assign', 'assign_target' : 'Colony Director'}, data.target_rank == 'Colony Director' ? 'disabled' : null)}}
|
||||
{{:helper.link("Command Secretary", '', {'choice' : 'assign', 'assign_target' : 'Command Secretary'}, data.target_rank == 'Command Secretary' ? 'disabled' : null)}}
|
||||
{{:helper.link("Internal Affairs Agent", '', {'choice' : 'assign', 'assign_target' : 'Internal Affairs Agent'}, data.target_rank == 'Internal Affairs Agent' ? 'disabled' : null)}}
|
||||
{{:helper.link("Custom", '', {'choice' : 'assign', 'assign_target' : 'Custom'})}}
|
||||
</td>
|
||||
</tr>
|
||||
{{for data.jobs}}
|
||||
{{if data.centcom_access || value.cat != "CentCom"}}
|
||||
<tr>
|
||||
<th>{{:value.cat}}</th>
|
||||
<td>
|
||||
{{for value.jobs :itemValue:itemIndex}}
|
||||
{{:helper.link(itemValue.display_name, '', {'choice' : 'assign', 'assign_target' : itemValue.job}, data.target_rank == itemValue.job ? 'disabled' : null)}}
|
||||
{{/for}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{/for}}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,34 +1,42 @@
|
||||
{{if data.have_id_slot}}{{:helper.link('Access Modification', 'home', {'action' : 'switchm', 'target' : 'mod'}, data.mmode ? 'disabled' : null)}}{{/if}}
|
||||
{{:helper.link('Crew Manifest', 'folder-open', {'action' : 'switchm', 'target' : 'manifest'}, !data.mmode ? 'disabled' : null)}}
|
||||
{{if data.have_printer}}{{:helper.link('Print', 'print', {'action' : 'print'}, (!data.mmode || data.has_id) ? null : 'disabled')}}{{/if}}
|
||||
|
||||
{{if !data.mmode}}
|
||||
<div class='item'>
|
||||
<h2>Crew Manifest</h2>
|
||||
</div>
|
||||
<div class='item'>
|
||||
{{:data.manifest}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='item'>
|
||||
<h2>Access Modification</h2>
|
||||
</div>
|
||||
|
||||
{{if !data.has_id}}
|
||||
<span class='alert'><i>Please insert the ID into the terminal to proceed.</i></span><br>
|
||||
{{if data.have_id_slot}}
|
||||
{{:helper.link('Access Modification', 'home', {'action' : 'switchm', 'target' : 'mod'}, data.mmode ? 'disabled' : null)}}
|
||||
{{/if}}
|
||||
|
||||
<div class='item'>
|
||||
{{:helper.link('Crew Manifest', 'folder-open', {'action' : 'switchm', 'target' : 'manifest'}, !data.mmode ? 'disabled' : null)}}
|
||||
|
||||
{{if data.have_printer}}
|
||||
{{:helper.link('Print', 'print', {'action' : 'print'}, (!data.mmode || data.has_id) ? null : 'disabled')}}
|
||||
{{/if}}
|
||||
|
||||
{{if !data.mmode}}
|
||||
<div class='item'>
|
||||
<h2>Crew Manifest</h2>
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
{{:data.manifest}}
|
||||
</div>
|
||||
|
||||
{{else}}
|
||||
<div class='item'>
|
||||
<h2>Access Modification</h2>
|
||||
</div>
|
||||
|
||||
{{if !data.has_id}}
|
||||
<span class='alert'><i>Please insert the ID into the terminal to proceed.</i></span><br>
|
||||
{{/if}}
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
Target Identity:
|
||||
</div>
|
||||
<div class='itemContent'>
|
||||
{{:helper.link(data.id_name, 'eject', {'action' : 'eject'})}}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
{{if data.authenticated}}
|
||||
{{if data.authenticated}}
|
||||
{{if data.has_id}}
|
||||
<div class='item'>
|
||||
<h2>Details</h2>
|
||||
@@ -38,6 +46,7 @@
|
||||
<div class='itemLabel'>
|
||||
Registered Name:
|
||||
</div>
|
||||
|
||||
<div class='itemContent'>
|
||||
{{:helper.link(data.id_owner, 'pencil', {'action' : 'edit', 'name' : 1})}}
|
||||
</div>
|
||||
@@ -47,16 +56,17 @@
|
||||
<div class='itemLabel'>
|
||||
Account Number:
|
||||
</div>
|
||||
|
||||
<div class='itemContent'>
|
||||
{{:helper.link(data.id_account_number, 'pencil', {'action' : 'edit', 'account' : 1})}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
Terminations:
|
||||
</div>
|
||||
|
||||
<div class='itemContent'>
|
||||
{{:helper.link('Terminate ' + data.id_owner, 'gear', {'action' : 'terminate'}, data.id_rank == "Terminated" ? 'disabled' : null, data.id_rank == "Terminated" ? 'disabled' : 'linkDanger')}}
|
||||
</div>
|
||||
@@ -65,94 +75,35 @@
|
||||
<div class='item'>
|
||||
<h2>Assignment</h2>
|
||||
</div>
|
||||
|
||||
{{:helper.link(data.assignments ? "Hide assignments" : "Show assignments", 'gear', {'action' : 'togglea'})}}
|
||||
|
||||
<div class='item'>
|
||||
<span id='allvalue.jobsslot'>
|
||||
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
{{if data.assignments}}
|
||||
<div id="all-value.jobs">
|
||||
<table>
|
||||
{{for data.departments}}
|
||||
<tr>
|
||||
<th></th><th>Command</th>
|
||||
<th>{{:value.department_name}}</th>
|
||||
<td>
|
||||
{{for value.jobs :jobValue:jobIndex}}
|
||||
{{:helper.link(jobValue.display_name, '', {'action' : 'assign', 'assign_target' : jobValue.job}, data.id_rank == jobValue.job ? 'disabled' : null)}}
|
||||
{{/for}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/for}}
|
||||
<tr>
|
||||
<th>Special</th>
|
||||
<td>
|
||||
{{:helper.link("Captain", '', {'action' : 'assign', 'assign_target' : 'Captain'}, data.id_rank == 'Captain' ? 'disabled' : null)}}
|
||||
{{:helper.link("Custom", '', {'action' : 'assign', 'assign_target' : 'Custom'})}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="color: '#FFA500';">Engineering</th>
|
||||
<td>
|
||||
{{for data.engineering_jobs}}
|
||||
{{:helper.link(value.display_name, '', {'action' : 'assign', 'assign_target' : value.job}, data.id_rank == value.job ? 'disabled' : null)}}
|
||||
{{/for}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="color: '#008000';">Medical</th>
|
||||
<td>
|
||||
{{for data.medical_jobs}}
|
||||
{{:helper.link(value.display_name, '', {'action' : 'assign', 'assign_target' : value.job}, data.id_rank == value.job ? 'disabled' : null)}}
|
||||
{{/for}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="color: '#800080';">Science</th>
|
||||
<td>
|
||||
{{for data.science_jobs}}
|
||||
{{:helper.link(value.display_name, '', {'action' : 'assign', 'assign_target' : value.job}, data.id_rank == value.job ? 'disabled' : null)}}
|
||||
{{/for}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="color: '#DD0000';">Security</th>
|
||||
<td>
|
||||
{{for data.security_jobs}}
|
||||
{{:helper.link(value.display_name, '', {'action' : 'assign', 'assign_target' : value.job}, data.id_rank == value.job ? 'disabled' : null)}}
|
||||
{{/for}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="color: '#cc6600';">Cargo</th>
|
||||
<td>
|
||||
{{for data.cargo_jobs}}
|
||||
{{if index && index % 6 === 0}}
|
||||
</td></tr><tr><th></th><td>
|
||||
{{/if}}
|
||||
{{:helper.link(value.display_name, '', {'action' : 'assign', 'assign_target' : value.job}, data.id_rank == value.job ? 'disabled' : null)}}
|
||||
{{/for}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="color: '#808080';">Civilian</th>
|
||||
<td>
|
||||
{{for data.civilian_jobs}}
|
||||
{{if index && index % 6 === 0}}
|
||||
</td></tr><tr><th></th><td>
|
||||
{{/if}}
|
||||
{{:helper.link(value.display_name, '', {'action' : 'assign', 'assign_target' : value.job}, data.id_rank == value.job ? 'disabled' : null)}}
|
||||
{{/for}}
|
||||
</td>
|
||||
</tr>
|
||||
{{if data.centcom_access}}
|
||||
<tr>
|
||||
<th style="color: '#A52A2A';">CentCom</th>
|
||||
<td>
|
||||
{{for data.centcom_jobs}}
|
||||
{{if index % 6 === 0}}
|
||||
</td></tr><tr><th></th><td>
|
||||
{{/if}}
|
||||
|
||||
{{:helper.link(value.display_name, '', {'action' : 'assign', 'assign_target' : value.job}, data.id_rank == value.job ? 'disabled' : null)}}
|
||||
{{/for}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
</table>
|
||||
</div>
|
||||
{{/if}}
|
||||
@@ -187,5 +138,5 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
@@ -206,6 +206,7 @@
|
||||
#include "code\controllers\subsystems\garbage.dm"
|
||||
#include "code\controllers\subsystems\holomaps.dm"
|
||||
#include "code\controllers\subsystems\inactivity.dm"
|
||||
#include "code\controllers\subsystems\job.dm"
|
||||
#include "code\controllers\subsystems\lighting.dm"
|
||||
#include "code\controllers\subsystems\machines.dm"
|
||||
#include "code\controllers\subsystems\mapping.dm"
|
||||
@@ -632,6 +633,7 @@
|
||||
#include "code\game\jobs\job\captain.dm"
|
||||
#include "code\game\jobs\job\civilian.dm"
|
||||
#include "code\game\jobs\job\civilian_chaplain.dm"
|
||||
#include "code\game\jobs\job\department.dm"
|
||||
#include "code\game\jobs\job\engineering.dm"
|
||||
#include "code\game\jobs\job\job.dm"
|
||||
#include "code\game\jobs\job\medical.dm"
|
||||
|
||||
Reference in New Issue
Block a user