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
|
//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)
|
#define DEFAULTPICK(L, default) ((istype(L, /list) && L:len) ? pick(L) : default)
|
||||||
|
|
||||||
// Ensures L is initailized after this point
|
// Ensures L is initailized after this point
|
||||||
#define LAZYINITLIST(L) if (!L) L = list()
|
#define LAZYINITLIST(L) if (!L) L = list()
|
||||||
|
|
||||||
// Sets a L back to null iff it is empty
|
// Sets a L back to null iff it is empty
|
||||||
#define UNSETEMPTY(L) if (L && !length(L)) L = null
|
#define UNSETEMPTY(L) if (L && !length(L)) L = null
|
||||||
|
|
||||||
// Removes I from list L, and sets I to null if it is now empty
|
// 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; } }
|
#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 LAZYADD(L, I) if(!L) { L = list(); } L += I;
|
||||||
|
|
||||||
#define LAZYOR(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
|
#define LAZYFIND(L, V) L ? L.Find(V) : 0
|
||||||
|
|
||||||
// Reads I from L safely - Works with both associative and traditional lists.
|
// 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)
|
#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
|
// Turns LAZYINITLIST(L) L[K] = V into ... for associated lists
|
||||||
#define LAZYSET(L, K, V) if(!L) { L = list(); } L[K] = V;
|
#define LAZYSET(L, K, V) if(!L) { L = list(); } L[K] = V;
|
||||||
|
|
||||||
// Reads the length of L, returning 0 if null
|
// Reads the length of L, returning 0 if null
|
||||||
#define LAZYLEN(L) length(L)
|
#define LAZYLEN(L) length(L)
|
||||||
|
|
||||||
// Null-safe L.Cut()
|
// Null-safe L.Cut()
|
||||||
#define LAZYCLEARLIST(L) if(L) 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.
|
// 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 SANITIZE_LIST(L) ( islist(L) ? L : list() )
|
||||||
|
|
||||||
#define reverseList(L) reverseRange(L.Copy())
|
#define reverseList(L) reverseRange(L.Copy())
|
||||||
|
|
||||||
// binary search sorted insert
|
// binary search sorted insert
|
||||||
|
|||||||
@@ -237,17 +237,20 @@
|
|||||||
#define ANTAG_SHARED "Shared"
|
#define ANTAG_SHARED "Shared"
|
||||||
#define ANTAG_KNOWN "Known"
|
#define ANTAG_KNOWN "Known"
|
||||||
|
|
||||||
// Job groups
|
// Departments.
|
||||||
#define ROLE_COMMAND "command"
|
#define DEPARTMENT_COMMAND "Command"
|
||||||
#define ROLE_SECURITY "security"
|
#define DEPARTMENT_SECURITY "Security"
|
||||||
#define ROLE_ENGINEERING "engineering"
|
#define DEPARTMENT_ENGINEERING "Engineering"
|
||||||
#define ROLE_MEDICAL "medical"
|
#define DEPARTMENT_MEDICAL "Medical"
|
||||||
#define ROLE_RESEARCH "research"
|
#define DEPARTMENT_RESEARCH "Research"
|
||||||
#define ROLE_CARGO "cargo"
|
#define DEPARTMENT_CARGO "Cargo"
|
||||||
#define ROLE_CIVILIAN "civilian"
|
#define DEPARTMENT_CIVILIAN "Civilian"
|
||||||
#define ROLE_SYNTHETIC "synthetic"
|
#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 ROLE_UNKNOWN "unknown"
|
#define DEPARTMENT_SYNTHETIC "Synthetic"
|
||||||
#define ROLE_EVERYONE "everyone"
|
|
||||||
|
// 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.
|
// Canonical spellings of TSCs, so typos never have to happen again due to human error.
|
||||||
#define TSC_NT "NanoTrasen"
|
#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_XENOARCH -20
|
||||||
#define INIT_ORDER_CIRCUIT -21
|
#define INIT_ORDER_CIRCUIT -21
|
||||||
#define INIT_ORDER_AI -22
|
#define INIT_ORDER_AI -22
|
||||||
|
#define INIT_ORDER_JOB -23
|
||||||
|
|
||||||
|
|
||||||
// Subsystem fire priority, from lowest to highest priority
|
// Subsystem fire priority, from lowest to highest priority
|
||||||
|
|||||||
@@ -34,12 +34,23 @@
|
|||||||
|
|
||||||
// Sorts jobs by department, and then by flag within department
|
// Sorts jobs by department, and then by flag within department
|
||||||
/proc/cmp_job_datums(var/datum/job/a, var/datum/job/b)
|
/proc/cmp_job_datums(var/datum/job/a, var/datum/job/b)
|
||||||
. = sorttext(b.department, a.department)
|
. = 0
|
||||||
if (. == 0) //Same department, push up if they're a head
|
if( LAZYLEN(a.departments) && LAZYLEN(b.departments) )
|
||||||
. = b.head_position - a.head_position
|
var/list/common_departments = a.departments & b.departments // Makes a list that contains only departments that were in both.
|
||||||
if (. == 0) //Already in head/nothead spot, sort by name
|
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)
|
. = 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.
|
// Sorts entries in a performance stats list.
|
||||||
/proc/cmp_generic_stat_item_time(list/A, list/B)
|
/proc/cmp_generic_stat_item_time(list/A, list/B)
|
||||||
. = B[STAT_ENTRY_TIME] - A[STAT_ENTRY_TIME]
|
. = 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]")
|
//to_world("[name]: [rank]")
|
||||||
//cael - to prevent multiple appearances of a player/job combination, add a continue after each line
|
//cael - to prevent multiple appearances of a player/job combination, add a continue after each line
|
||||||
var/department = 0
|
var/department = 0
|
||||||
if(real_rank in command_positions)
|
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_COMMAND))
|
||||||
heads[name] = rank
|
heads[name] = rank
|
||||||
department = 1
|
department = 1
|
||||||
if(real_rank in security_positions)
|
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_SECURITY))
|
||||||
sec[name] = rank
|
sec[name] = rank
|
||||||
department = 1
|
department = 1
|
||||||
if(real_rank in engineering_positions)
|
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_ENGINEERING))
|
||||||
eng[name] = rank
|
eng[name] = rank
|
||||||
department = 1
|
department = 1
|
||||||
if(real_rank in medical_positions)
|
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_MEDICAL))
|
||||||
med[name] = rank
|
med[name] = rank
|
||||||
department = 1
|
department = 1
|
||||||
if(real_rank in science_positions)
|
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_RESEARCH))
|
||||||
sci[name] = rank
|
sci[name] = rank
|
||||||
department = 1
|
department = 1
|
||||||
if(real_rank in cargo_positions)
|
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_CARGO))
|
||||||
car[name] = rank
|
car[name] = rank
|
||||||
department = 1
|
department = 1
|
||||||
if(real_rank in civilian_positions)
|
if(SSjob.is_job_in_department(real_rank, DEPARTMENT_CIVILIAN))
|
||||||
civ[name] = rank
|
civ[name] = rank
|
||||||
department = 1
|
department = 1
|
||||||
if(!department && !(name in heads))
|
if(!department && !(name in heads))
|
||||||
|
|||||||
@@ -83,54 +83,54 @@ var/global/list/PDA_Manifest = list()
|
|||||||
var/isactive = t.fields["p_stat"]
|
var/isactive = t.fields["p_stat"]
|
||||||
var/department = 0
|
var/department = 0
|
||||||
var/depthead = 0 // Department Heads will be placed at the top of their lists.
|
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)
|
heads[++heads.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||||
department = 1
|
department = 1
|
||||||
depthead = 1
|
depthead = 1
|
||||||
if(rank=="Colony Director" && heads.len != 1)
|
if(rank=="Colony Director" && heads.len != 1)
|
||||||
heads.Swap(1,heads.len)
|
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)
|
sec[++sec.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||||
department = 1
|
department = 1
|
||||||
if(depthead && sec.len != 1)
|
if(depthead && sec.len != 1)
|
||||||
sec.Swap(1,sec.len)
|
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)
|
eng[++eng.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||||
department = 1
|
department = 1
|
||||||
if(depthead && eng.len != 1)
|
if(depthead && eng.len != 1)
|
||||||
eng.Swap(1,eng.len)
|
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)
|
med[++med.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||||
department = 1
|
department = 1
|
||||||
if(depthead && med.len != 1)
|
if(depthead && med.len != 1)
|
||||||
med.Swap(1,med.len)
|
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)
|
sci[++sci.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||||
department = 1
|
department = 1
|
||||||
if(depthead && sci.len != 1)
|
if(depthead && sci.len != 1)
|
||||||
sci.Swap(1,sci.len)
|
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)
|
pla[++pla.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||||
department = 1
|
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)
|
car[++car.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||||
department = 1
|
department = 1
|
||||||
if(depthead && car.len != 1)
|
if(depthead && car.len != 1)
|
||||||
car.Swap(1,car.len)
|
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)
|
civ[++civ.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||||
department = 1
|
department = 1
|
||||||
if(depthead && civ.len != 1)
|
if(depthead && civ.len != 1)
|
||||||
civ.Swap(1,civ.len)
|
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)
|
bot[++bot.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||||
department = 1
|
department = 1
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ var/datum/antagonist/loyalists/loyalists
|
|||||||
return
|
return
|
||||||
global_objectives = list()
|
global_objectives = list()
|
||||||
for(var/mob/living/carbon/human/player in mob_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
|
continue
|
||||||
var/datum/objective/protect/loyal_obj = new
|
var/datum/objective/protect/loyal_obj = new
|
||||||
loyal_obj.target = player.mind
|
loyal_obj.target = player.mind
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ var/datum/antagonist/revolutionary/revs
|
|||||||
return
|
return
|
||||||
global_objectives = list()
|
global_objectives = list()
|
||||||
for(var/mob/living/carbon/human/player in mob_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
|
continue
|
||||||
var/datum/objective/rev/rev_obj = new
|
var/datum/objective/rev/rev_obj = new
|
||||||
rev_obj.target = player.mind
|
rev_obj.target = player.mind
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
/datum/job/assistant
|
/datum/job/assistant
|
||||||
title = "Assistant"
|
title = "Assistant"
|
||||||
flag = ASSISTANT
|
flag = ASSISTANT
|
||||||
department = "Civilian"
|
departments = list(DEPARTMENT_CIVILIAN)
|
||||||
|
sorting_order = -1
|
||||||
department_flag = CIVILIAN
|
department_flag = CIVILIAN
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = -1
|
total_positions = -1
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
|||||||
/datum/job/captain
|
/datum/job/captain
|
||||||
title = "Colony Director"
|
title = "Colony Director"
|
||||||
flag = CAPTAIN
|
flag = CAPTAIN
|
||||||
department = "Command"
|
departments = list(DEPARTMENT_COMMAND)
|
||||||
|
sorting_order = 3 // Above everyone.
|
||||||
head_position = 1
|
head_position = 1
|
||||||
department_flag = ENGSEC
|
department_flag = ENGSEC
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
@@ -35,7 +36,8 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
|||||||
/datum/job/hop
|
/datum/job/hop
|
||||||
title = "Head of Personnel"
|
title = "Head of Personnel"
|
||||||
flag = HOP
|
flag = HOP
|
||||||
department = "Command"
|
departments = list(DEPARTMENT_CIVILIAN, DEPARTMENT_CARGO, DEPARTMENT_COMMAND)
|
||||||
|
sorting_order = 2 // Above the QM, below captain.
|
||||||
head_position = 1
|
head_position = 1
|
||||||
department_flag = CIVILIAN
|
department_flag = CIVILIAN
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
@@ -69,7 +71,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
|
|||||||
/datum/job/secretary
|
/datum/job/secretary
|
||||||
title = "Command Secretary"
|
title = "Command Secretary"
|
||||||
flag = BRIDGE
|
flag = BRIDGE
|
||||||
department = "Command"
|
departments = list(DEPARTMENT_COMMAND)
|
||||||
head_position = 1
|
head_position = 1
|
||||||
department_flag = CIVILIAN
|
department_flag = CIVILIAN
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/datum/job/bartender
|
/datum/job/bartender
|
||||||
title = "Bartender"
|
title = "Bartender"
|
||||||
flag = BARTENDER
|
flag = BARTENDER
|
||||||
department = "Civilian"
|
departments = list(DEPARTMENT_CIVILIAN)
|
||||||
department_flag = CIVILIAN
|
department_flag = CIVILIAN
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 2
|
total_positions = 2
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
/datum/job/chef
|
/datum/job/chef
|
||||||
title = "Chef"
|
title = "Chef"
|
||||||
flag = CHEF
|
flag = CHEF
|
||||||
department = "Civilian"
|
departments = list(DEPARTMENT_CIVILIAN)
|
||||||
department_flag = CIVILIAN
|
department_flag = CIVILIAN
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 2
|
total_positions = 2
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
/datum/job/hydro
|
/datum/job/hydro
|
||||||
title = "Botanist"
|
title = "Botanist"
|
||||||
flag = BOTANIST
|
flag = BOTANIST
|
||||||
department = "Civilian"
|
departments = list(DEPARTMENT_CIVILIAN)
|
||||||
department_flag = CIVILIAN
|
department_flag = CIVILIAN
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 2
|
total_positions = 2
|
||||||
@@ -52,7 +52,8 @@
|
|||||||
/datum/job/qm
|
/datum/job/qm
|
||||||
title = "Quartermaster"
|
title = "Quartermaster"
|
||||||
flag = 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
|
head_position = 1
|
||||||
department_flag = CIVILIAN
|
department_flag = CIVILIAN
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
@@ -72,7 +73,7 @@
|
|||||||
/datum/job/cargo_tech
|
/datum/job/cargo_tech
|
||||||
title = "Cargo Technician"
|
title = "Cargo Technician"
|
||||||
flag = CARGOTECH
|
flag = CARGOTECH
|
||||||
department = "Cargo"
|
departments = list(DEPARTMENT_CARGO)
|
||||||
department_flag = CIVILIAN
|
department_flag = CIVILIAN
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 2
|
total_positions = 2
|
||||||
@@ -87,7 +88,7 @@
|
|||||||
/datum/job/mining
|
/datum/job/mining
|
||||||
title = "Shaft Miner"
|
title = "Shaft Miner"
|
||||||
flag = MINER
|
flag = MINER
|
||||||
department = "Cargo"
|
departments = list(DEPARTMENT_CARGO)
|
||||||
department_flag = CIVILIAN
|
department_flag = CIVILIAN
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 3
|
total_positions = 3
|
||||||
@@ -105,7 +106,7 @@
|
|||||||
/datum/job/janitor
|
/datum/job/janitor
|
||||||
title = "Janitor"
|
title = "Janitor"
|
||||||
flag = JANITOR
|
flag = JANITOR
|
||||||
department = "Civilian"
|
departments = list(DEPARTMENT_CIVILIAN)
|
||||||
department_flag = CIVILIAN
|
department_flag = CIVILIAN
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 2
|
total_positions = 2
|
||||||
@@ -122,7 +123,7 @@
|
|||||||
/datum/job/librarian
|
/datum/job/librarian
|
||||||
title = "Librarian"
|
title = "Librarian"
|
||||||
flag = LIBRARIAN
|
flag = LIBRARIAN
|
||||||
department = "Civilian"
|
departments = list(DEPARTMENT_CIVILIAN)
|
||||||
department_flag = CIVILIAN
|
department_flag = CIVILIAN
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 1
|
total_positions = 1
|
||||||
@@ -139,7 +140,7 @@
|
|||||||
/datum/job/lawyer
|
/datum/job/lawyer
|
||||||
title = "Internal Affairs Agent"
|
title = "Internal Affairs Agent"
|
||||||
flag = LAWYER
|
flag = LAWYER
|
||||||
department = "Civilian"
|
departments = list(DEPARTMENT_CIVILIAN)
|
||||||
department_flag = CIVILIAN
|
department_flag = CIVILIAN
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 2
|
total_positions = 2
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/datum/job/chaplain
|
/datum/job/chaplain
|
||||||
title = "Chaplain"
|
title = "Chaplain"
|
||||||
flag = CHAPLAIN
|
flag = CHAPLAIN
|
||||||
department = "Civilian"
|
departments = list(DEPARTMENT_CIVILIAN)
|
||||||
department_flag = CIVILIAN
|
department_flag = CIVILIAN
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 1
|
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"
|
title = "Chief Engineer"
|
||||||
flag = CHIEF
|
flag = CHIEF
|
||||||
head_position = 1
|
head_position = 1
|
||||||
department = "Engineering"
|
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_COMMAND)
|
||||||
|
sorting_order = 2
|
||||||
department_flag = ENGSEC
|
department_flag = ENGSEC
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 1
|
total_positions = 1
|
||||||
@@ -31,7 +32,7 @@
|
|||||||
/datum/job/engineer
|
/datum/job/engineer
|
||||||
title = "Station Engineer"
|
title = "Station Engineer"
|
||||||
flag = ENGINEER
|
flag = ENGINEER
|
||||||
department = "Engineering"
|
departments = list(DEPARTMENT_ENGINEERING)
|
||||||
department_flag = ENGSEC
|
department_flag = ENGSEC
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 5
|
total_positions = 5
|
||||||
@@ -50,7 +51,7 @@
|
|||||||
/datum/job/atmos
|
/datum/job/atmos
|
||||||
title = "Atmospheric Technician"
|
title = "Atmospheric Technician"
|
||||||
flag = ATMOSTECH
|
flag = ATMOSTECH
|
||||||
department = "Engineering"
|
departments = list(DEPARTMENT_ENGINEERING)
|
||||||
department_flag = ENGSEC
|
department_flag = ENGSEC
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 3
|
total_positions = 3
|
||||||
|
|||||||
@@ -16,8 +16,10 @@
|
|||||||
var/list/alt_titles // List of alternate titles, if any
|
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/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/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/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/minimum_character_age = 0
|
||||||
var/ideal_character_age = 30
|
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.
|
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"
|
title = "Chief Medical Officer"
|
||||||
flag = CMO
|
flag = CMO
|
||||||
head_position = 1
|
head_position = 1
|
||||||
department = "Medical"
|
departments = list(DEPARTMENT_MEDICAL, DEPARTMENT_COMMAND)
|
||||||
|
sorting_order = 2
|
||||||
department_flag = MEDSCI
|
department_flag = MEDSCI
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 1
|
total_positions = 1
|
||||||
@@ -27,7 +28,7 @@
|
|||||||
/datum/job/doctor
|
/datum/job/doctor
|
||||||
title = "Medical Doctor"
|
title = "Medical Doctor"
|
||||||
flag = DOCTOR
|
flag = DOCTOR
|
||||||
department = "Medical"
|
departments = list(DEPARTMENT_MEDICAL)
|
||||||
department_flag = MEDSCI
|
department_flag = MEDSCI
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 5
|
total_positions = 5
|
||||||
@@ -48,7 +49,7 @@
|
|||||||
/datum/job/chemist
|
/datum/job/chemist
|
||||||
title = "Chemist"
|
title = "Chemist"
|
||||||
flag = CHEMIST
|
flag = CHEMIST
|
||||||
department = "Medical"
|
departments = list(DEPARTMENT_MEDICAL)
|
||||||
department_flag = MEDSCI
|
department_flag = MEDSCI
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 2
|
total_positions = 2
|
||||||
@@ -68,7 +69,7 @@
|
|||||||
/datum/job/geneticist
|
/datum/job/geneticist
|
||||||
title = "Geneticist"
|
title = "Geneticist"
|
||||||
flag = GENETICIST
|
flag = GENETICIST
|
||||||
department = "Medical"
|
departments = list(DEPARTMENT_MEDICAL, DEPARTMENT_RESEARCH)
|
||||||
department_flag = MEDSCI
|
department_flag = MEDSCI
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 0
|
total_positions = 0
|
||||||
@@ -85,7 +86,7 @@
|
|||||||
/datum/job/psychiatrist
|
/datum/job/psychiatrist
|
||||||
title = "Psychiatrist"
|
title = "Psychiatrist"
|
||||||
flag = PSYCHIATRIST
|
flag = PSYCHIATRIST
|
||||||
department = "Medical"
|
departments = list(DEPARTMENT_MEDICAL)
|
||||||
department_flag = MEDSCI
|
department_flag = MEDSCI
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 1
|
total_positions = 1
|
||||||
@@ -101,7 +102,7 @@
|
|||||||
/datum/job/paramedic
|
/datum/job/paramedic
|
||||||
title = "Paramedic"
|
title = "Paramedic"
|
||||||
flag = PARAMEDIC
|
flag = PARAMEDIC
|
||||||
department = "Medical"
|
departments = list(DEPARTMENT_MEDICAL)
|
||||||
department_flag = MEDSCI
|
department_flag = MEDSCI
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 2
|
total_positions = 2
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
title = "Research Director"
|
title = "Research Director"
|
||||||
flag = RD
|
flag = RD
|
||||||
head_position = 1
|
head_position = 1
|
||||||
department = "Science"
|
departments = list(DEPARTMENT_RESEARCH, DEPARTMENT_COMMAND)
|
||||||
|
sorting_order = 2
|
||||||
department_flag = MEDSCI
|
department_flag = MEDSCI
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 1
|
total_positions = 1
|
||||||
@@ -30,7 +31,7 @@
|
|||||||
/datum/job/scientist
|
/datum/job/scientist
|
||||||
title = "Scientist"
|
title = "Scientist"
|
||||||
flag = SCIENTIST
|
flag = SCIENTIST
|
||||||
department = "Science"
|
departments = list(DEPARTMENT_RESEARCH)
|
||||||
department_flag = MEDSCI
|
department_flag = MEDSCI
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 5
|
total_positions = 5
|
||||||
@@ -49,7 +50,7 @@
|
|||||||
/datum/job/xenobiologist
|
/datum/job/xenobiologist
|
||||||
title = "Xenobiologist"
|
title = "Xenobiologist"
|
||||||
flag = XENOBIOLOGIST
|
flag = XENOBIOLOGIST
|
||||||
department = "Science"
|
departments = list(DEPARTMENT_RESEARCH)
|
||||||
department_flag = MEDSCI
|
department_flag = MEDSCI
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 3
|
total_positions = 3
|
||||||
@@ -68,7 +69,7 @@
|
|||||||
/datum/job/roboticist
|
/datum/job/roboticist
|
||||||
title = "Roboticist"
|
title = "Roboticist"
|
||||||
flag = ROBOTICIST
|
flag = ROBOTICIST
|
||||||
department = "Science"
|
departments = list(DEPARTMENT_RESEARCH)
|
||||||
department_flag = MEDSCI
|
department_flag = MEDSCI
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 2
|
total_positions = 2
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
title = "Head of Security"
|
title = "Head of Security"
|
||||||
flag = HOS
|
flag = HOS
|
||||||
head_position = 1
|
head_position = 1
|
||||||
department = "Security"
|
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_COMMAND)
|
||||||
|
sorting_order = 2
|
||||||
department_flag = ENGSEC
|
department_flag = ENGSEC
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 1
|
total_positions = 1
|
||||||
@@ -28,7 +29,8 @@
|
|||||||
/datum/job/warden
|
/datum/job/warden
|
||||||
title = "Warden"
|
title = "Warden"
|
||||||
flag = WARDEN
|
flag = WARDEN
|
||||||
department = "Security"
|
departments = list(DEPARTMENT_SECURITY)
|
||||||
|
sorting_order = 1
|
||||||
department_flag = ENGSEC
|
department_flag = ENGSEC
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 1
|
total_positions = 1
|
||||||
@@ -44,7 +46,7 @@
|
|||||||
/datum/job/detective
|
/datum/job/detective
|
||||||
title = "Detective"
|
title = "Detective"
|
||||||
flag = DETECTIVE
|
flag = DETECTIVE
|
||||||
department = "Security"
|
departments = list(DEPARTMENT_SECURITY)
|
||||||
department_flag = ENGSEC
|
department_flag = ENGSEC
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 2
|
total_positions = 2
|
||||||
@@ -61,7 +63,7 @@
|
|||||||
/datum/job/officer
|
/datum/job/officer
|
||||||
title = "Security Officer"
|
title = "Security Officer"
|
||||||
flag = OFFICER
|
flag = OFFICER
|
||||||
department = "Security"
|
departments = list(DEPARTMENT_SECURITY)
|
||||||
department_flag = ENGSEC
|
department_flag = ENGSEC
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 4
|
total_positions = 4
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
/datum/job/ai
|
/datum/job/ai
|
||||||
title = "AI"
|
title = "AI"
|
||||||
flag = AI
|
flag = AI
|
||||||
|
departments = list(DEPARTMENT_SYNTHETIC)
|
||||||
|
sorting_order = 1 // Be above their borgs.
|
||||||
department_flag = ENGSEC
|
department_flag = ENGSEC
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 0 // Not used for AI, see is_position_available below and modules/mob/living/silicon/ai/latejoin.dm
|
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
|
account_allowed = 0
|
||||||
economic_modifier = 0
|
economic_modifier = 0
|
||||||
has_headset = FALSE
|
has_headset = FALSE
|
||||||
|
assignable = FALSE
|
||||||
|
|
||||||
/datum/job/ai/equip(var/mob/living/carbon/human/H)
|
/datum/job/ai/equip(var/mob/living/carbon/human/H)
|
||||||
if(!H) return 0
|
if(!H) return 0
|
||||||
@@ -28,6 +31,7 @@
|
|||||||
/datum/job/cyborg
|
/datum/job/cyborg
|
||||||
title = "Cyborg"
|
title = "Cyborg"
|
||||||
flag = CYBORG
|
flag = CYBORG
|
||||||
|
departments = list(DEPARTMENT_SYNTHETIC)
|
||||||
department_flag = ENGSEC
|
department_flag = ENGSEC
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 2
|
total_positions = 2
|
||||||
@@ -39,6 +43,7 @@
|
|||||||
account_allowed = 0
|
account_allowed = 0
|
||||||
economic_modifier = 0
|
economic_modifier = 0
|
||||||
has_headset = FALSE
|
has_headset = FALSE
|
||||||
|
assignable = FALSE
|
||||||
|
|
||||||
/datum/job/cyborg/equip(var/mob/living/carbon/human/H)
|
/datum/job/cyborg/equip(var/mob/living/carbon/human/H)
|
||||||
if(!H) return 0
|
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!
|
if(istype(job, GetJob("Assistant"))) // We don't want to give him assistant, that's boring!
|
||||||
continue
|
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
|
continue
|
||||||
|
|
||||||
if(jobban_isbanned(player, job.title))
|
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
|
///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()
|
proc/FillHeadPosition()
|
||||||
for(var/level = 1 to 3)
|
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)
|
var/datum/job/job = GetJob(command_position)
|
||||||
if(!job) continue
|
if(!job) continue
|
||||||
var/list/candidates = FindOccupationCandidates(job, level)
|
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
|
///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)
|
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)
|
var/datum/job/job = GetJob(command_position)
|
||||||
if(!job) continue
|
if(!job) continue
|
||||||
var/list/candidates = FindOccupationCandidates(job, level)
|
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]\"")
|
log_game("JOINED [key_name(H)] as \"[rank]\"")
|
||||||
|
|
||||||
// If they're head, give them the account info for their department
|
// 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/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)
|
if(department_account)
|
||||||
remembered_info += "<b>Your department's account number is:</b> #[department_account.account_number]<br>"
|
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/ASSISTANT =(1<<11)
|
||||||
var/const/BRIDGE =(1<<12)
|
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)
|
/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()
|
/proc/get_job_datums()
|
||||||
var/list/occupations = list()
|
var/list/occupations = list()
|
||||||
|
|||||||
@@ -101,17 +101,18 @@
|
|||||||
data["centcom_access"] = is_centcom()
|
data["centcom_access"] = is_centcom()
|
||||||
data["all_centcom_access"] = null
|
data["all_centcom_access"] = null
|
||||||
data["regions"] = null
|
data["regions"] = null
|
||||||
|
data["id_rank"] = modify && modify.assignment ? modify.assignment : "Unassigned"
|
||||||
|
|
||||||
data["jobs"] = list(
|
var/list/departments = list()
|
||||||
list("cat" = "Engineering", "jobs" = format_jobs(engineering_positions)),
|
for(var/D in SSjob.get_all_department_datums())
|
||||||
list("cat" = "Medical", "jobs" = format_jobs(medical_positions)),
|
var/datum/department/dept = D
|
||||||
list("cat" = "Science", "jobs" = format_jobs(science_positions)),
|
if(!dept.assignable) // No AI ID cards for you.
|
||||||
list("cat" = "Security", "jobs" = format_jobs(security_positions)),
|
continue
|
||||||
list("cat" = "Cargo", "jobs" = format_jobs(cargo_positions)),
|
if(dept.centcom_only && !is_centcom())
|
||||||
list("cat" = "Planetside", "jobs" = format_jobs(planet_positions)),
|
continue
|
||||||
list("cat" = "Civilian", "jobs" = format_jobs(civilian_positions)),
|
departments[++departments.len] = list("department_name" = dept.name, "jobs" = format_jobs(SSjob.get_job_titles_in_department(dept.name)) )
|
||||||
list("cat" = "CentCom", "jobs" = format_jobs(get_all_centcom_jobs()))
|
|
||||||
)
|
data["departments"] = departments
|
||||||
|
|
||||||
if (modify && is_centcom())
|
if (modify && is_centcom())
|
||||||
var/list/all_centcom_access = list()
|
var/list/all_centcom_access = list()
|
||||||
@@ -208,16 +209,10 @@
|
|||||||
if(is_centcom())
|
if(is_centcom())
|
||||||
access = get_centcom_access(t1)
|
access = get_centcom_access(t1)
|
||||||
else
|
else
|
||||||
var/datum/job/jobdatum
|
var/datum/job/jobdatum = SSjob.get_job(t1)
|
||||||
for(var/jobtype in typesof(/datum/job))
|
|
||||||
var/datum/job/J = new jobtype
|
|
||||||
if(ckey(J.title) == ckey(t1))
|
|
||||||
jobdatum = J
|
|
||||||
break
|
|
||||||
if(!jobdatum)
|
if(!jobdatum)
|
||||||
to_chat(usr, "<span class='warning'>No log exists for this job: [t1]</span>")
|
to_chat(usr, "<span class='warning'>No log exists for this job: [t1]</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
access = jobdatum.get_access()
|
access = jobdatum.get_access()
|
||||||
|
|
||||||
modify.access = access
|
modify.access = access
|
||||||
|
|||||||
@@ -148,14 +148,14 @@ var/world_topic_spam_protect_time = world.timeofday
|
|||||||
else if(T == "manifest")
|
else if(T == "manifest")
|
||||||
var/list/positions = list()
|
var/list/positions = list()
|
||||||
var/list/set_names = list(
|
var/list/set_names = list(
|
||||||
"heads" = command_positions,
|
"heads" = SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND),
|
||||||
"sec" = security_positions,
|
"sec" = SSjob.get_job_titles_in_department(DEPARTMENT_SECURITY),
|
||||||
"eng" = engineering_positions,
|
"eng" = SSjob.get_job_titles_in_department(DEPARTMENT_ENGINEERING),
|
||||||
"med" = medical_positions,
|
"med" = SSjob.get_job_titles_in_department(DEPARTMENT_MEDICAL),
|
||||||
"sci" = science_positions,
|
"sci" = SSjob.get_job_titles_in_department(DEPARTMENT_RESEARCH),
|
||||||
"car" = cargo_positions,
|
"car" = SSjob.get_job_titles_in_department(DEPARTMENT_CARGO),
|
||||||
"civ" = civilian_positions,
|
"civ" = SSjob.get_job_titles_in_department(DEPARTMENT_CIVILIAN),
|
||||||
"bot" = nonhuman_positions
|
"bot" = SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC)
|
||||||
)
|
)
|
||||||
|
|
||||||
for(var/datum/data/record/t in data_core.general)
|
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>"
|
output += "<option value=''>--</option>"
|
||||||
for(var/j in get_all_jobs())
|
for(var/j in get_all_jobs())
|
||||||
output += "<option value='[j]'>[j]</option>"
|
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>"
|
output += "<option value='[j]'>[j]</option>"
|
||||||
var/list/bantypes = list("traitor","changeling","operative","revolutionary","cultist","wizard") //For legacy bans.
|
var/list/bantypes = list("traitor","changeling","operative","revolutionary","cultist","wizard") //For legacy bans.
|
||||||
for(var/antag_type in all_antag_types) // Grab other bans.
|
for(var/antag_type in all_antag_types) // Grab other bans.
|
||||||
|
|||||||
@@ -394,8 +394,8 @@
|
|||||||
//Regular jobs
|
//Regular jobs
|
||||||
//Command (Blue)
|
//Command (Blue)
|
||||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
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'>"
|
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 command_positions)
|
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND))
|
||||||
if(!jobPos) continue
|
if(!jobPos) continue
|
||||||
var/datum/job/job = job_master.GetJob(jobPos)
|
var/datum/job/job = job_master.GetJob(jobPos)
|
||||||
if(!job) continue
|
if(!job) continue
|
||||||
@@ -415,8 +415,8 @@
|
|||||||
//Security (Red)
|
//Security (Red)
|
||||||
counter = 0
|
counter = 0
|
||||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
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'>"
|
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 security_positions)
|
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_SECURITY))
|
||||||
if(!jobPos) continue
|
if(!jobPos) continue
|
||||||
var/datum/job/job = job_master.GetJob(jobPos)
|
var/datum/job/job = job_master.GetJob(jobPos)
|
||||||
if(!job) continue
|
if(!job) continue
|
||||||
@@ -436,8 +436,8 @@
|
|||||||
//Engineering (Yellow)
|
//Engineering (Yellow)
|
||||||
counter = 0
|
counter = 0
|
||||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
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'>"
|
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 engineering_positions)
|
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_ENGINEERING))
|
||||||
if(!jobPos) continue
|
if(!jobPos) continue
|
||||||
var/datum/job/job = job_master.GetJob(jobPos)
|
var/datum/job/job = job_master.GetJob(jobPos)
|
||||||
if(!job) continue
|
if(!job) continue
|
||||||
@@ -457,8 +457,8 @@
|
|||||||
//Cargo (Yellow)
|
//Cargo (Yellow)
|
||||||
counter = 0
|
counter = 0
|
||||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
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'>"
|
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 cargo_positions)
|
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_CARGO))
|
||||||
if(!jobPos) continue
|
if(!jobPos) continue
|
||||||
var/datum/job/job = job_master.GetJob(jobPos)
|
var/datum/job/job = job_master.GetJob(jobPos)
|
||||||
if(!job) continue
|
if(!job) continue
|
||||||
@@ -478,8 +478,8 @@
|
|||||||
//Medical (White)
|
//Medical (White)
|
||||||
counter = 0
|
counter = 0
|
||||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
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'>"
|
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 medical_positions)
|
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_MEDICAL))
|
||||||
if(!jobPos) continue
|
if(!jobPos) continue
|
||||||
var/datum/job/job = job_master.GetJob(jobPos)
|
var/datum/job/job = job_master.GetJob(jobPos)
|
||||||
if(!job) continue
|
if(!job) continue
|
||||||
@@ -499,8 +499,8 @@
|
|||||||
//Science (Purple)
|
//Science (Purple)
|
||||||
counter = 0
|
counter = 0
|
||||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
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'>"
|
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 science_positions)
|
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_RESEARCH))
|
||||||
if(!jobPos) continue
|
if(!jobPos) continue
|
||||||
var/datum/job/job = job_master.GetJob(jobPos)
|
var/datum/job/job = job_master.GetJob(jobPos)
|
||||||
if(!job) continue
|
if(!job) continue
|
||||||
@@ -520,8 +520,8 @@
|
|||||||
//Civilian (Grey)
|
//Civilian (Grey)
|
||||||
counter = 0
|
counter = 0
|
||||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
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'>"
|
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 civilian_positions)
|
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_CIVILIAN))
|
||||||
if(!jobPos) continue
|
if(!jobPos) continue
|
||||||
var/datum/job/job = job_master.GetJob(jobPos)
|
var/datum/job/job = job_master.GetJob(jobPos)
|
||||||
if(!job) continue
|
if(!job) continue
|
||||||
@@ -547,8 +547,8 @@
|
|||||||
//Non-Human (Green)
|
//Non-Human (Green)
|
||||||
counter = 0
|
counter = 0
|
||||||
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
|
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'>"
|
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 nonhuman_positions)
|
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC))
|
||||||
if(!jobPos) continue
|
if(!jobPos) continue
|
||||||
var/datum/job/job = job_master.GetJob(jobPos)
|
var/datum/job/job = job_master.GetJob(jobPos)
|
||||||
if(!job) continue
|
if(!job) continue
|
||||||
@@ -635,50 +635,50 @@
|
|||||||
var/list/joblist = list()
|
var/list/joblist = list()
|
||||||
switch(href_list["jobban3"])
|
switch(href_list["jobban3"])
|
||||||
if("commanddept")
|
if("commanddept")
|
||||||
for(var/jobPos in command_positions)
|
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_COMMAND))
|
||||||
if(!jobPos) continue
|
if(!jobPos) continue
|
||||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||||
if(!temp) continue
|
if(!temp) continue
|
||||||
joblist += temp.title
|
joblist += temp.title
|
||||||
if("securitydept")
|
if("securitydept")
|
||||||
for(var/jobPos in security_positions)
|
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_SECURITY))
|
||||||
if(!jobPos) continue
|
if(!jobPos) continue
|
||||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||||
if(!temp) continue
|
if(!temp) continue
|
||||||
joblist += temp.title
|
joblist += temp.title
|
||||||
if("engineeringdept")
|
if("engineeringdept")
|
||||||
for(var/jobPos in engineering_positions)
|
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_ENGINEERING))
|
||||||
if(!jobPos) continue
|
if(!jobPos) continue
|
||||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||||
if(!temp) continue
|
if(!temp) continue
|
||||||
joblist += temp.title
|
joblist += temp.title
|
||||||
if("cargodept")
|
if("cargodept")
|
||||||
for(var/jobPos in cargo_positions)
|
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_CARGO))
|
||||||
if(!jobPos) continue
|
if(!jobPos) continue
|
||||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||||
if(!temp) continue
|
if(!temp) continue
|
||||||
joblist += temp.title
|
joblist += temp.title
|
||||||
if("medicaldept")
|
if("medicaldept")
|
||||||
for(var/jobPos in medical_positions)
|
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_MEDICAL))
|
||||||
if(!jobPos) continue
|
if(!jobPos) continue
|
||||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||||
if(!temp) continue
|
if(!temp) continue
|
||||||
joblist += temp.title
|
joblist += temp.title
|
||||||
if("sciencedept")
|
if("sciencedept")
|
||||||
for(var/jobPos in science_positions)
|
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_RESEARCH))
|
||||||
if(!jobPos) continue
|
if(!jobPos) continue
|
||||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||||
if(!temp) continue
|
if(!temp) continue
|
||||||
joblist += temp.title
|
joblist += temp.title
|
||||||
if("civiliandept")
|
if("civiliandept")
|
||||||
for(var/jobPos in civilian_positions)
|
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_CIVILIAN))
|
||||||
if(!jobPos) continue
|
if(!jobPos) continue
|
||||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||||
if(!temp) continue
|
if(!temp) continue
|
||||||
joblist += temp.title
|
joblist += temp.title
|
||||||
if("nonhumandept")
|
if("nonhumandept")
|
||||||
joblist += "pAI"
|
joblist += "pAI"
|
||||||
for(var/jobPos in nonhuman_positions)
|
for(var/jobPos in SSjob.get_job_titles_in_department(DEPARTMENT_SYNTHETIC))
|
||||||
if(!jobPos) continue
|
if(!jobPos) continue
|
||||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||||
if(!temp) continue
|
if(!temp) continue
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
if((pref.job_civilian_low & ASSISTANT) && job.type != /datum/job/assistant)
|
if((pref.job_civilian_low & ASSISTANT) && job.type != /datum/job/assistant)
|
||||||
. += "<font color=grey>[rank]</font></td><td></td></tr>"
|
. += "<font color=grey>[rank]</font></td><td></td></tr>"
|
||||||
continue
|
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>"
|
. += "<b>[rank]</b>"
|
||||||
else
|
else
|
||||||
. += "[rank]"
|
. += "[rank]"
|
||||||
|
|||||||
@@ -206,16 +206,16 @@ var/list/event_last_fired = list()
|
|||||||
else if(istype(R.module, /obj/item/weapon/robot_module/robot/research))
|
else if(istype(R.module, /obj/item/weapon/robot_module/robot/research))
|
||||||
active_with_role["Scientist"]++
|
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"]++
|
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"]++
|
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"]++
|
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"]++
|
active_with_role["Scientist"]++
|
||||||
|
|
||||||
if(M.mind.assigned_role == "AI")
|
if(M.mind.assigned_role == "AI")
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/datum/gm_action/atmos_leak
|
/datum/gm_action/atmos_leak
|
||||||
name = "atmospherics 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_area // Chosen target area
|
||||||
var/area/target_turf // Chosen target turf in target_area
|
var/area/target_turf // Chosen target turf in target_area
|
||||||
var/gas_type // Chosen gas to release
|
var/gas_type // Chosen gas to release
|
||||||
@@ -74,4 +74,4 @@
|
|||||||
playsound(target_turf, 'sound/effects/smoke.ogg', 50, 1)
|
playsound(target_turf, 'sound/effects/smoke.ogg', 50, 1)
|
||||||
|
|
||||||
/datum/gm_action/atmos_leak/get_weight()
|
/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
|
/datum/gm_action/blob
|
||||||
name = "blob infestation"
|
name = "blob infestation"
|
||||||
departments = list(ROLE_ENGINEERING, ROLE_SECURITY, ROLE_MEDICAL)
|
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_SECURITY, DEPARTMENT_MEDICAL)
|
||||||
chaotic = 25
|
chaotic = 25
|
||||||
|
|
||||||
var/list/area/excluded = list(
|
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')
|
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()
|
/datum/gm_action/blob/get_weight()
|
||||||
var/engineers = metric.count_people_in_department(ROLE_ENGINEERING)
|
var/engineers = metric.count_people_in_department(DEPARTMENT_ENGINEERING)
|
||||||
var/security = metric.count_people_in_department(ROLE_SECURITY)
|
var/security = metric.count_people_in_department(DEPARTMENT_SECURITY)
|
||||||
var/medical = metric.count_people_in_department(ROLE_MEDICAL)
|
var/medical = metric.count_people_in_department(DEPARTMENT_MEDICAL)
|
||||||
|
|
||||||
var/assigned_staff = engineers + security
|
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.
|
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
|
/datum/gm_action/brand_intelligence
|
||||||
name = "rampant vending machines"
|
name = "rampant vending machines"
|
||||||
length = 30 MINUTES
|
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/vendingMachines = list()
|
||||||
var/list/obj/machinery/vending/infectedVendingMachines = list()
|
var/list/obj/machinery/vending/infectedVendingMachines = list()
|
||||||
@@ -66,4 +66,4 @@
|
|||||||
infectedMachine.shoot_inventory = 0
|
infectedMachine.shoot_inventory = 0
|
||||||
|
|
||||||
/datum/gm_action/brand_intelligence/get_weight()
|
/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
|
/datum/gm_action/camera_damage
|
||||||
name = "random camera damage"
|
name = "random camera damage"
|
||||||
reusable = TRUE
|
reusable = TRUE
|
||||||
departments = list(ROLE_SYNTHETIC, ROLE_ENGINEERING)
|
departments = list(DEPARTMENT_SYNTHETIC, DEPARTMENT_ENGINEERING)
|
||||||
|
|
||||||
/datum/gm_action/camera_damage/start()
|
/datum/gm_action/camera_damage/start()
|
||||||
var/obj/machinery/camera/C = acquire_random_camera()
|
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)
|
return T && C.can_use() && istype(C.loc, /turf) && (T.z in using_map.player_levels)
|
||||||
|
|
||||||
/datum/gm_action/camera_damage/get_weight()
|
/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
|
/datum/gm_action/canister_leak
|
||||||
name = "Canister Leak"
|
name = "Canister Leak"
|
||||||
departments = list(ROLE_ENGINEERING)
|
departments = list(DEPARTMENT_ENGINEERING)
|
||||||
chaotic = 20
|
chaotic = 20
|
||||||
|
|
||||||
/datum/gm_action/canister_leak/get_weight()
|
/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()
|
/datum/gm_action/canister_leak/start()
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
//carp_migration
|
//carp_migration
|
||||||
/datum/gm_action/carp_migration
|
/datum/gm_action/carp_migration
|
||||||
name = "carp migration"
|
name = "carp migration"
|
||||||
departments = list(ROLE_SECURITY, ROLE_EVERYONE)
|
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_EVERYONE)
|
||||||
chaotic = 50
|
chaotic = 50
|
||||||
var/list/spawned_carp = list()
|
var/list/spawned_carp = list()
|
||||||
var/carp_amount = 0
|
var/carp_amount = 0
|
||||||
length = 20 MINUTES
|
length = 20 MINUTES
|
||||||
|
|
||||||
/datum/gm_action/carp_migration/get_weight()
|
/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()
|
/datum/gm_action/carp_migration/announce()
|
||||||
var/announcement = "Unknown biological entities have been detected near [station_name()], please stand-by."
|
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()
|
/datum/gm_action/carp_migration/set_up()
|
||||||
// Higher filled roles means more groups of fish.
|
// Higher filled roles means more groups of fish.
|
||||||
var/station_strength = 0
|
var/station_strength = 0
|
||||||
station_strength += (metric.count_people_in_department(ROLE_SECURITY) * 3)
|
station_strength += (metric.count_people_in_department(DEPARTMENT_SECURITY) * 3)
|
||||||
station_strength += (metric.count_people_in_department(ROLE_ENGINEERING) * 2)
|
station_strength += (metric.count_people_in_department(DEPARTMENT_ENGINEERING) * 2)
|
||||||
station_strength += metric.count_people_in_department(ROLE_MEDICAL)
|
station_strength += metric.count_people_in_department(DEPARTMENT_MEDICAL)
|
||||||
|
|
||||||
// Less active emergency response departments tones the event down.
|
// 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)
|
activeness = max(activeness, 20)
|
||||||
|
|
||||||
carp_amount = CEILING(station_strength * (activeness / 100) + 1, 1)
|
carp_amount = CEILING(station_strength * (activeness / 100) + 1, 1)
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
/datum/gm_action/comms_blackout
|
/datum/gm_action/comms_blackout
|
||||||
name = "communications blackout"
|
name = "communications blackout"
|
||||||
departments = list(ROLE_ENGINEERING, ROLE_EVERYONE)
|
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_EVERYONE)
|
||||||
chaotic = 35
|
chaotic = 35
|
||||||
|
|
||||||
/datum/gm_action/comms_blackout/get_weight()
|
/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()
|
/datum/gm_action/comms_blackout/announce()
|
||||||
if(prob(33))
|
if(prob(33))
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
/datum/gm_action/security_drill
|
/datum/gm_action/security_drill
|
||||||
name = "security drills"
|
name = "security drills"
|
||||||
departments = list(ROLE_SECURITY, ROLE_EVERYONE)
|
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_EVERYONE)
|
||||||
|
|
||||||
/datum/gm_action/security_drill/announce()
|
/datum/gm_action/security_drill/announce()
|
||||||
spawn(rand(1 MINUTE, 2 MINUTES))
|
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")
|
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()
|
/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
|
/datum/gm_action/dust
|
||||||
name = "dust"
|
name = "dust"
|
||||||
departments = list(ROLE_ENGINEERING)
|
departments = list(DEPARTMENT_ENGINEERING)
|
||||||
chaotic = 10
|
chaotic = 10
|
||||||
reusable = TRUE
|
reusable = TRUE
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
command_announcement.Announce("Debris resulting from activity on another nearby asteroid is approaching your colony.", "Dust Alert")
|
command_announcement.Announce("Debris resulting from activity on another nearby asteroid is approaching your colony.", "Dust Alert")
|
||||||
|
|
||||||
/datum/gm_action/dust/get_weight()
|
/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)
|
var/weight = 30 + (engineers * 25)
|
||||||
return weight
|
return weight
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/datum/gm_action/electrical_storm
|
/datum/gm_action/electrical_storm
|
||||||
name = "electrical storm"
|
name = "electrical storm"
|
||||||
departments = list(ROLE_EVERYONE)
|
departments = list(DEPARTMENT_EVERYONE)
|
||||||
reusable = TRUE
|
reusable = TRUE
|
||||||
var/lightsoutAmount = 1
|
var/lightsoutAmount = 1
|
||||||
var/lightsoutRange = 25
|
var/lightsoutRange = 25
|
||||||
@@ -30,4 +30,4 @@
|
|||||||
apc.overload_lighting()
|
apc.overload_lighting()
|
||||||
|
|
||||||
/datum/gm_action/electrical_storm/get_weight()
|
/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
|
/datum/gm_action/electrified_door
|
||||||
name = "airlock short-circuit"
|
name = "airlock short-circuit"
|
||||||
departments = list(ROLE_ENGINEERING, ROLE_MEDICAL)
|
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_MEDICAL)
|
||||||
chaotic = 10
|
chaotic = 10
|
||||||
var/obj/machinery/door/airlock/chosen_door
|
var/obj/machinery/door/airlock/chosen_door
|
||||||
var/area/target_area
|
var/area/target_area
|
||||||
@@ -72,4 +72,4 @@
|
|||||||
chosen_door.update_icon()
|
chosen_door.update_icon()
|
||||||
|
|
||||||
/datum/gm_action/electrified_door/get_weight()
|
/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
|
/datum/gm_action/gravity
|
||||||
name = "gravity failure"
|
name = "gravity failure"
|
||||||
departments = list(ROLE_EVERYONE)
|
departments = list(DEPARTMENT_EVERYONE)
|
||||||
length = 600
|
length = 600
|
||||||
var/list/zLevels
|
var/list/zLevels
|
||||||
|
|
||||||
@@ -33,4 +33,4 @@
|
|||||||
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored")
|
command_announcement.Announce("Gravity generators are again functioning within normal parameters. Sorry for any inconvenience.", "Gravity Restored")
|
||||||
|
|
||||||
/datum/gm_action/gravity/get_weight()
|
/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
|
/datum/gm_action/grid_check
|
||||||
name = "grid check"
|
name = "grid check"
|
||||||
departments = list(ROLE_ENGINEERING, ROLE_EVERYONE)
|
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_EVERYONE)
|
||||||
chaotic = 20
|
chaotic = 20
|
||||||
|
|
||||||
/datum/gm_action/grid_check/get_weight()
|
/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()
|
/datum/gm_action/grid_check/start()
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
/datum/gm_action/infestation
|
/datum/gm_action/infestation
|
||||||
name = "animal infestation"
|
name = "animal infestation"
|
||||||
departments = list(ROLE_EVERYONE)
|
departments = list(DEPARTMENT_EVERYONE)
|
||||||
var/location
|
var/location
|
||||||
var/locstring
|
var/locstring
|
||||||
var/vermin
|
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")
|
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()
|
/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_KITCHEN
|
||||||
#undef LOC_ATMOS
|
#undef LOC_ATMOS
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/datum/gm_action/ionstorm
|
/datum/gm_action/ionstorm
|
||||||
name = "ion storm"
|
name = "ion storm"
|
||||||
departments = list(ROLE_SYNTHETIC)
|
departments = list(DEPARTMENT_SYNTHETIC)
|
||||||
var/botEmagChance = 0.5
|
var/botEmagChance = 0.5
|
||||||
var/list/players = list()
|
var/list/players = list()
|
||||||
var/active = FALSE
|
var/active = FALSE
|
||||||
@@ -45,6 +45,6 @@
|
|||||||
ion_storm_announcement()
|
ion_storm_announcement()
|
||||||
|
|
||||||
/datum/gm_action/ionstorm/get_weight()
|
/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)
|
var/weight = 5 + (bots * 20)
|
||||||
return weight
|
return weight
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/datum/gm_action/manifest_malfunction
|
/datum/gm_action/manifest_malfunction
|
||||||
name = "manifest malfunction"
|
name = "manifest malfunction"
|
||||||
enabled = TRUE
|
enabled = TRUE
|
||||||
departments = list(ROLE_SECURITY, ROLE_SYNTHETIC, ROLE_EVERYONE)
|
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_SYNTHETIC, DEPARTMENT_EVERYONE)
|
||||||
chaotic = 3
|
chaotic = 3
|
||||||
reusable = FALSE
|
reusable = FALSE
|
||||||
length = 0
|
length = 0
|
||||||
@@ -21,10 +21,10 @@
|
|||||||
/datum/gm_action/manifest_malfunction/get_weight()
|
/datum/gm_action/manifest_malfunction/get_weight()
|
||||||
. = -10
|
. = -10
|
||||||
|
|
||||||
var/security = metric.count_people_in_department(ROLE_SECURITY)
|
var/security = metric.count_people_in_department(DEPARTMENT_SECURITY)
|
||||||
|
|
||||||
if(security && data_core)
|
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 .
|
return .
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/datum/gm_action/meteor_defense
|
/datum/gm_action/meteor_defense
|
||||||
name = "meteor defense"
|
name = "meteor defense"
|
||||||
departments = list(ROLE_ENGINEERING, ROLE_CARGO)
|
departments = list(DEPARTMENT_ENGINEERING, DEPARTMENT_CARGO)
|
||||||
chaotic = 50
|
chaotic = 50
|
||||||
var/direction = null
|
var/direction = null
|
||||||
var/dir_text = null
|
var/dir_text = null
|
||||||
@@ -11,9 +11,9 @@
|
|||||||
var/meteor_types
|
var/meteor_types
|
||||||
|
|
||||||
/datum/gm_action/meteor_defense/get_weight()
|
/datum/gm_action/meteor_defense/get_weight()
|
||||||
var/engineers = metric.count_people_in_department(ROLE_ENGINEERING)
|
var/engineers = metric.count_people_in_department(DEPARTMENT_ENGINEERING)
|
||||||
var/cargo = metric.count_people_in_department(ROLE_CARGO)
|
var/cargo = metric.count_people_in_department(DEPARTMENT_CARGO)
|
||||||
var/bots = metric.count_people_in_department(ROLE_SYNTHETIC)
|
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.
|
var/weight = (max(engineers - 1, 0) * 20) // If only one engineer exists, no meteors for now.
|
||||||
|
|
||||||
if(engineers >= 2)
|
if(engineers >= 2)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/datum/gm_action/money_hacker
|
/datum/gm_action/money_hacker
|
||||||
name = "bank account hacker"
|
name = "bank account hacker"
|
||||||
departments = list(ROLE_EVERYONE)
|
departments = list(DEPARTMENT_EVERYONE)
|
||||||
reusable = TRUE
|
reusable = TRUE
|
||||||
var/datum/money_account/affected_account
|
var/datum/money_account/affected_account
|
||||||
var/active
|
var/active
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/datum/gm_action/money_lotto
|
/datum/gm_action/money_lotto
|
||||||
name = "lottery win"
|
name = "lottery win"
|
||||||
departments = list(ROLE_EVERYONE)
|
departments = list(DEPARTMENT_EVERYONE)
|
||||||
var/winner_name = "John Smith"
|
var/winner_name = "John Smith"
|
||||||
var/winner_sum = 0
|
var/winner_sum = 0
|
||||||
var/deposit_success = 0
|
var/deposit_success = 0
|
||||||
@@ -36,4 +36,4 @@
|
|||||||
news_network.SubmitArticle(body, author, channel, null, 1)
|
news_network.SubmitArticle(body, author, channel, null, 1)
|
||||||
|
|
||||||
/datum/gm_action/money_lotto/get_weight()
|
/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
|
/datum/gm_action/pda_spam
|
||||||
name = "PDA spam"
|
name = "PDA spam"
|
||||||
departments = list(ROLE_EVERYONE)
|
departments = list(DEPARTMENT_EVERYONE)
|
||||||
reusable = TRUE
|
reusable = TRUE
|
||||||
var/last_spam_time = 0
|
var/last_spam_time = 0
|
||||||
var/obj/machinery/message_server/useMS
|
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)")
|
to_chat(L, "\icon[P] <b>Message from [sender] (Unknown / spam?), </b>\"[message]\" (Unable to Reply)")
|
||||||
|
|
||||||
/datum/gm_action/pda_spam/get_weight()
|
/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
|
/datum/gm_action/planet_weather_shift
|
||||||
name = "sudden weather shift"
|
name = "sudden weather shift"
|
||||||
enabled = TRUE
|
enabled = TRUE
|
||||||
departments = list(ROLE_EVERYONE)
|
departments = list(DEPARTMENT_EVERYONE)
|
||||||
reusable = TRUE
|
reusable = TRUE
|
||||||
var/datum/planet/target_planet
|
var/datum/planet/target_planet
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/datum/gm_action/prison_break
|
/datum/gm_action/prison_break
|
||||||
name = "prison break"
|
name = "prison break"
|
||||||
departments = list(ROLE_SECURITY, ROLE_SYNTHETIC)
|
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_SYNTHETIC)
|
||||||
|
|
||||||
var/start_time = 0
|
var/start_time = 0
|
||||||
var/active = FALSE // Are we doing stuff?
|
var/active = FALSE // Are we doing stuff?
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
/datum/gm_action/prison_break/get_weight()
|
/datum/gm_action/prison_break/get_weight()
|
||||||
var/afflicted_staff = 0
|
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)
|
for(var/department in departments)
|
||||||
afflicted_staff += round(metric.count_people_in_department(department) / 2)
|
afflicted_staff += round(metric.count_people_in_department(department) / 2)
|
||||||
|
|
||||||
@@ -27,14 +27,14 @@
|
|||||||
|
|
||||||
/datum/gm_action/prison_break/virology
|
/datum/gm_action/prison_break/virology
|
||||||
name = "virology breakout"
|
name = "virology breakout"
|
||||||
departments = list(ROLE_MEDICAL, ROLE_SYNTHETIC)
|
departments = list(DEPARTMENT_MEDICAL, DEPARTMENT_SYNTHETIC)
|
||||||
eventDept = "Medical"
|
eventDept = "Medical"
|
||||||
areaName = list("Virology")
|
areaName = list("Virology")
|
||||||
areaType = list(/area/medical/virology, /area/medical/virologyaccess)
|
areaType = list(/area/medical/virology, /area/medical/virologyaccess)
|
||||||
|
|
||||||
/datum/gm_action/prison_break/xenobiology
|
/datum/gm_action/prison_break/xenobiology
|
||||||
name = "xenobiology breakout"
|
name = "xenobiology breakout"
|
||||||
departments = list(ROLE_RESEARCH, ROLE_SYNTHETIC)
|
departments = list(DEPARTMENT_RESEARCH, DEPARTMENT_SYNTHETIC)
|
||||||
eventDept = "Science"
|
eventDept = "Science"
|
||||||
areaName = list("Xenobiology")
|
areaName = list("Xenobiology")
|
||||||
areaType = list(/area/rnd/xenobiology)
|
areaType = list(/area/rnd/xenobiology)
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
/datum/gm_action/prison_break/station
|
/datum/gm_action/prison_break/station
|
||||||
name = "station-wide breakout"
|
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"
|
eventDept = "Station"
|
||||||
areaName = list("Brig","Virology","Xenobiology")
|
areaName = list("Brig","Virology","Xenobiology")
|
||||||
areaType = list(/area/security/prison, /area/security/brig, /area/medical/virology, /area/medical/virologyaccess, /area/rnd/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
|
/datum/gm_action/radiation_storm
|
||||||
name = "radiation storm"
|
name = "radiation storm"
|
||||||
departments = list(ROLE_EVERYONE)
|
departments = list(DEPARTMENT_EVERYONE)
|
||||||
reusable = TRUE
|
reusable = TRUE
|
||||||
|
|
||||||
var/enterBelt = 30
|
var/enterBelt = 30
|
||||||
@@ -64,4 +64,4 @@
|
|||||||
revoke_maint_all_access()
|
revoke_maint_all_access()
|
||||||
|
|
||||||
/datum/gm_action/radiation_storm/get_weight()
|
/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.
|
// The random spawn proc on the antag datum will handle announcing the spawn and whatnot.
|
||||||
/datum/gm_action/random_antag
|
/datum/gm_action/random_antag
|
||||||
name = "random antagonist"
|
name = "random antagonist"
|
||||||
departments = list(ROLE_EVERYONE)
|
departments = list(DEPARTMENT_EVERYONE)
|
||||||
chaotic = 30
|
chaotic = 30
|
||||||
reusable = TRUE
|
reusable = TRUE
|
||||||
|
|
||||||
@@ -19,5 +19,5 @@
|
|||||||
/datum/gm_action/random_antag/get_weight()
|
/datum/gm_action/random_antag/get_weight()
|
||||||
. = ..()
|
. = ..()
|
||||||
if(gm)
|
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
|
return weight
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/datum/gm_action/rogue_drone
|
/datum/gm_action/rogue_drone
|
||||||
name = "rogue drones"
|
name = "rogue drones"
|
||||||
departments = list(ROLE_SECURITY)
|
departments = list(DEPARTMENT_SECURITY)
|
||||||
chaotic = 60
|
chaotic = 60
|
||||||
length = 20 MINUTES
|
length = 20 MINUTES
|
||||||
var/list/drones_list = list()
|
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")
|
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()
|
/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
|
/datum/gm_action/security_screening
|
||||||
name = "security screening"
|
name = "security screening"
|
||||||
departments = list(ROLE_SECURITY, ROLE_EVERYONE)
|
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_EVERYONE)
|
||||||
|
|
||||||
var/list/species_weights = list(
|
var/list/species_weights = list(
|
||||||
SPECIES_SKRELL = 9,
|
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")
|
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()
|
/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
|
/datum/gm_action/shipping_error
|
||||||
name = "shipping error"
|
name = "shipping error"
|
||||||
departments = list(ROLE_CARGO)
|
departments = list(DEPARTMENT_CARGO)
|
||||||
reusable = TRUE
|
reusable = TRUE
|
||||||
|
|
||||||
/datum/gm_action/shipping_error/get_weight()
|
/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)
|
var/weight = (cargo * 40)
|
||||||
return weight
|
return weight
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
radiate()
|
radiate()
|
||||||
|
|
||||||
/datum/gm_action/solar_storm/get_weight()
|
/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()
|
/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.
|
// 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
|
/datum/gm_action/spacevine
|
||||||
name = "space-vine infestation"
|
name = "space-vine infestation"
|
||||||
departments = list(ROLE_ENGINEERING)
|
departments = list(DEPARTMENT_ENGINEERING)
|
||||||
chaotic = 2
|
chaotic = 2
|
||||||
|
|
||||||
/datum/gm_action/spacevine/start()
|
/datum/gm_action/spacevine/start()
|
||||||
@@ -11,4 +11,4 @@
|
|||||||
level_seven_announcement()
|
level_seven_announcement()
|
||||||
|
|
||||||
/datum/gm_action/spacevine/get_weight()
|
/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
|
/datum/gm_action/spider_infestation
|
||||||
name = "spider infestation"
|
name = "spider infestation"
|
||||||
departments = list(ROLE_SECURITY, ROLE_MEDICAL, ROLE_EVERYONE)
|
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_MEDICAL, DEPARTMENT_EVERYONE)
|
||||||
chaotic = 30
|
chaotic = 30
|
||||||
|
|
||||||
severity = 1
|
severity = 1
|
||||||
@@ -10,9 +10,9 @@
|
|||||||
var/spawntype = /obj/effect/spider/spiderling
|
var/spawntype = /obj/effect/spider/spiderling
|
||||||
|
|
||||||
/datum/gm_action/spider_infestation/set_up()
|
/datum/gm_action/spider_infestation/set_up()
|
||||||
severity = pickweight(EVENT_LEVEL_MUNDANE = max(1,(12 - (3 * 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(ROLE_SECURITY))),
|
EVENT_LEVEL_MODERATE = (7 + (2 * metric.count_people_in_department(DEPARTMENT_SECURITY))),
|
||||||
EVENT_LEVEL_MAJOR = (1 + (2 * metric.count_people_in_department(ROLE_SECURITY)))
|
EVENT_LEVEL_MAJOR = (1 + (2 * metric.count_people_in_department(DEPARTMENT_SECURITY)))
|
||||||
)
|
)
|
||||||
|
|
||||||
switch(severity)
|
switch(severity)
|
||||||
@@ -47,9 +47,9 @@
|
|||||||
spawncount--
|
spawncount--
|
||||||
|
|
||||||
/datum/gm_action/spider_infestation/get_weight()
|
/datum/gm_action/spider_infestation/get_weight()
|
||||||
var/security = metric.count_people_in_department(ROLE_SECURITY)
|
var/security = metric.count_people_in_department(DEPARTMENT_SECURITY)
|
||||||
var/medical = metric.count_people_in_department(ROLE_MEDICAL)
|
var/medical = metric.count_people_in_department(DEPARTMENT_MEDICAL)
|
||||||
var/engineering = metric.count_people_in_department(ROLE_ENGINEERING)
|
var/engineering = metric.count_people_in_department(DEPARTMENT_ENGINEERING)
|
||||||
|
|
||||||
var/assigned_staff = security + round(medical / 2) + round(engineering / 2)
|
var/assigned_staff = security + round(medical / 2) + round(engineering / 2)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/datum/gm_action/spontaneous_appendicitis
|
/datum/gm_action/spontaneous_appendicitis
|
||||||
name = "appendicitis"
|
name = "appendicitis"
|
||||||
departments = list(ROLE_MEDICAL, ROLE_EVERYONE)
|
departments = list(DEPARTMENT_MEDICAL, DEPARTMENT_EVERYONE)
|
||||||
chaotic = 1
|
chaotic = 1
|
||||||
|
|
||||||
/datum/gm_action/spontaneous_appendicitis/start()
|
/datum/gm_action/spontaneous_appendicitis/start()
|
||||||
@@ -10,4 +10,4 @@
|
|||||||
break
|
break
|
||||||
|
|
||||||
/datum/gm_action/spontaneous_appendicitis/get_weight()
|
/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
|
/datum/gm_action/station_fund_raise
|
||||||
name = "local funding drive"
|
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()
|
/datum/gm_action/station_fund_raise/announce()
|
||||||
spawn(rand(1 MINUTE, 2 MINUTES))
|
spawn(rand(1 MINUTE, 2 MINUTES))
|
||||||
@@ -11,4 +11,4 @@
|
|||||||
if(station_account.money <= 80000)
|
if(station_account.money <= 80000)
|
||||||
weight_modifier = 1
|
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
|
/datum/gm_action/stowaway
|
||||||
name = "stowaway pod"
|
name = "stowaway pod"
|
||||||
departments = list(ROLE_EVERYONE, ROLE_SECURITY)
|
departments = list(DEPARTMENT_EVERYONE, DEPARTMENT_SECURITY)
|
||||||
chaotic = 10
|
chaotic = 10
|
||||||
observers_used = TRUE
|
observers_used = TRUE
|
||||||
var/area/target_area // Chosen target area
|
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)
|
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()
|
/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()
|
/datum/gm_action/stowaway/announce()
|
||||||
spawn(rand(15 MINUTES, 30 MINUTES))
|
spawn(rand(15 MINUTES, 30 MINUTES))
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/datum/gm_action/nanotrasen_budget_allocation
|
/datum/gm_action/nanotrasen_budget_allocation
|
||||||
name = "supply point to cargo budget"
|
name = "supply point to cargo budget"
|
||||||
enabled = TRUE
|
enabled = TRUE
|
||||||
departments = list(ROLE_CARGO)
|
departments = list(DEPARTMENT_CARGO)
|
||||||
chaotic = 0
|
chaotic = 0
|
||||||
reusable = TRUE
|
reusable = TRUE
|
||||||
|
|
||||||
@@ -22,8 +22,8 @@
|
|||||||
/datum/gm_action/nanotrasen_budget_allocation/get_weight()
|
/datum/gm_action/nanotrasen_budget_allocation/get_weight()
|
||||||
. = round(SC.points / 15)
|
. = round(SC.points / 15)
|
||||||
|
|
||||||
var/cargo = metric.count_people_in_department(ROLE_CARGO)
|
var/cargo = metric.count_people_in_department(DEPARTMENT_CARGO)
|
||||||
var/personnel = metric.count_people_in_department(ROLE_EVERYONE)
|
var/personnel = metric.count_people_in_department(DEPARTMENT_EVERYONE)
|
||||||
if(cargo)
|
if(cargo)
|
||||||
. = round(SC.points / (10 + personnel)) + cargo * 10
|
. = round(SC.points / (10 + personnel)) + cargo * 10
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
/datum/gm_action/request
|
/datum/gm_action/request
|
||||||
name = "general request"
|
name = "general request"
|
||||||
departments = list(ROLE_CARGO)
|
departments = list(DEPARTMENT_CARGO)
|
||||||
|
|
||||||
/datum/gm_action/request/announce()
|
/datum/gm_action/request/announce()
|
||||||
spawn(rand(1 MINUTE, 2 MINUTES))
|
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")
|
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()
|
/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
|
/datum/gm_action/surprise_carp_attack
|
||||||
name = "surprise carp attack"
|
name = "surprise carp attack"
|
||||||
departments = list(ROLE_EVERYONE)
|
departments = list(DEPARTMENT_EVERYONE)
|
||||||
reusable = TRUE
|
reusable = TRUE
|
||||||
chaotic = 10
|
chaotic = 10
|
||||||
var/mob/living/victim = null
|
var/mob/living/victim = null
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
/datum/gm_action/surprise_meteors
|
/datum/gm_action/surprise_meteors
|
||||||
name = "surprise meteors"
|
name = "surprise meteors"
|
||||||
departments = list(ROLE_ENGINEERING)
|
departments = list(DEPARTMENT_ENGINEERING)
|
||||||
chaotic = 25
|
chaotic = 25
|
||||||
|
|
||||||
/datum/gm_action/surprise_meteors/get_weight()
|
/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.
|
var/weight = (max(engineers - 1, 0) * 25) // If only one engineer exists, no meteors for now.
|
||||||
return weight
|
return weight
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/datum/gm_action/swarm_boarder
|
/datum/gm_action/swarm_boarder
|
||||||
name = "swarmer shell"
|
name = "swarmer shell"
|
||||||
departments = list(ROLE_EVERYONE, ROLE_SECURITY, ROLE_ENGINEERING)
|
departments = list(DEPARTMENT_EVERYONE, DEPARTMENT_SECURITY, DEPARTMENT_ENGINEERING)
|
||||||
chaotic = 60
|
chaotic = 60
|
||||||
observers_used = TRUE
|
observers_used = TRUE
|
||||||
var/area/target_area // Chosen target area
|
var/area/target_area // Chosen target area
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
new swarmertype(target_turf)
|
new swarmertype(target_turf)
|
||||||
|
|
||||||
/datum/gm_action/swarm_boarder/get_weight()
|
/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()
|
/datum/gm_action/swarm_boarder/announce()
|
||||||
spawn(rand(5 MINUTES, 15 MINUTES))
|
spawn(rand(5 MINUTES, 15 MINUTES))
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/datum/gm_action/viral_infection
|
/datum/gm_action/viral_infection
|
||||||
name = "viral infection"
|
name = "viral infection"
|
||||||
departments = list(ROLE_MEDICAL)
|
departments = list(DEPARTMENT_MEDICAL)
|
||||||
chaotic = 5
|
chaotic = 5
|
||||||
var/list/viruses = list()
|
var/list/viruses = list()
|
||||||
severity = 1
|
severity = 1
|
||||||
@@ -80,4 +80,4 @@
|
|||||||
message_admins("Virus event affecting [english_list(used_candidates_links)] started; Viruses: [english_list(used_viruses_links)]")
|
message_admins("Virus event affecting [english_list(used_candidates_links)] started; Viruses: [english_list(used_viruses_links)]")
|
||||||
|
|
||||||
/datum/gm_action/viral_infection/get_weight()
|
/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
|
/datum/gm_action/viral_outbreak
|
||||||
name = "viral outbreak"
|
name = "viral outbreak"
|
||||||
departments = list(ROLE_MEDICAL, ROLE_EVERYONE)
|
departments = list(DEPARTMENT_MEDICAL, DEPARTMENT_EVERYONE)
|
||||||
chaotic = 30
|
chaotic = 30
|
||||||
severity = 1
|
severity = 1
|
||||||
var/list/candidates = list()
|
var/list/candidates = list()
|
||||||
@@ -29,9 +29,9 @@
|
|||||||
severity--
|
severity--
|
||||||
|
|
||||||
/datum/gm_action/viral_outbreak/get_weight()
|
/datum/gm_action/viral_outbreak/get_weight()
|
||||||
var/medical = metric.count_people_in_department(ROLE_MEDICAL)
|
var/medical = metric.count_people_in_department(DEPARTMENT_MEDICAL)
|
||||||
var/security = metric.count_people_in_department(ROLE_SECURITY)
|
var/security = metric.count_people_in_department(DEPARTMENT_SECURITY)
|
||||||
var/everyone = metric.count_people_in_department(ROLE_EVERYONE)
|
var/everyone = metric.count_people_in_department(DEPARTMENT_EVERYONE)
|
||||||
|
|
||||||
var/assigned_staff = medical + round(security / 2)
|
var/assigned_staff = medical + round(security / 2)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/datum/gm_action/wallrot
|
/datum/gm_action/wallrot
|
||||||
name = "wall rot"
|
name = "wall rot"
|
||||||
departments = list(ROLE_ENGINEERING)
|
departments = list(DEPARTMENT_ENGINEERING)
|
||||||
reusable = TRUE
|
reusable = TRUE
|
||||||
var/turf/simulated/wall/center
|
var/turf/simulated/wall/center
|
||||||
severity = 1
|
severity = 1
|
||||||
@@ -40,4 +40,4 @@
|
|||||||
break
|
break
|
||||||
|
|
||||||
/datum/gm_action/wallrot/get_weight()
|
/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
|
/datum/gm_action/waste_disposal
|
||||||
name = "waste disposal"
|
name = "waste disposal"
|
||||||
departments = list(ROLE_CARGO)
|
departments = list(DEPARTMENT_CARGO)
|
||||||
chaotic = 0
|
chaotic = 0
|
||||||
|
|
||||||
/datum/gm_action/waste_disposal/get_weight()
|
/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
|
/datum/gm_action/window_break
|
||||||
name = "window breach"
|
name = "window breach"
|
||||||
departments = list(ROLE_ENGINEERING)
|
departments = list(DEPARTMENT_ENGINEERING)
|
||||||
chaotic = 5
|
chaotic = 5
|
||||||
var/obj/structure/window/chosen_window
|
var/obj/structure/window/chosen_window
|
||||||
var/list/obj/structure/window/collateral_windows
|
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")
|
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()
|
/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"
|
name = "space-time anomalies"
|
||||||
chaotic = 70
|
chaotic = 70
|
||||||
length = 12 MINUTES
|
length = 12 MINUTES
|
||||||
departments = list(ROLE_EVERYONE)
|
departments = list(DEPARTMENT_EVERYONE)
|
||||||
severity = 1
|
severity = 1
|
||||||
|
|
||||||
/datum/gm_action/wormholes/set_up() // 1 out of 5 will be full-duration wormholes, meaning up to a minute long.
|
/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))
|
wormhole_event(length / 2, (severity / 3))
|
||||||
|
|
||||||
/datum/gm_action/wormholes/get_weight()
|
/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()
|
/datum/gm_action/wormholes/end()
|
||||||
command_announcement.Announce("There are no more space-time anomalies detected on the station.", "Anomaly Alert")
|
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)
|
for(var/datum/gm_action/action in available_actions)
|
||||||
if(!action.enabled)
|
if(!action.enabled)
|
||||||
continue
|
continue
|
||||||
if(ROLE_EVERYONE in action.departments)
|
if(DEPARTMENT_EVERYONE in action.departments)
|
||||||
best_actions.Add(action)
|
best_actions.Add(action)
|
||||||
log_debug("[action.name] is being considered because it involves everyone.")
|
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.
|
// This proc tries to find the department of an arbitrary mob.
|
||||||
/datum/metric/proc/guess_department(var/mob/M)
|
/datum/metric/proc/guess_department(var/mob/M)
|
||||||
var/list/found_roles = list()
|
var/list/found_roles = list()
|
||||||
. = ROLE_UNKNOWN
|
. = DEPARTMENT_UNKNOWN
|
||||||
|
|
||||||
// Records are usually the most reliable way to get what job someone is.
|
// 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)
|
var/datum/data/record/R = find_general_record("name", M.real_name)
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
var/recorded_rank = R.fields["real_rank"]
|
var/recorded_rank = R.fields["real_rank"]
|
||||||
found_roles = role_name_to_department(recorded_rank)
|
found_roles = role_name_to_department(recorded_rank)
|
||||||
. = found_roles[1]
|
. = 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
|
return
|
||||||
|
|
||||||
// They have a custom title, aren't crew, or someone deleted their record, so we need a fallback method.
|
// 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)
|
if(M.mind)
|
||||||
found_roles = role_name_to_department(M.mind.assigned_role)
|
found_roles = role_name_to_department(M.mind.assigned_role)
|
||||||
. = found_roles[1]
|
. = found_roles[1]
|
||||||
if(. != ROLE_UNKNOWN)
|
if(. != DEPARTMENT_UNKNOWN)
|
||||||
return
|
return
|
||||||
|
|
||||||
// At this point, they don't have a mind, or for some reason assigned_role didn't work.
|
// 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 = role_name_to_department(M.job)
|
||||||
. = found_roles[1]
|
. = found_roles[1]
|
||||||
if(. != ROLE_UNKNOWN)
|
if(. != DEPARTMENT_UNKNOWN)
|
||||||
return
|
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.
|
// 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
|
// 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)
|
/datum/metric/proc/role_name_to_department(var/role_name)
|
||||||
var/list/result = list()
|
var/list/result = list()
|
||||||
|
|
||||||
if(role_name in security_positions)
|
if(SSjob.is_job_in_department(role_name, DEPARTMENT_SECURITY))
|
||||||
result += ROLE_SECURITY
|
result += DEPARTMENT_SECURITY
|
||||||
|
|
||||||
if(role_name in engineering_positions)
|
if(SSjob.is_job_in_department(role_name, DEPARTMENT_ENGINEERING))
|
||||||
result += ROLE_ENGINEERING
|
result += DEPARTMENT_ENGINEERING
|
||||||
|
|
||||||
if(role_name in medical_positions)
|
if(SSjob.is_job_in_department(role_name, DEPARTMENT_MEDICAL))
|
||||||
result += ROLE_MEDICAL
|
result += DEPARTMENT_MEDICAL
|
||||||
|
|
||||||
if(role_name in science_positions)
|
if(SSjob.is_job_in_department(role_name, DEPARTMENT_RESEARCH))
|
||||||
result += ROLE_RESEARCH
|
result += DEPARTMENT_RESEARCH
|
||||||
|
|
||||||
if(role_name in cargo_positions)
|
if(SSjob.is_job_in_department(role_name, DEPARTMENT_CARGO))
|
||||||
result += ROLE_CARGO
|
result += DEPARTMENT_CARGO
|
||||||
|
|
||||||
if(role_name in civilian_positions)
|
if(SSjob.is_job_in_department(role_name, DEPARTMENT_CIVILIAN))
|
||||||
result += ROLE_CIVILIAN
|
result += DEPARTMENT_CIVILIAN
|
||||||
|
|
||||||
if(role_name in nonhuman_positions)
|
if(SSjob.is_job_in_department(role_name, DEPARTMENT_SYNTHETIC))
|
||||||
result += ROLE_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.
|
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 += ROLE_COMMAND
|
result += DEPARTMENT_COMMAND
|
||||||
|
|
||||||
if(!result.len) // No department was found.
|
if(!result.len) // No department was found.
|
||||||
result += ROLE_UNKNOWN
|
result += DEPARTMENT_UNKNOWN
|
||||||
return result
|
return result
|
||||||
|
|
||||||
/datum/metric/proc/count_people_in_department(var/department)
|
/datum/metric/proc/count_people_in_department(var/department)
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
|
|
||||||
/datum/metric
|
/datum/metric
|
||||||
var/list/departments = list(
|
var/list/departments = list(
|
||||||
ROLE_COMMAND,
|
DEPARTMENT_COMMAND,
|
||||||
ROLE_SECURITY,
|
DEPARTMENT_SECURITY,
|
||||||
ROLE_ENGINEERING,
|
DEPARTMENT_ENGINEERING,
|
||||||
ROLE_MEDICAL,
|
DEPARTMENT_MEDICAL,
|
||||||
ROLE_RESEARCH,
|
DEPARTMENT_RESEARCH,
|
||||||
ROLE_CARGO,
|
DEPARTMENT_CARGO,
|
||||||
ROLE_CIVILIAN,
|
DEPARTMENT_CIVILIAN,
|
||||||
ROLE_SYNTHETIC
|
DEPARTMENT_SYNTHETIC
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -44,14 +44,16 @@
|
|||||||
data["id_owner"] = id_card && id_card.registered_name ? id_card.registered_name : "-----"
|
data["id_owner"] = id_card && id_card.registered_name ? id_card.registered_name : "-----"
|
||||||
data["id_name"] = id_card ? id_card.name : "-----"
|
data["id_name"] = id_card ? id_card.name : "-----"
|
||||||
|
|
||||||
data["command_jobs"] = format_jobs(command_positions)
|
var/list/departments = list()
|
||||||
data["engineering_jobs"] = format_jobs(engineering_positions)
|
for(var/D in SSjob.get_all_department_datums())
|
||||||
data["medical_jobs"] = format_jobs(medical_positions)
|
var/datum/department/dept = D
|
||||||
data["science_jobs"] = format_jobs(science_positions)
|
if(!dept.assignable) // No AI ID cards for you.
|
||||||
data["security_jobs"] = format_jobs(security_positions)
|
continue
|
||||||
data["cargo_jobs"] = format_jobs(cargo_positions)
|
if(dept.centcom_only && !is_centcom)
|
||||||
data["civilian_jobs"] = format_jobs(civilian_positions)
|
continue
|
||||||
data["centcom_jobs"] = format_jobs(get_all_centcom_jobs())
|
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["all_centcom_access"] = is_centcom ? get_accesses(1) : null
|
||||||
data["regions"] = get_accesses()
|
data["regions"] = get_accesses()
|
||||||
|
|||||||
@@ -50,10 +50,15 @@ var/const/access_explorer = 43
|
|||||||
return get_all_station_access()
|
return get_all_station_access()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/datum/department/planetside
|
||||||
|
name = DEPARTMENT_PLANET
|
||||||
|
color = "#555555"
|
||||||
|
sorting_order = 2 // Same as cargo in importance.
|
||||||
|
|
||||||
/datum/job/pilot
|
/datum/job/pilot
|
||||||
title = "Pilot"
|
title = "Pilot"
|
||||||
flag = PILOT
|
flag = PILOT
|
||||||
department = "Civilian"
|
departments = list(DEPARTMENT_PLANET)
|
||||||
department_flag = CIVILIAN
|
department_flag = CIVILIAN
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 2
|
total_positions = 2
|
||||||
@@ -68,12 +73,12 @@ var/const/access_explorer = 43
|
|||||||
/datum/job/explorer
|
/datum/job/explorer
|
||||||
title = "Explorer"
|
title = "Explorer"
|
||||||
flag = EXPLORER
|
flag = EXPLORER
|
||||||
department = "Civilian"
|
departments = list(DEPARTMENT_PLANET)
|
||||||
department_flag = CIVILIAN
|
department_flag = CIVILIAN
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 4
|
total_positions = 4
|
||||||
spawn_positions = 4
|
spawn_positions = 4
|
||||||
supervisors = "the explorer leader and the head of personnel"
|
supervisors = "the head of personnel"
|
||||||
selection_color = "#515151"
|
selection_color = "#515151"
|
||||||
economic_modifier = 4
|
economic_modifier = 4
|
||||||
access = list(access_explorer)
|
access = list(access_explorer)
|
||||||
@@ -88,7 +93,7 @@ var/const/access_explorer = 43
|
|||||||
/datum/job/sar
|
/datum/job/sar
|
||||||
title = "Search and Rescue"
|
title = "Search and Rescue"
|
||||||
flag = SAR
|
flag = SAR
|
||||||
department = "Medical"
|
departments = list(DEPARTMENT_MEDICAL, DEPARTMENT_PLANET)
|
||||||
department_flag = MEDSCI
|
department_flag = MEDSCI
|
||||||
faction = "Station"
|
faction = "Station"
|
||||||
total_positions = 2
|
total_positions = 2
|
||||||
|
|||||||
@@ -57,39 +57,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
{{if data.authenticated}}
|
{{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}}
|
{{if data.has_modify}}
|
||||||
<div class='item'>
|
<div class='item'>
|
||||||
<h2>Details</h2>
|
<h2>Details</h2>
|
||||||
@@ -135,38 +104,30 @@
|
|||||||
<div class='item'>
|
<div class='item'>
|
||||||
<h2>Assignment</h2>
|
<h2>Assignment</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='item'>
|
<div class='item'>
|
||||||
<span id='allvalue.jobsslot'><a href='#' onclick='showAll()'>{{:data.target_rank}}</a></span>
|
<div id="all-value.jobs">
|
||||||
</div>
|
|
||||||
<div class='item'>
|
|
||||||
<div id="all-value.jobs" style='display: none;'>
|
|
||||||
<table>
|
<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>
|
<tr>
|
||||||
<th>Special</th>
|
<th>Special</th>
|
||||||
<td>
|
<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'})}}
|
{{:helper.link("Custom", '', {'choice' : 'assign', 'assign_target' : 'Custom'})}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</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>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{if data.centcom_access}}
|
{{if data.centcom_access}}
|
||||||
<div class='item'>
|
<div class='item'>
|
||||||
<h2>Central Command</h2>
|
<h2>Central Command</h2>
|
||||||
|
|||||||
@@ -1,191 +1,142 @@
|
|||||||
{{if data.have_id_slot}}{{:helper.link('Access Modification', 'home', {'action' : 'switchm', 'target' : 'mod'}, data.mmode ? 'disabled' : null)}}{{/if}}
|
{{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)}}
|
{{: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.have_printer}}
|
||||||
|
{{:helper.link('Print', 'print', {'action' : 'print'}, (!data.mmode || data.has_id) ? null : 'disabled')}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{if !data.mmode}}
|
{{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>
|
|
||||||
|
|
||||||
{{if data.authenticated}}
|
|
||||||
{{if data.has_id}}
|
|
||||||
<div class='item'>
|
<div class='item'>
|
||||||
<h2>Details</h2>
|
<h2>Crew Manifest</h2>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class='item'>
|
|
||||||
<div class='itemLabel'>
|
|
||||||
Registered Name:
|
|
||||||
</div>
|
|
||||||
<div class='itemContent'>
|
|
||||||
{{:helper.link(data.id_owner, 'pencil', {'action' : 'edit', 'name' : 1})}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class='item'>
|
|
||||||
<div class='itemLabel'>
|
|
||||||
Account Number:
|
|
||||||
</div>
|
|
||||||
<div class='itemContent'>
|
|
||||||
{{:helper.link(data.id_account_number, 'pencil', {'action' : 'edit', 'account' : 1})}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class='item'>
|
<div class='item'>
|
||||||
<div class='itemLabel'>
|
{{:data.manifest}}
|
||||||
Terminations:
|
</div>
|
||||||
</div>
|
|
||||||
<div class='itemContent'>
|
{{else}}
|
||||||
{{:helper.link('Terminate ' + data.id_owner, 'gear', {'action' : 'terminate'}, data.id_rank == "Terminated" ? 'disabled' : null, data.id_rank == "Terminated" ? 'disabled' : 'linkDanger')}}
|
<div class='item'>
|
||||||
</div>
|
<h2>Access Modification</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='item'>
|
{{if !data.has_id}}
|
||||||
<h2>Assignment</h2>
|
<span class='alert'><i>Please insert the ID into the terminal to proceed.</i></span><br>
|
||||||
</div>
|
{{/if}}
|
||||||
{{:helper.link(data.assignments ? "Hide assignments" : "Show assignments", 'gear', {'action' : 'togglea'})}}
|
|
||||||
<div class='item'>
|
<div class='item'>
|
||||||
<span id='allvalue.jobsslot'>
|
<div class='itemLabel'>
|
||||||
|
Target Identity:
|
||||||
</span>
|
</div>
|
||||||
</div>
|
<div class='itemContent'>
|
||||||
<div class='item'>
|
{{:helper.link(data.id_name, 'eject', {'action' : 'eject'})}}
|
||||||
{{if data.assignments}}
|
</div>
|
||||||
<div id="all-value.jobs">
|
</div>
|
||||||
<table>
|
<hr>
|
||||||
<tr>
|
|
||||||
<th></th><th>Command</th>
|
{{if data.authenticated}}
|
||||||
</tr>
|
{{if data.has_id}}
|
||||||
<tr>
|
<div class='item'>
|
||||||
<th>Special</th>
|
<h2>Details</h2>
|
||||||
<td>
|
</div>
|
||||||
{{:helper.link("Captain", '', {'action' : 'assign', 'assign_target' : 'Captain'}, data.id_rank == 'Captain' ? 'disabled' : null)}}
|
|
||||||
{{:helper.link("Custom", '', {'action' : 'assign', 'assign_target' : 'Custom'})}}
|
<div class='item'>
|
||||||
</td>
|
<div class='itemLabel'>
|
||||||
</tr>
|
Registered Name:
|
||||||
<tr>
|
</div>
|
||||||
<th style="color: '#FFA500';">Engineering</th>
|
|
||||||
<td>
|
<div class='itemContent'>
|
||||||
{{for data.engineering_jobs}}
|
{{:helper.link(data.id_owner, 'pencil', {'action' : 'edit', 'name' : 1})}}
|
||||||
{{:helper.link(value.display_name, '', {'action' : 'assign', 'assign_target' : value.job}, data.id_rank == value.job ? 'disabled' : null)}}
|
</div>
|
||||||
{{/for}}
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
<div class='item'>
|
||||||
<tr>
|
<div class='itemLabel'>
|
||||||
<th style="color: '#008000';">Medical</th>
|
Account Number:
|
||||||
<td>
|
</div>
|
||||||
{{for data.medical_jobs}}
|
|
||||||
{{:helper.link(value.display_name, '', {'action' : 'assign', 'assign_target' : value.job}, data.id_rank == value.job ? 'disabled' : null)}}
|
<div class='itemContent'>
|
||||||
{{/for}}
|
{{:helper.link(data.id_account_number, 'pencil', {'action' : 'edit', 'account' : 1})}}
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
|
||||||
<th style="color: '#800080';">Science</th>
|
<div class='item'>
|
||||||
<td>
|
<div class='itemLabel'>
|
||||||
{{for data.science_jobs}}
|
Terminations:
|
||||||
{{:helper.link(value.display_name, '', {'action' : 'assign', 'assign_target' : value.job}, data.id_rank == value.job ? 'disabled' : null)}}
|
</div>
|
||||||
{{/for}}
|
|
||||||
</td>
|
<div class='itemContent'>
|
||||||
</tr>
|
{{:helper.link('Terminate ' + data.id_owner, 'gear', {'action' : 'terminate'}, data.id_rank == "Terminated" ? 'disabled' : null, data.id_rank == "Terminated" ? 'disabled' : 'linkDanger')}}
|
||||||
<tr>
|
</div>
|
||||||
<th style="color: '#DD0000';">Security</th>
|
</div>
|
||||||
<td>
|
|
||||||
{{for data.security_jobs}}
|
<div class='item'>
|
||||||
{{:helper.link(value.display_name, '', {'action' : 'assign', 'assign_target' : value.job}, data.id_rank == value.job ? 'disabled' : null)}}
|
<h2>Assignment</h2>
|
||||||
{{/for}}
|
</div>
|
||||||
</td>
|
|
||||||
</tr>
|
{{:helper.link(data.assignments ? "Hide assignments" : "Show assignments", 'gear', {'action' : 'togglea'})}}
|
||||||
<tr>
|
|
||||||
<th style="color: '#cc6600';">Cargo</th>
|
<div class='item'>
|
||||||
<td>
|
<span id='allvalue.jobsslot'>
|
||||||
{{for data.cargo_jobs}}
|
|
||||||
{{if index && index % 6 === 0}}
|
</span>
|
||||||
</td></tr><tr><th></th><td>
|
</div>
|
||||||
{{/if}}
|
|
||||||
{{:helper.link(value.display_name, '', {'action' : 'assign', 'assign_target' : value.job}, data.id_rank == value.job ? 'disabled' : null)}}
|
<div class='item'>
|
||||||
{{/for}}
|
{{if data.assignments}}
|
||||||
</td>
|
<div id="all-value.jobs">
|
||||||
</tr>
|
<table>
|
||||||
<tr>
|
{{for data.departments}}
|
||||||
<th style="color: '#808080';">Civilian</th>
|
<tr>
|
||||||
<td>
|
<th>{{:value.department_name}}</th>
|
||||||
{{for data.civilian_jobs}}
|
<td>
|
||||||
{{if index && index % 6 === 0}}
|
{{for value.jobs :jobValue:jobIndex}}
|
||||||
</td></tr><tr><th></th><td>
|
{{:helper.link(jobValue.display_name, '', {'action' : 'assign', 'assign_target' : jobValue.job}, data.id_rank == jobValue.job ? 'disabled' : null)}}
|
||||||
{{/if}}
|
{{/for}}
|
||||||
{{:helper.link(value.display_name, '', {'action' : 'assign', 'assign_target' : value.job}, data.id_rank == value.job ? 'disabled' : null)}}
|
</td>
|
||||||
{{/for}}
|
</tr>
|
||||||
</td>
|
{{/for}}
|
||||||
</tr>
|
<tr>
|
||||||
{{if data.centcom_access}}
|
<th>Special</th>
|
||||||
<tr>
|
<td>
|
||||||
<th style="color: '#A52A2A';">CentCom</th>
|
{{:helper.link("Custom", '', {'action' : 'assign', 'assign_target' : 'Custom'})}}
|
||||||
<td>
|
</td>
|
||||||
{{for data.centcom_jobs}}
|
</tr>
|
||||||
{{if index % 6 === 0}}
|
</table>
|
||||||
</td></tr><tr><th></th><td>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
</div>
|
||||||
{{:helper.link(value.display_name, '', {'action' : 'assign', 'assign_target' : value.job}, data.id_rank == value.job ? 'disabled' : null)}}
|
|
||||||
{{/for}}
|
{{if data.centcom_access}}
|
||||||
</td>
|
<div class='item'>
|
||||||
</tr>
|
<h2>Central Command</h2>
|
||||||
{{/if}}
|
</div>
|
||||||
</table>
|
<div class='item' style='width: 100%'>
|
||||||
</div>
|
{{for data.all_centcom_access}}
|
||||||
{{/if}}
|
<div class='itemContentWide'>
|
||||||
</div>
|
{{:helper.link(value.desc, '', {'action' : 'access', 'access_target' : value.ref, 'allowed' : value.allowed}, null, value.allowed ? 'selected' : null)}}
|
||||||
|
</div>
|
||||||
{{if data.centcom_access}}
|
{{/for}}
|
||||||
<div class='item'>
|
</div>
|
||||||
<h2>Central Command</h2>
|
{{else}}
|
||||||
</div>
|
<div class='item'>
|
||||||
<div class='item' style='width: 100%'>
|
<h2>{{:data.station_name}}</h2>
|
||||||
{{for data.all_centcom_access}}
|
</div>
|
||||||
<div class='itemContentWide'>
|
<div class='item' style='width: 100%'>
|
||||||
{{:helper.link(value.desc, '', {'action' : 'access', 'access_target' : value.ref, 'allowed' : value.allowed}, null, value.allowed ? 'selected' : null)}}
|
{{for data.regions}}
|
||||||
</div>
|
<div style='float: left; width: 175px; min-height: 250px'>
|
||||||
{{/for}}
|
<div class='average'><b>{{:value.name}}</b></div>
|
||||||
</div>
|
{{for value.accesses :accessValue:accessKey}}
|
||||||
{{else}}
|
<div class='itemContentWide'>
|
||||||
<div class='item'>
|
{{:helper.link(accessValue.desc, '', {'action' : 'access', 'access_target' : accessValue.ref, 'allowed' : accessValue.allowed}, null, accessValue.allowed ? 'selected' : null)}}
|
||||||
<h2>{{:data.station_name}}</h2>
|
</div>
|
||||||
</div>
|
{{/for}}
|
||||||
<div class='item' style='width: 100%'>
|
</div>
|
||||||
{{for data.regions}}
|
{{/for}}
|
||||||
<div style='float: left; width: 175px; min-height: 250px'>
|
</div>
|
||||||
<div class='average'><b>{{:value.name}}</b></div>
|
{{/if}}
|
||||||
{{for value.accesses :accessValue:accessKey}}
|
{{/if}}
|
||||||
<div class='itemContentWide'>
|
|
||||||
{{:helper.link(accessValue.desc, '', {'action' : 'access', 'access_target' : accessValue.ref, 'allowed' : accessValue.allowed}, null, accessValue.allowed ? 'selected' : null)}}
|
|
||||||
</div>
|
|
||||||
{{/for}}
|
|
||||||
</div>
|
|
||||||
{{/for}}
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
|
||||||
@@ -206,6 +206,7 @@
|
|||||||
#include "code\controllers\subsystems\garbage.dm"
|
#include "code\controllers\subsystems\garbage.dm"
|
||||||
#include "code\controllers\subsystems\holomaps.dm"
|
#include "code\controllers\subsystems\holomaps.dm"
|
||||||
#include "code\controllers\subsystems\inactivity.dm"
|
#include "code\controllers\subsystems\inactivity.dm"
|
||||||
|
#include "code\controllers\subsystems\job.dm"
|
||||||
#include "code\controllers\subsystems\lighting.dm"
|
#include "code\controllers\subsystems\lighting.dm"
|
||||||
#include "code\controllers\subsystems\machines.dm"
|
#include "code\controllers\subsystems\machines.dm"
|
||||||
#include "code\controllers\subsystems\mapping.dm"
|
#include "code\controllers\subsystems\mapping.dm"
|
||||||
@@ -632,6 +633,7 @@
|
|||||||
#include "code\game\jobs\job\captain.dm"
|
#include "code\game\jobs\job\captain.dm"
|
||||||
#include "code\game\jobs\job\civilian.dm"
|
#include "code\game\jobs\job\civilian.dm"
|
||||||
#include "code\game\jobs\job\civilian_chaplain.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\engineering.dm"
|
||||||
#include "code\game\jobs\job\job.dm"
|
#include "code\game\jobs\job\job.dm"
|
||||||
#include "code\game\jobs\job\medical.dm"
|
#include "code\game\jobs\job\medical.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user