mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
Merge pull request #6766 from Kyep/demotion_console
Demotion Consoles: lets heads demote crew out of their department
This commit is contained in:
@@ -71,3 +71,10 @@
|
||||
#define PROGRAM_STATE_KILLED 0
|
||||
#define PROGRAM_STATE_BACKGROUND 1
|
||||
#define PROGRAM_STATE_ACTIVE 2
|
||||
|
||||
// Demotion Console (card/minor/*) departments
|
||||
#define TARGET_DEPT_GENERIC 1
|
||||
#define TARGET_DEPT_SEC 2
|
||||
#define TARGET_DEPT_MED 3
|
||||
#define TARGET_DEPT_SCI 4
|
||||
#define TARGET_DEPT_ENG 5
|
||||
@@ -5,6 +5,7 @@
|
||||
total_positions = -1
|
||||
spawn_positions = -1
|
||||
supervisors = "the head of personnel"
|
||||
department_head = list("Head of Personnel")
|
||||
selection_color = "#dddddd"
|
||||
access = list() //See /datum/job/assistant/get_access()
|
||||
minimal_access = list() //See /datum/job/assistant/get_access()
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
spawn_positions = 1
|
||||
is_engineering = 1
|
||||
supervisors = "the captain"
|
||||
department_head = list("Captain")
|
||||
selection_color = "#ffeeaa"
|
||||
req_admin_notify = 1
|
||||
access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels,
|
||||
@@ -52,6 +53,7 @@
|
||||
spawn_positions = 5
|
||||
is_engineering = 1
|
||||
supervisors = "the chief engineer"
|
||||
department_head = list("Chief Engineer")
|
||||
selection_color = "#fff5cc"
|
||||
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics, access_mineral_storeroom)
|
||||
minimal_access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_mineral_storeroom)
|
||||
@@ -89,6 +91,7 @@
|
||||
spawn_positions = 2
|
||||
is_engineering = 1
|
||||
supervisors = "the chief engineer"
|
||||
department_head = list("Chief Engineer")
|
||||
selection_color = "#fff5cc"
|
||||
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics, access_mineral_storeroom)
|
||||
minimal_access = list(access_eva, access_atmospherics, access_maint_tunnels, access_external_airlocks, access_emergency_storage, access_construction, access_mineral_storeroom)
|
||||
@@ -119,6 +122,7 @@
|
||||
spawn_positions = 1
|
||||
is_engineering = 1
|
||||
supervisors = "the chief engineer"
|
||||
department_head = list("Chief Engineer")
|
||||
selection_color = "#fff5cc"
|
||||
access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_mechanic, access_external_airlocks, access_mineral_storeroom)
|
||||
minimal_access = list(access_maint_tunnels, access_emergency_storage, access_mechanic, access_external_airlocks, access_mineral_storeroom)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
//Bitflags for the job
|
||||
var/flag = 0
|
||||
var/department_flag = 0
|
||||
var/department_head = list()
|
||||
|
||||
//Players will be allowed to spawn in as jobs that are set to "Station"
|
||||
var/list/faction = list("Station")
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
spawn_positions = 1
|
||||
is_medical = 1
|
||||
supervisors = "the captain"
|
||||
department_head = list("Captain")
|
||||
selection_color = "#ffddf0"
|
||||
req_admin_notify = 1
|
||||
access = list(access_medical, access_morgue, access_genetics, access_heads,
|
||||
@@ -47,6 +48,7 @@
|
||||
spawn_positions = 3
|
||||
is_medical = 1
|
||||
supervisors = "the chief medical officer"
|
||||
department_head = list("Chief Medical Officer")
|
||||
selection_color = "#ffeef0"
|
||||
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_mineral_storeroom)
|
||||
minimal_access = list(access_medical, access_morgue, access_surgery, access_maint_tunnels)
|
||||
@@ -142,6 +144,7 @@
|
||||
spawn_positions = 2
|
||||
is_medical = 1
|
||||
supervisors = "the chief medical officer"
|
||||
department_head = list("Chief Medical Officer")
|
||||
selection_color = "#ffeef0"
|
||||
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_mineral_storeroom)
|
||||
minimal_access = list(access_medical, access_chemistry, access_maint_tunnels, access_mineral_storeroom)
|
||||
@@ -175,6 +178,7 @@
|
||||
spawn_positions = 2
|
||||
is_medical = 1
|
||||
supervisors = "the chief medical officer and the research director"
|
||||
department_head = list("Chief Medical Officer", "Research Director")
|
||||
selection_color = "#ffeef0"
|
||||
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_research, access_mineral_storeroom)
|
||||
minimal_access = list(access_medical, access_morgue, access_genetics, access_research, access_maint_tunnels)
|
||||
@@ -208,6 +212,7 @@
|
||||
spawn_positions = 1
|
||||
is_medical = 1
|
||||
supervisors = "the chief medical officer"
|
||||
department_head = list("Chief Medical Officer")
|
||||
selection_color = "#ffeef0"
|
||||
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
|
||||
minimal_access = list(access_medical, access_virology, access_maint_tunnels, access_mineral_storeroom)
|
||||
@@ -242,6 +247,7 @@
|
||||
spawn_positions = 1
|
||||
is_medical = 1
|
||||
supervisors = "the chief medical officer"
|
||||
department_head = list("Chief Medical Officer")
|
||||
selection_color = "#ffeef0"
|
||||
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics, access_psychiatrist)
|
||||
minimal_access = list(access_medical, access_psychiatrist, access_maint_tunnels)
|
||||
@@ -279,6 +285,7 @@
|
||||
spawn_positions = 1
|
||||
is_medical = 1
|
||||
supervisors = "the chief medical officer"
|
||||
department_head = list("Chief Medical Officer")
|
||||
selection_color = "#ffeef0"
|
||||
access = list(access_paramedic, access_medical, access_maint_tunnels, access_external_airlocks, access_morgue)
|
||||
minimal_access=list(access_paramedic, access_medical, access_maint_tunnels, access_external_airlocks, access_morgue)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
spawn_positions = 1
|
||||
is_science = 1
|
||||
supervisors = "the captain"
|
||||
department_head = list("Captain")
|
||||
selection_color = "#ffddff"
|
||||
req_admin_notify = 1
|
||||
access = list(access_rd, access_heads, access_tox, access_genetics, access_morgue,
|
||||
@@ -55,6 +56,7 @@
|
||||
spawn_positions = 6
|
||||
is_science = 1
|
||||
supervisors = "the research director"
|
||||
department_head = list("Research Director")
|
||||
selection_color = "#ffeeff"
|
||||
access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_xenoarch, access_mineral_storeroom)
|
||||
minimal_access = list(access_tox, access_tox_storage, access_research, access_xenobiology, access_xenoarch, access_maint_tunnels, access_mineral_storeroom)
|
||||
@@ -93,6 +95,7 @@
|
||||
spawn_positions = 2
|
||||
is_science = 1
|
||||
supervisors = "the research director"
|
||||
department_head = list("Research Director")
|
||||
selection_color = "#ffeeff"
|
||||
access = list(access_robotics, access_tox, access_tox_storage, access_tech_storage, access_morgue, access_research, access_mineral_storeroom) //As a job that handles so many corpses, it makes sense for them to have morgue access.
|
||||
minimal_access = list(access_robotics, access_tech_storage, access_morgue, access_research, access_maint_tunnels, access_mineral_storeroom) //As a job that handles so many corpses, it makes sense for them to have morgue access.
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
spawn_positions = 1
|
||||
is_security = 1
|
||||
supervisors = "the captain"
|
||||
department_head = list("Captain")
|
||||
selection_color = "#ffdddd"
|
||||
req_admin_notify = 1
|
||||
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court,
|
||||
@@ -56,6 +57,7 @@
|
||||
spawn_positions = 1
|
||||
is_security = 1
|
||||
supervisors = "the head of security"
|
||||
department_head = list("Head of Security")
|
||||
selection_color = "#ffeeee"
|
||||
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_morgue, access_weapons)
|
||||
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_weapons)
|
||||
@@ -99,6 +101,7 @@
|
||||
spawn_positions = 1
|
||||
is_security = 1
|
||||
supervisors = "the head of security"
|
||||
department_head = list("Head of Security")
|
||||
selection_color = "#ffeeee"
|
||||
alt_titles = list("Forensic Technician")
|
||||
access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court, access_weapons)
|
||||
@@ -157,6 +160,7 @@
|
||||
spawn_positions = 7
|
||||
is_security = 1
|
||||
supervisors = "the head of security"
|
||||
department_head = list("Head of Security")
|
||||
selection_color = "#ffeeee"
|
||||
access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue, access_weapons)
|
||||
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_weapons)
|
||||
@@ -199,6 +203,7 @@
|
||||
spawn_positions = 1
|
||||
is_security = 1
|
||||
supervisors = "the head of security"
|
||||
department_head = list("Head of Security")
|
||||
selection_color = "#ffeeee"
|
||||
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
|
||||
minimal_access = list(access_medical, access_morgue, access_surgery, access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels)
|
||||
@@ -234,6 +239,7 @@
|
||||
spawn_positions = 1
|
||||
is_security = 1
|
||||
supervisors = "the head of security"
|
||||
department_head = list("Head of Security")
|
||||
selection_color = "#ffeeee"
|
||||
access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue, access_weapons, access_pilot, access_external_airlocks)
|
||||
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_weapons, access_pilot, access_external_airlocks)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
spawn_positions = 1
|
||||
selection_color = "#ccffcc"
|
||||
supervisors = "your laws"
|
||||
department_head = list("Captain")
|
||||
req_admin_notify = 1
|
||||
minimal_player_age = 30
|
||||
exp_requirements = 1200
|
||||
@@ -26,6 +27,7 @@
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "your laws and the AI" //Nodrak
|
||||
department_head = list("AI")
|
||||
selection_color = "#ddffdd"
|
||||
minimal_player_age = 21
|
||||
exp_requirements = 300
|
||||
|
||||
@@ -6,6 +6,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 0)
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "Nanotrasen officials"
|
||||
department_head = list("Nanotrasen Navy Officer")
|
||||
selection_color = "#ccccff"
|
||||
req_admin_notify = 1
|
||||
is_command = 1
|
||||
@@ -64,6 +65,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 0)
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the captain"
|
||||
department_head = list("Captain")
|
||||
selection_color = "#ddddff"
|
||||
req_admin_notify = 1
|
||||
is_command = 1
|
||||
@@ -111,6 +113,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 0)
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the command staff"
|
||||
department_head = list("Captain")
|
||||
selection_color = "#ddddff"
|
||||
req_admin_notify = 1
|
||||
is_command = 1
|
||||
@@ -156,6 +159,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 0)
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the Nanotrasen representative"
|
||||
department_head = list("Captain")
|
||||
selection_color = "#ddddff"
|
||||
req_admin_notify = 1
|
||||
is_command = 1
|
||||
@@ -202,6 +206,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 0)
|
||||
total_positions = 1
|
||||
spawn_positions = 1
|
||||
supervisors = "the Nanotrasen Supreme Court"
|
||||
department_head = list("Captain")
|
||||
selection_color = "#ddddff"
|
||||
req_admin_notify = 1
|
||||
is_legal = 1
|
||||
@@ -250,6 +255,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 0)
|
||||
spawn_positions = 2
|
||||
is_legal = 1
|
||||
supervisors = "the magistrate"
|
||||
department_head = list("Captain")
|
||||
selection_color = "#ddddff"
|
||||
access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels)
|
||||
minimal_access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
spawn_positions = 1
|
||||
is_service = 1
|
||||
supervisors = "the head of personnel"
|
||||
department_head = list("Head of Personnel")
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue, access_weapons, access_mineral_storeroom)
|
||||
minimal_access = list(access_bar, access_maint_tunnels, access_weapons, access_mineral_storeroom)
|
||||
@@ -46,6 +47,7 @@
|
||||
spawn_positions = 1
|
||||
is_service = 1
|
||||
supervisors = "the head of personnel"
|
||||
department_head = list("Head of Personnel")
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue)
|
||||
minimal_access = list(access_kitchen, access_maint_tunnels)
|
||||
@@ -73,6 +75,7 @@
|
||||
spawn_positions = 2
|
||||
is_service = 1
|
||||
supervisors = "the head of personnel"
|
||||
department_head = list("Head of Personnel")
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue)
|
||||
minimal_access = list(access_hydroponics, access_morgue, access_maint_tunnels)
|
||||
@@ -106,6 +109,7 @@
|
||||
spawn_positions = 1
|
||||
is_supply = 1
|
||||
supervisors = "the head of personnel"
|
||||
department_head = list("Head of Personnel")
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station, access_mineral_storeroom)
|
||||
minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station, access_mineral_storeroom)
|
||||
@@ -133,6 +137,7 @@
|
||||
spawn_positions = 2
|
||||
is_supply = 1
|
||||
supervisors = "the quartermaster"
|
||||
department_head = list("Head of Personnel")
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station, access_mineral_storeroom)
|
||||
minimal_access = list(access_maint_tunnels, access_cargo, access_cargo_bot, access_mailsorting, access_mineral_storeroom)
|
||||
@@ -158,6 +163,7 @@
|
||||
spawn_positions = 3
|
||||
is_supply = 1
|
||||
supervisors = "the quartermaster"
|
||||
department_head = list("Head of Personnel")
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station, access_mineral_storeroom)
|
||||
minimal_access = list(access_mining, access_mint, access_mining_station, access_mailsorting, access_maint_tunnels, access_mineral_storeroom)
|
||||
@@ -196,6 +202,7 @@
|
||||
spawn_positions = 1
|
||||
is_service = 1
|
||||
supervisors = "the head of personnel"
|
||||
department_head = list("Head of Personnel")
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_clown, access_theatre, access_maint_tunnels)
|
||||
minimal_access = list(access_clown, access_theatre, access_maint_tunnels)
|
||||
@@ -252,6 +259,7 @@
|
||||
spawn_positions = 1
|
||||
is_service = 1
|
||||
supervisors = "the head of personnel"
|
||||
department_head = list("Head of Personnel")
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_mime, access_theatre, access_maint_tunnels)
|
||||
minimal_access = list(access_mime, access_theatre, access_maint_tunnels)
|
||||
@@ -303,6 +311,7 @@
|
||||
spawn_positions = 1
|
||||
is_service = 1
|
||||
supervisors = "the head of personnel"
|
||||
department_head = list("Head of Personnel")
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_janitor, access_maint_tunnels)
|
||||
minimal_access = list(access_janitor, access_maint_tunnels)
|
||||
@@ -328,6 +337,7 @@
|
||||
spawn_positions = 1
|
||||
is_service = 1
|
||||
supervisors = "the head of personnel"
|
||||
department_head = list("Head of Personnel")
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_library, access_maint_tunnels)
|
||||
minimal_access = list(access_library, access_maint_tunnels)
|
||||
@@ -354,6 +364,7 @@
|
||||
spawn_positions = 1
|
||||
is_service = 1
|
||||
supervisors = "the head of personnel"
|
||||
department_head = list("Head of Personnel")
|
||||
selection_color = "#dddddd"
|
||||
alt_titles = list("Hair Stylist","Beautician")
|
||||
access = list(access_maint_tunnels)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
spawn_positions = 1
|
||||
is_service = 1
|
||||
supervisors = "the head of personnel"
|
||||
department_head = list("Head of Personnel")
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_morgue, access_chapel_office, access_crematorium, access_maint_tunnels)
|
||||
minimal_access = list(access_morgue, access_chapel_office, access_crematorium, access_maint_tunnels)
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
var/frame_desc = null
|
||||
var/contain_parts = 1
|
||||
toolspeed = 1
|
||||
usesound = 'sound/items/Deconstruct.ogg'
|
||||
usesound = 'sound/items/Deconstruct.ogg'
|
||||
|
||||
/obj/item/weapon/circuitboard/computer
|
||||
board_type = "computer"
|
||||
|
||||
board_type = "computer"
|
||||
|
||||
/obj/item/weapon/circuitboard/machine
|
||||
board_type = "machine"
|
||||
|
||||
board_type = "machine"
|
||||
|
||||
/obj/item/weapon/circuitboard/message_monitor
|
||||
name = "Circuit board (Message Monitor)"
|
||||
build_path = /obj/machinery/computer/message_monitor
|
||||
@@ -80,6 +80,26 @@
|
||||
/obj/item/weapon/circuitboard/card
|
||||
name = "Circuit board (ID Computer)"
|
||||
build_path = /obj/machinery/computer/card
|
||||
/obj/item/weapon/circuitboard/card/minor
|
||||
name = "Circuit board (Dept ID Computer)"
|
||||
build_path = /obj/machinery/computer/card/minor
|
||||
var/target_dept = TARGET_DEPT_GENERIC
|
||||
/obj/item/weapon/circuitboard/card/minor/hos
|
||||
name = "Circuit board (Sec ID Computer)"
|
||||
build_path = /obj/machinery/computer/card/minor/hos
|
||||
target_dept = TARGET_DEPT_SEC
|
||||
/obj/item/weapon/circuitboard/card/minor/cmo
|
||||
name = "Circuit board (Medical ID Computer)"
|
||||
build_path = /obj/machinery/computer/card/minor/cmo
|
||||
target_dept = TARGET_DEPT_MED
|
||||
/obj/item/weapon/circuitboard/card/minor/rd
|
||||
name = "Circuit board (Science ID Computer)"
|
||||
build_path = /obj/machinery/computer/card/minor/rd
|
||||
target_dept = TARGET_DEPT_SCI
|
||||
/obj/item/weapon/circuitboard/card/minor/ce
|
||||
name = "Circuit board (Engineering ID Computer)"
|
||||
build_path = /obj/machinery/computer/card/minor/ce
|
||||
target_dept = TARGET_DEPT_ENG
|
||||
/obj/item/weapon/circuitboard/card/centcom
|
||||
name = "Circuit board (CentComm ID Computer)"
|
||||
build_path = /obj/machinery/computer/card/centcom
|
||||
|
||||
@@ -14,6 +14,7 @@ var/time_last_changed_position = 0
|
||||
var/obj/item/weapon/card/id/modify = null
|
||||
var/mode = 0.0
|
||||
var/printing = null
|
||||
var/target_dept = 0 //Which department this computer has access to. 0=all departments
|
||||
|
||||
//Cooldown for closing positions in seconds
|
||||
//if set to -1: No cooldown... probably a bad idea
|
||||
@@ -65,10 +66,11 @@ var/time_last_changed_position = 0
|
||||
/obj/machinery/computer/card/proc/format_jobs(list/jobs)
|
||||
var/list/formatted = list()
|
||||
for(var/job in jobs)
|
||||
formatted.Add(list(list(
|
||||
"display_name" = replacetext(job, " ", " "),
|
||||
"target_rank" = get_target_rank(),
|
||||
"job" = job)))
|
||||
if(job_in_department(job_master.GetJob(job)))
|
||||
formatted.Add(list(list(
|
||||
"display_name" = replacetext(job, " ", " "),
|
||||
"target_rank" = get_target_rank(),
|
||||
"job" = job)))
|
||||
|
||||
return formatted
|
||||
|
||||
@@ -77,6 +79,8 @@ var/time_last_changed_position = 0
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
if(job_blacklisted(job))
|
||||
continue
|
||||
if(!job_in_department(job))
|
||||
continue
|
||||
formatted.Add(list(list(
|
||||
"title" = job.title,
|
||||
"current_positions" = job.current_positions,
|
||||
@@ -92,7 +96,6 @@ var/time_last_changed_position = 0
|
||||
formatted.Add(list(list(
|
||||
"display_name" = get_skin_desc(skin),
|
||||
"skin" = skin)))
|
||||
|
||||
return formatted
|
||||
|
||||
/obj/machinery/computer/card/verb/eject_id()
|
||||
@@ -100,7 +103,7 @@ var/time_last_changed_position = 0
|
||||
set name = "Eject ID Card"
|
||||
set src in oview(1)
|
||||
|
||||
if(usr.restrained())
|
||||
if(usr.restrained())
|
||||
return
|
||||
|
||||
if(scan)
|
||||
@@ -141,7 +144,7 @@ var/time_last_changed_position = 0
|
||||
//Logic check for Topic() if you can open the job
|
||||
/obj/machinery/computer/card/proc/can_open_job(datum/job/job)
|
||||
if(job)
|
||||
if(!job_blacklisted(job))
|
||||
if(!job_blacklisted(job) && job_in_department(job, FALSE))
|
||||
if((job.total_positions <= player_list.len * (max_relative_positions / 100)))
|
||||
var/delta = (world.time / 10) - time_last_changed_position
|
||||
if((change_position_cooldown < delta) || (opened_positions[job.title] < 0))
|
||||
@@ -153,7 +156,7 @@ var/time_last_changed_position = 0
|
||||
//Logic check for Topic() if you can close the job
|
||||
/obj/machinery/computer/card/proc/can_close_job(datum/job/job)
|
||||
if(job)
|
||||
if(!job_blacklisted(job))
|
||||
if(!job_blacklisted(job) && job_in_department(job, FALSE))
|
||||
if(job.total_positions > job.current_positions)
|
||||
var/delta = (world.time / 10) - time_last_changed_position
|
||||
if((change_position_cooldown < delta) || (opened_positions[job.title] > 0))
|
||||
@@ -162,6 +165,28 @@ var/time_last_changed_position = 0
|
||||
return -1
|
||||
return 0
|
||||
|
||||
/obj/machinery/computer/card/proc/job_in_department(datum/job/targetjob, includecivs = 1)
|
||||
if(!scan || !scan.access)
|
||||
return 0
|
||||
if(!target_dept)
|
||||
return 1
|
||||
if(!scan.assignment)
|
||||
return 0
|
||||
if(!targetjob || !targetjob.title)
|
||||
return 0
|
||||
if(targetjob.title in get_subordinates(scan.assignment, includecivs))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/computer/card/proc/get_subordinates(rank, addcivs)
|
||||
var/list/jobs_returned = list()
|
||||
for(var/datum/job/thisjob in job_master.occupations)
|
||||
if(rank in thisjob.department_head)
|
||||
jobs_returned += thisjob.title
|
||||
if(addcivs)
|
||||
jobs_returned += "Civilian"
|
||||
return jobs_returned
|
||||
|
||||
/obj/machinery/computer/card/attack_ai(var/mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
@@ -198,6 +223,7 @@ var/time_last_changed_position = 0
|
||||
data["centcom_access"] = is_centcom()
|
||||
data["all_centcom_access"] = null
|
||||
data["regions"] = null
|
||||
data["target_dept"] = target_dept
|
||||
|
||||
data["engineering_jobs"] = format_jobs(engineering_positions)
|
||||
data["medical_jobs"] = format_jobs(medical_positions)
|
||||
@@ -267,7 +293,7 @@ var/time_last_changed_position = 0
|
||||
else
|
||||
modify.forceMove(get_turf(src))
|
||||
modify = null
|
||||
else if(Adjacent(usr))
|
||||
else if(Adjacent(usr))
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if(istype(I, /obj/item/weapon/card/id))
|
||||
usr.drop_item()
|
||||
@@ -284,7 +310,7 @@ var/time_last_changed_position = 0
|
||||
else
|
||||
scan.forceMove(get_turf(src))
|
||||
scan = null
|
||||
else if(Adjacent(usr))
|
||||
else if(Adjacent(usr))
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if(istype(I, /obj/item/weapon/card/id))
|
||||
usr.drop_item()
|
||||
@@ -292,7 +318,7 @@ var/time_last_changed_position = 0
|
||||
scan = I
|
||||
|
||||
if("access")
|
||||
if(href_list["allowed"])
|
||||
if(href_list["allowed"] && !target_dept)
|
||||
if(is_authenticated(usr))
|
||||
var/access_type = text2num(href_list["access_target"])
|
||||
var/access_allowed = text2num(href_list["allowed"])
|
||||
@@ -302,13 +328,22 @@ var/time_last_changed_position = 0
|
||||
modify.access += access_type
|
||||
|
||||
if("skin")
|
||||
var/skin = href_list["skin_target"]
|
||||
if(is_authenticated(usr) && modify && ((skin in get_station_card_skins()) || ((skin in get_centcom_card_skins()) && is_centcom())))
|
||||
modify.icon_state = href_list["skin_target"]
|
||||
if(!target_dept)
|
||||
var/skin = href_list["skin_target"]
|
||||
if(is_authenticated(usr) && modify && ((skin in get_station_card_skins()) || ((skin in get_centcom_card_skins()) && is_centcom())))
|
||||
modify.icon_state = href_list["skin_target"]
|
||||
|
||||
if("assign")
|
||||
if(is_authenticated(usr) && modify)
|
||||
var/t1 = href_list["assign_target"]
|
||||
if(target_dept && modify.assignment == "Unassigned")
|
||||
visible_message("<span class='notice'>[src]: Demoted individuals must see the HoP for a new job.</span>")
|
||||
return 0
|
||||
if(!job_in_department(job_master.GetJob(modify.rank), FALSE))
|
||||
visible_message("<span class='notice'>[src]: Cross-department job transfers must be done by the HoP.</span>")
|
||||
return 0
|
||||
if(!job_in_department(job_master.GetJob(t1)))
|
||||
return 0
|
||||
if(t1 == "Custom")
|
||||
var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,MAX_MESSAGE_LEN))
|
||||
//let custom jobs function as an impromptu alt title, mainly for sechuds
|
||||
@@ -332,24 +367,25 @@ var/time_last_changed_position = 0
|
||||
access = jobdatum.get_access()
|
||||
|
||||
modify.access = access
|
||||
modify.assignment = t1
|
||||
modify.rank = t1
|
||||
modify.assignment = t1
|
||||
|
||||
|
||||
callHook("reassign_employee", list(modify))
|
||||
|
||||
if("reg")
|
||||
if(is_authenticated(usr))
|
||||
if(is_authenticated(usr) && !target_dept)
|
||||
var/t2 = modify
|
||||
if((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
|
||||
var/temp_name = reject_bad_name(href_list["reg"])
|
||||
if(temp_name)
|
||||
modify.registered_name = temp_name
|
||||
else
|
||||
src.visible_message("<span class='notice'>[src] buzzes rudely.</span>")
|
||||
visible_message("<span class='notice'>[src] buzzes rudely.</span>")
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
if("account")
|
||||
if(is_authenticated(usr))
|
||||
if(is_authenticated(usr) && !target_dept)
|
||||
var/t2 = modify
|
||||
if((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
|
||||
var/account_num = text2num(href_list["account"])
|
||||
@@ -360,7 +396,7 @@ var/time_last_changed_position = 0
|
||||
mode = text2num(href_list["mode_target"])
|
||||
|
||||
if("print")
|
||||
if(!printing)
|
||||
if(!printing && !target_dept)
|
||||
printing = 1
|
||||
playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1)
|
||||
spawn(50)
|
||||
@@ -393,17 +429,36 @@ var/time_last_changed_position = 0
|
||||
P.info += "</div>"
|
||||
|
||||
if("terminate")
|
||||
if(is_authenticated(usr))
|
||||
if(is_authenticated(usr) && !target_dept)
|
||||
modify.assignment = "Terminated"
|
||||
modify.access = list()
|
||||
|
||||
callHook("terminate_employee", list(modify))
|
||||
|
||||
if("demote")
|
||||
if(is_authenticated(usr))
|
||||
if(modify.assignment == "Unassigned")
|
||||
visible_message("<span class='notice'>[src]: Unassigned crew cannot be demoted any further. If further action is warranted, ask the Captain about Termination.</span>")
|
||||
return 0
|
||||
if(!job_in_department(job_master.GetJob(modify.rank), FALSE))
|
||||
visible_message("<span class='notice'>[src]: Heads may only demote members of their own department.</span>")
|
||||
return 0
|
||||
|
||||
var/list/access = list()
|
||||
var/datum/job/jobdatum = new /datum/job/civilian
|
||||
access = jobdatum.get_access()
|
||||
|
||||
modify.access = access
|
||||
modify.rank = "Civilian"
|
||||
modify.assignment = "Unassigned"
|
||||
modify.icon_state = "id"
|
||||
|
||||
if("make_job_available")
|
||||
// MAKE ANOTHER JOB POSITION AVAILABLE FOR LATE JOINERS
|
||||
if(is_authenticated(usr))
|
||||
var/edit_job_target = href_list["job"]
|
||||
var/datum/job/j = job_master.GetJob(edit_job_target)
|
||||
if(!job_in_department(j, FALSE))
|
||||
return 0
|
||||
if(!j)
|
||||
return 0
|
||||
if(can_open_job(j) != 1)
|
||||
@@ -420,6 +475,8 @@ var/time_last_changed_position = 0
|
||||
if(is_authenticated(usr))
|
||||
var/edit_job_target = href_list["job"]
|
||||
var/datum/job/j = job_master.GetJob(edit_job_target)
|
||||
if(!job_in_department(j, FALSE))
|
||||
return 0
|
||||
if(!j)
|
||||
return 0
|
||||
if(can_close_job(j) != 1)
|
||||
@@ -442,4 +499,42 @@ var/time_last_changed_position = 0
|
||||
circuit = /obj/item/weapon/circuitboard/card/centcom
|
||||
req_access = list(access_cent_commander)
|
||||
change_position_cooldown = -1
|
||||
blacklisted = list()
|
||||
blacklisted = list()
|
||||
|
||||
/obj/machinery/computer/card/minor
|
||||
name = "department management console"
|
||||
target_dept = TARGET_DEPT_GENERIC
|
||||
desc = "You can use this to change ID's for specific departments."
|
||||
icon_screen = "idminor"
|
||||
circuit = /obj/item/weapon/circuitboard/card/minor
|
||||
|
||||
/obj/machinery/computer/card/minor/hos
|
||||
name = "security management console"
|
||||
target_dept = TARGET_DEPT_SEC
|
||||
icon_screen = "idhos"
|
||||
light_color = LIGHT_COLOR_RED
|
||||
req_access = list(access_hos)
|
||||
circuit = /obj/item/weapon/circuitboard/card/minor/hos
|
||||
|
||||
/obj/machinery/computer/card/minor/cmo
|
||||
name = "medical management console"
|
||||
target_dept = TARGET_DEPT_MED
|
||||
icon_screen = "idcmo"
|
||||
req_access = list(access_cmo)
|
||||
circuit = /obj/item/weapon/circuitboard/card/minor/cmo
|
||||
|
||||
/obj/machinery/computer/card/minor/rd
|
||||
name = "science management console"
|
||||
target_dept = TARGET_DEPT_SCI
|
||||
icon_screen = "idrd"
|
||||
light_color = LIGHT_COLOR_PINK
|
||||
req_access = list(access_rd)
|
||||
circuit = /obj/item/weapon/circuitboard/card/minor/rd
|
||||
|
||||
/obj/machinery/computer/card/minor/ce
|
||||
name = "engineering management console"
|
||||
target_dept = TARGET_DEPT_ENG
|
||||
icon_screen = "idce"
|
||||
light_color = COLOR_YELLOW
|
||||
req_access = list(access_ce)
|
||||
circuit = /obj/item/weapon/circuitboard/card/minor/ce
|
||||
Reference in New Issue
Block a user