Files
Bubberstation/modular_zubbers/code/modules/events/scrubber_overflow.dm
LT3 21668da48b Adds radiation storms and scrubber overflows to event Enhanced Roleplay Check (#2180)
## About The Pull Request

Same as https://github.com/Skyrat-SS13/Skyrat-tg/pull/29682, but on a
repo that is active.

Adds the Enhanced Roleplay Check protection to the radiation storm and
scrubber overflow events.

In the case of radiation storms, the protection is only triggered if the
dorm is occupied at the time of event init. (No cop-out running into a
dorm after you hear the announcement! Find a real maintenance hallway,
scrub.)

Additionally, only plays the giant red warning text only if you are in
an area that will be impacted by the radiation, so that people aren't
second guessing if the area they are in is protected or not.

## Why It's Good For The Game

Getting mutated and/or dying while in the middle of enhanced roleplay
tends to interrupt the intended roleplay

## Proof Of Testing
<details>
<summary>Screenshots/Videos</summary>
  

![image](https://github.com/user-attachments/assets/e747f78d-020d-40fa-a39e-671d0abeeccb)

</details>

## Changelog

🆑 LT3
code: Radiation storm warning only sent to players who are in an area
without radiation protection
balance: Occupied dorms are protected from radiation storms and
scrubbers
/🆑
2024-10-06 22:44:52 +00:00

19 lines
807 B
Plaintext

/datum/round_event/scrubber_overflow/setup()
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/temp_vent as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics/components/unary/vent_scrubber))
var/turf/scrubber_turf = get_turf(temp_vent)
var/area/scrubber_area = get_area(temp_vent)
if(!scrubber_turf)
continue
if(!is_station_level(scrubber_turf.z))
continue
if(temp_vent.welded)
continue
if(is_type_in_list(scrubber_area, list(/area/station/engineering/supermatter/room, /area/station/engineering/supermatter, /area/station/commons/dorms, /area/station/security/prison/safe, /area/station/security/prison/toilet)))
continue
if(!prob(overflow_probability))
continue
scrubbers += temp_vent
if(!scrubbers.len)
return kill()