Request Emergency Temporary Access - RETA (#92753)

<img width="819" height="348" alt="image"
src="https://github.com/user-attachments/assets/0424ec76-2648-43d3-8e94-d44558b44bcf"
/>

## About The Pull Request

Follow up from #92751 - Not to conflict with it but as an idea on how to
change it for the long run.

Paramedics currently start with broad department access. This proposal
replaces that by granting temporary department access only when an
emergency is called.

When a player presses "Call X" on a Requests Console, responders called
receive temporary access to the common work areas of that department.

![image](https://hackmd.io/_uploads/r1xNOv0Fle.png)
> [Security] The Automated Announcement System coldly states, "SECURITY
EMERGENCY in Research Lab! (Called by Sloan Keppel, Scientist) RETA door
access granted to responders."

> [Science] The Automated Announcement System coldly states, "RETA
activated (Called by Sloan Keppel, Scientist). Security personnel now
have temporary access to your areas."

They do not receive access to sub rooms or high risk areas.

- Access lasts 5 minutes (configurable)  
- Access is removed when the timer expires or the emergency is resolved
- No mapping changes are required (uses existing request consoles)  
- Removes Paramedics round start access but gives them external access
to rescue bodies in space by default
- Flashing blue lights on doors affected by temporary access
<img width="897" height="837" alt="image"
src="https://github.com/user-attachments/assets/97980cb4-3481-44b6-9f96-fc241ca16f57"
/>


**The full document is here:
https://hackmd.io/@NM8HxpG_Toahg5pimrpsKw/Hk0tKq3Yxe**

**Wiki documentation for players and admins:
https://wiki.tgstation13.org/Guide_To_RETA**


## Why It's Good For The Game

- Removes paramedics’ broad “Doctor+” access.
- Keeps them effective as emergency responders.
- Responders must be called in OR access upgraded.
- Keeps sensitive areas secure.
- Prevents spam or stacking through cooldown.
- Scales across all maps without mapper work.
- Gives admins a new tool for temp department wide access
- Dedicated logging file and unit tests
- Very performant, only affects living players with connected mind
- Gives Request Consoles more use as an alarm button and further utility
- Imagine later on "Request Janitor" which sorts access and tells
Janitor where needed

## Changelog
🆑
add: RETA System - Request Consoles give temporary access to responders
when used for some areas. Paramedics lose broad access but get external
space access.
qol: Request consoles now show name and job role on call message &
Cooldown on spamming calls + sound prompt
qol: Medibot access no longer based on Paramedic trim ID - Still has
original access
image: Added "lights_reta" for temporary door access when in effect
admin: Gives admins "RETA door access" verb for giving department wide
area access on maps.
config: New config settings for RETA

/🆑
This commit is contained in:
SimplyLogan
2025-09-10 23:33:40 +00:00
committed by GitHub
parent 9f356f8b9a
commit a1fdc715df
20 changed files with 1052 additions and 16 deletions
@@ -0,0 +1,20 @@
/**
* Request Emergency Temporary Access - RETA - Config
* code\modules\reta\reta_system.dm
*/
/// RETA system is enabled
/datum/config_entry/flag/reta_enabled
default = TRUE
/// Duration for how long temporary access lasts (default: 5 minutes)
/datum/config_entry/number/reta_duration_ds
default = 3000
min_val = 300
integer = FALSE
/// Cooldown between RETA calls from the same origin to the same target department (default: 15 seconds)
/datum/config_entry/number/reta_dept_cooldown_ds
default = 150
min_val = 0
integer = FALSE
+7
View File
@@ -97,6 +97,13 @@ SUBSYSTEM_DEF(job)
if(CONFIG_GET(flag/load_jobs_from_txt))
load_jobs_from_config()
set_overflow_role(CONFIG_GET(string/overflow_job)) // this must always go after load_jobs_from_config() due to how the legacy systems operate, this always takes precedent.
// Initialize RETA system - must be after setup_occupations() so all jobs are loaded - code/modules/reta/reta_system.dm
log_game("RETA: Jobs subsystem Initialize() calling RETA initialization")
initialize_reta_system()
populate_reta_job_trims()
log_game("RETA: Jobs subsystem Initialize() RETA initialization completed")
return SS_INIT_SUCCESS
/// Returns a list of jobs that we are allowed to fuck with during random events
@@ -417,6 +417,9 @@ SUBSYSTEM_DEF(id_access)
id_card.update_label()
id_card.update_icon()
// Apply any currently active RETA grants to this newly trimmed card
apply_active_reta_grants_to_card(id_card)
return TRUE
/**
@@ -459,6 +462,9 @@ SUBSYSTEM_DEF(id_access)
var/mob/living/carbon/human/owner = id_card.loc
owner.update_ID_card()
// Apply any currently active RETA grants to this card with updated trim override
apply_active_reta_grants_to_card(id_card)
/**
* Removes a trim from a ID card.
*
@@ -501,6 +507,9 @@ SUBSYSTEM_DEF(id_access)
var/datum/id_trim/job/job_trim = trim // Here is where we update a player's paycheck department for the purposes of discounts/paychecks.
id_card.registered_account.account_job.paycheck_department = job_trim.job.paycheck_department
// Apply any currently active RETA grants to this card with updated trim access
apply_active_reta_grants_to_card(id_card)
/**
* Tallies up all accesses the card has that have flags greater than or equal to the access_flag supplied.
*