refactor: move req console config to areas (#26051)

* refactor: move req console config to areas

* improve dmdoc

* just set this to what the area has
This commit is contained in:
warriorstar-orion
2024-07-01 08:55:30 +00:00
committed by GitHub
parent 521e22643e
commit 7f219de67f
18 changed files with 206 additions and 494 deletions
+8
View File
@@ -100,3 +100,11 @@
#define CIRCULATOR_SIDE_LEFT WEST
#define CIRCULATOR_SIDE_RIGHT EAST
// Request Console configuration bitmask.
/// [/obj/machinery/requests_console] can request assistance.
#define RC_ASSIST (1<<0)
/// [/obj/machinery/requests_console] can request supplies.
#define RC_SUPPLY (1<<1)
/// [/obj/machinery/requests_console] can relay anonymous information.
#define RC_INFO (1<<2)
+1
View File
@@ -33,3 +33,4 @@
name = "EVA Storage"
icon_state = "eva"
ambientsounds = HIGHSEC_SOUNDS
request_console_name = "EVA"
+8
View File
@@ -91,6 +91,14 @@
/// Turrets use this list to see if individual power/lethal settings are allowed. Contains the /obj/machinery/turretid for this area
var/list/turret_controls = list()
/// The flags applied to request consoles spawned in this area.
/// See [RC_ASSIST], [RC_SUPPLY], [RC_INFO].
var/request_console_flags = 0
/// The name for any spawned request consoles. Defaults to the area name.
var/request_console_name
/// Whether request consoles in this area can send announcements.
var/request_console_announces = FALSE
/*
Lighting Vars
*/
+2
View File
@@ -11,6 +11,8 @@
name = "\improper AI Chamber"
icon_state = "ai_chamber"
ambientsounds = list('sound/ambience/ambitech.ogg', 'sound/ambience/ambitech2.ogg', 'sound/ambience/ambiatmos.ogg', 'sound/ambience/ambiatmos2.ogg')
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "AI"
/area/station/turret_protected/aisat
name = "\improper AI Satellite"
@@ -6,16 +6,24 @@
icon_state = "bridge"
ambientsounds = list('sound/ambience/signal.ogg')
sound_environment = SOUND_AREA_STANDARD_STATION
request_console_flags = RC_ASSIST | RC_INFO
request_console_announces = TRUE
/area/station/command/meeting_room
name = "\improper Heads of Staff Meeting Room"
icon_state = "meeting"
sound_environment = SOUND_AREA_MEDIUM_SOFTFLOOR
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "Bridge"
request_console_announces = TRUE
/area/station/command/office/captain
name = "\improper Captain's Office"
icon_state = "captainoffice"
sound_environment = SOUND_AREA_WOODFLOOR
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "Captain's Desk"
request_console_announces = TRUE
/area/station/command/office/captain/bedroom
name = "\improper Captain's Bedroom"
@@ -24,30 +32,51 @@
/area/station/command/office/hop
name = "\improper Head of Personnel's Quarters"
icon_state = "hop"
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "Head of Personnel's Desk"
request_console_announces = TRUE
/area/station/command/office/rd
name = "\improper Research Director's Quarters"
icon_state = "rd"
request_console_flags = RC_ASSIST | RC_SUPPLY | RC_INFO
request_console_name = "Research Director's Desk"
request_console_announces = TRUE
/area/station/command/office/ce
name = "\improper Chief Engineer's Quarters"
icon_state = "ce"
request_console_flags = RC_ASSIST | RC_SUPPLY | RC_INFO
request_console_name = "Chief Engineer's Desk"
request_console_announces = TRUE
/area/station/command/office/hos
name = "\improper Head of Security's Quarters"
icon_state = "hos"
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "Head of Security's Desk"
request_console_announces = TRUE
/area/station/command/office/cmo
name = "\improper Chief Medical Officer's Quarters"
icon_state = "CMO"
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "Chief Medical Officer's Desk"
request_console_announces = TRUE
/area/station/command/office/ntrep
name = "\improper Nanotrasen Representative's Office"
icon_state = "ntrep"
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "NT Representative"
request_console_announces = TRUE
/area/station/command/office/blueshield
name = "\improper Blueshield's Office"
icon_state = "blueshield"
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "Blueshield"
request_console_announces = TRUE
/area/station/command/teleporter
name = "\improper Teleporter"
@@ -2,10 +2,13 @@
/area/station/engineering/atmos
name = "Atmospherics"
icon_state = "atmos"
request_console_flags = RC_ASSIST | RC_SUPPLY
/area/station/engineering/atmos/control
name = "Atmospherics Control Room"
icon_state = "atmosctrl"
request_console_flags = RC_ASSIST | RC_SUPPLY
request_console_name = "Atmospherics"
/area/station/engineering/atmos/distribution
name = "Atmospherics Distribution Loop"
@@ -24,11 +27,14 @@
/area/station/engineering/control
name = "Engineering"
icon_state = "engine_control"
request_console_flags = RC_ASSIST | RC_SUPPLY
/area/station/engineering/break_room
name = "\improper Engineering Foyer"
icon_state = "engibreak"
sound_environment = SOUND_AREA_SMALL_ENCLOSED
request_console_flags = RC_ASSIST | RC_SUPPLY
request_console_name = "Engineering"
/area/station/engineering/break_room/secondary
name = "\improper Secondary Engineering Foyer"
@@ -37,10 +43,14 @@
name = "Engineering Equipment Storage"
icon_state = "engilocker"
sound_environment = SOUND_AREA_SMALL_ENCLOSED
request_console_flags = RC_ASSIST | RC_SUPPLY
request_console_name = "Engineering"
/area/station/engineering/hardsuitstorage
name = "\improper Engineering Hardsuit Storage"
icon_state = "engi"
request_console_flags = RC_ASSIST | RC_SUPPLY
request_console_name = "Engineering"
/area/station/engineering/controlroom
name = "\improper Engineering Control Room"
@@ -101,3 +111,4 @@
/area/station/engineering/tech_storage
name = "Technical Storage"
icon_state = "techstorage"
request_console_name = "Tech Storage"
+5 -1
View File
@@ -2,18 +2,22 @@
/area/station/legal/courtroom
name = "\improper Courtroom"
icon_state = "courtroom"
request_console_flags = RC_ASSIST | RC_SUPPLY
/area/station/legal/courtroom/gallery
name = "\improper Courtroom Gallery"
icon_state = "courtroom"
request_console_name = "Courtroom"
/area/station/legal/lawoffice
name = "\improper Law Office"
icon_state = "law"
sound_environment = SOUND_AREA_SMALL_SOFTFLOOR
request_console_name = "Internal Affairs Office"
/area/station/legal/magistrate
name = "\improper Magistrate's Office"
icon_state = "magistrate"
sound_environment = SOUND_AREA_SMALL_SOFTFLOOR
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "Magistrate"
@@ -8,6 +8,7 @@
/area/station/medical/medbay
name = "\improper Medbay"
icon_state = "medbay"
request_console_flags = RC_ASSIST
//Medbay is a large area, these additional areas help level out APC load.
/area/station/medical/medbay2
@@ -21,14 +22,20 @@
/area/station/medical/storage
name = "Medical Storage"
icon_state = "medbaystorage"
request_console_flags = RC_ASSIST
request_console_name = "Medbay"
/area/station/medical/reception
name = "\improper Medbay Reception"
icon_state = "medbaylobby"
request_console_flags = RC_ASSIST
request_console_name = "Medbay"
/area/station/medical/psych
name = "\improper Psych Room"
icon_state = "medbaypsych"
request_console_flags = RC_SUPPLY
request_console_name = "Psychiatrist"
/area/station/medical/break_room
name = "\improper Medbay Break Room"
@@ -60,6 +67,7 @@
/area/station/medical/virology
name = "Virology"
icon_state = "virology"
request_console_flags = RC_ASSIST | RC_SUPPLY
/area/station/medical/virology/lab
name = "\improper Virology Laboratory"
@@ -71,10 +79,12 @@
ambientsounds = SPOOKY_SOUNDS
is_haunted = TRUE
sound_environment = SOUND_AREA_SMALL_ENCLOSED
request_console_flags = RC_ASSIST | RC_INFO
/area/station/medical/chemistry
name = "Chemistry"
icon_state = "chem"
request_console_flags = RC_ASSIST | RC_SUPPLY
/area/station/medical/surgery
name = "\improper Surgery"
@@ -111,3 +121,4 @@
/area/station/medical/paramedic
name = "Paramedic"
icon_state = "paramedic"
request_console_flags = RC_ASSIST
@@ -149,6 +149,7 @@
name = "\improper Dormitories"
icon_state = "dorms"
sound_environment = SOUND_AREA_STANDARD_STATION
request_console_name = "Crew Quarters"
/area/station/public/sleep
name = "\improper Primary Cryogenic Dormitories"
@@ -162,6 +163,7 @@
/area/station/public/locker
name = "\improper Locker Room"
icon_state = "locker"
request_console_name = "Crew Quarters"
/area/station/public/toilet
name = "\improper Dormitory Toilets"
@@ -177,6 +179,7 @@
/area/station/public/fitness
name = "\improper Fitness Room"
icon_state = "fitness"
request_console_name = "Crew Quarters"
/area/station/public/arcade
name = "\improper Arcade"
@@ -205,6 +208,7 @@
/area/station/public/storage/tools
name = "Primary Tool Storage"
icon_state = "primarystorage"
request_console_name = "Tool Storage"
/area/station/public/storage/art
name = "Art Supply Storage"
+16 -1
View File
@@ -3,6 +3,8 @@
/area/station/science/robotics
name = "\improper Robotics Lab"
icon_state = "robo"
request_console_flags = RC_SUPPLY
request_console_name = "Robotics"
/area/station/science/robotics/chargebay
name = "\improper Mech Bay"
@@ -17,6 +19,8 @@
/area/station/science/explab
name = "\improper E.X.P.E.R.I-MENTOR Lab"
icon_state = "scilab"
request_console_flags = RC_SUPPLY
request_console_name = "Science"
/area/station/science/explab/chamber
name = "\improper E.X.P.E.R.I-MENTOR Chamber"
@@ -37,7 +41,8 @@
/area/station/science/genetics
name = "\improper Genetics Lab"
icon_state = "genetics"
request_console_flags = RC_ASSIST
request_console_name = "Genetics"
/area/station/science
sound_environment = SOUND_AREA_STANDARD_STATION
@@ -45,6 +50,8 @@
/area/station/science/rnd
name = "Research and Development"
icon_state = "rnd"
request_console_flags = RC_SUPPLY
request_console_name = "Science"
/area/station/science/hallway
name = "\improper Research Lab"
@@ -54,6 +61,8 @@
name = "\improper Xenobiology Lab"
icon_state = "xenobio"
xenobiology_compatible = TRUE
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "Xenobiology"
/area/station/science/storage
name = "\improper Science Toxins Storage"
@@ -67,14 +76,20 @@
/area/station/science/toxins/mixing
name = "\improper Toxins Mixing Room"
icon_state = "toxmix"
request_console_flags = RC_SUPPLY
request_console_name = "Science"
/area/station/science/toxins/launch
name = "\improper Toxins Launch Room"
icon_state = "toxlaunch"
request_console_flags = RC_SUPPLY
request_console_name = "Science"
/area/station/science/misc_lab
name = "\improper Research Testing Lab"
icon_state = "scichem"
request_console_flags = RC_SUPPLY
request_console_name = "Science"
/area/station/science/test_chamber
name = "\improper Research Testing Chamber"
@@ -6,6 +6,8 @@
/area/station/security/main
name = "\improper Security Office"
icon_state = "securityoffice"
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "Security"
/area/station/security/lobby
name = "\improper Security Lobby"
@@ -14,6 +16,8 @@
/area/station/security/brig
name = "\improper Brig"
icon_state = "brig"
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "Security"
/area/station/security/brig/prison_break()
for(var/obj/structure/closet/secure_closet/brig/temp_closet in src)
@@ -69,6 +73,8 @@
/area/station/security/storage
name = "Security Equipment Storage"
icon_state = "securityequipmentstorage"
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "Security"
/area/station/security/evidence
name = "\improper Evidence Room"
@@ -88,6 +94,8 @@
name = "\improper Warden's Office"
icon_state = "Warden"
sound_environment = SOUND_AREA_SMALL_SOFTFLOOR
request_console_flags = RC_ASSIST | RC_SUPPLY | RC_INFO
request_console_name = "Warden"
/area/station/security/armory
name = "\improper Armory"
@@ -96,11 +104,15 @@
/area/station/security/armory/secure
name = "\improper Secure Armory"
icon_state = "secarmory"
request_console_flags = RC_ASSIST | RC_SUPPLY | RC_INFO
request_console_name = "Warden"
/area/station/security/detective
name = "\improper Detective's Office"
icon_state = "detective"
ambientsounds = list('sound/ambience/ambidet1.ogg', 'sound/ambience/ambidet2.ogg')
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "Detective"
/area/station/security/range
name = "\improper Firing Range"
@@ -119,6 +131,8 @@
/area/station/security/checkpoint/secondary
name = "\improper Security Checkpoint"
icon_state = "checkpoint1"
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "Security"
// Solitary
/area/station/security/permasolitary
@@ -6,11 +6,13 @@
/area/station/service/kitchen
name = "\improper Kitchen"
icon_state = "kitchen"
request_console_flags = RC_SUPPLY
/area/station/service/bar
name = "\improper Bar"
icon_state = "bar"
sound_environment = SOUND_AREA_WOODFLOOR
request_console_flags = RC_SUPPLY
/area/station/service/theatre
name = "\improper Theatre"
@@ -22,6 +24,7 @@
name = "\improper Library"
icon_state = "library"
sound_environment = SOUND_AREA_LARGE_SOFTFLOOR
request_console_flags = RC_SUPPLY
/area/station/service/chapel
name = "\improper Chapel"
@@ -30,10 +33,13 @@
is_haunted = TRUE
sound_environment = SOUND_AREA_LARGE_ENCLOSED
valid_territory = FALSE
request_console_flags = RC_SUPPLY
/area/station/service/chapel/office
name = "\improper Chapel Office"
icon_state = "chapeloffice"
request_console_flags = RC_SUPPLY
request_console_name = "Chapel"
/area/station/service/clown
name = "\improper Clown's Office"
@@ -54,8 +60,11 @@
name = "\improper Custodial Closet"
icon_state = "janitor"
sound_environment = SOUND_AREA_SMALL_ENCLOSED
request_console_flags = RC_ASSIST
request_console_name = "Janitorial"
/area/station/service/hydroponics
name = "Hydroponics"
icon_state = "hydro"
sound_environment = SOUND_AREA_STANDARD_STATION
request_console_flags = RC_SUPPLY
+12
View File
@@ -12,26 +12,38 @@
name = "\improper Delivery Office"
icon_state = "cargobay"
sound_environment = SOUND_AREA_STANDARD_STATION
request_console_flags = RC_SUPPLY
request_console_name = "Cargo Bay"
/area/station/supply/office
name = "\improper Cargo Office"
icon_state = "cargooffice"
request_console_flags = RC_SUPPLY
request_console_name = "Cargo Bay"
/area/station/supply/storage
name = "\improper Cargo Bay"
icon_state = "cargobay"
sound_environment = SOUND_AREA_LARGE_ENCLOSED
request_console_flags = RC_SUPPLY
/area/station/supply/qm
name = "\improper Quartermaster's Office"
icon_state = "qm"
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "Quartermaster's Desk"
request_console_announces = TRUE
/area/station/supply/miningdock
name = "\improper Mining Dock"
icon_state = "mining"
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "Mining"
/area/station/supply/expedition
name = "\improper Expedition Room"
icon_state = "expedition"
ambientsounds = list('sound/ambience/ambiexp.ogg')
sound_environment = SOUND_AREA_SMALL_ENCLOSED
request_console_flags = RC_ASSIST | RC_INFO
request_console_name = "Expedition"
+12 -13
View File
@@ -1,12 +1,6 @@
/******************** Requests Console ********************/
/** Originally written by errorage, updated by: Carn, needs more work though. I just added some security fixes */
//Request Console Department Types.
//For one console to be under multiple categories, you need to add the numbers with each other. For example, value of 6 will allow you to request supplies and relay info to that specific console.
#define RC_ASSIST (1<<0) //Request Assistance
#define RC_SUPPLY (1<<1) //Request Supplies
#define RC_INFO (1<<2) //Relay Info
//Request Console Screens
#define RCS_MAINMENU 0 // Main menu
#define RCS_RQSUPPLY 1 // Request supplies
@@ -43,15 +37,16 @@ GLOBAL_LIST_EMPTY(allRequestConsoles)
icon_state = "req_comp_off"
max_integrity = 300
armor = list(MELEE = 70, BULLET = 30, LASER = 30, ENERGY = 30, BOMB = 0, RAD = 0, FIRE = 90, ACID = 90)
var/department = "Unknown" //The list of all departments on the station (Determined from this variable on each unit) Set this to the same thing if you want several consoles in one department
/// The name of the containing department. Set this to the same thing if you want several consoles in one department.
var/department
/// Bitflag. Zero is reply-only. See [RC_ASSIST], [RC_SUPPLY], [RC_INFO].
var/departmentType
var/list/message_log = list() //List of all messages
var/departmentType = 0 //Bitflag. Zero is reply-only. Map currently uses raw numbers instead of defines.
var/newmessagepriority = RQ_NONEW_MESSAGES
var/screen = RCS_MAINMENU
var/silent = FALSE // set to TRUE for it not to beep all the time
/// Whether this console can be used to send department announcements
var/announcementConsole = FALSE
// FALSE = This console cannot be used to send department announcements
// TRUE = This console can send department announcementsf
/// Will be set to TRUE when you authenticate yourself for announcements
var/announceAuth = FALSE
/// Will be set to TRUE when you authenticate yourself for requesting a secondary goal
@@ -102,6 +97,13 @@ GLOBAL_LIST_EMPTY(allRequestConsoles)
Radio.follow_target = src
. = ..()
var/area/containing_area = get_area(src)
if(isnull(department))
department = containing_area.request_console_name || containing_area.name
if(isnull(departmentType))
departmentType = containing_area.request_console_flags
announcementConsole = containing_area.request_console_announces
announcer.config.default_title = "[department] announcement"
name = "[department] Requests Console"
@@ -434,9 +436,6 @@ GLOBAL_LIST_EMPTY(allRequestConsoles)
return TRUE
#undef RC_ASSIST
#undef RC_SUPPLY
#undef RC_INFO
#undef RCS_MAINMENU
#undef RCS_RQSUPPLY
#undef RCS_RQASSIST