Files
Batrachophreno 0851144182 Area definitions cleanup (Horizon/Runtime) (#20914)
**Goals:**
1. Delete area definitions no longer used in any map or file.
2. Update area definitions such that everything used in mapping the
Horizon exists in 'maps\sccv_horizon\areas' with the parent
'area\horizon\'.
3. Reorganize/rename/restructure those Horizon area definitions to make
future mapping easier and code that hooks into area properties easier.
4. Present area names and blurbs in the status panel.

This PR only handles Horizon and Runtime areas, for digestibility/ease
of reviewing. Offsite areas for another PR.

Naming convention reference:
The /area/ 'name' variable no longer contains either 'Horizon' or the
Deck# of the area or its approx location on the ship. All Horizon areas
now have several new variables as metadata-- area names now need only be
strictly descriptive, and the appropriate constants used in the area
definition, and a new function generates the display name with
consistent formatting for us.

Detailed documentation to follow after any adjustments are made to
mappers' preferences.

This also adds area blurbs to most areas- if not bespoke, then general
department-wide blurbs to parents. I know feature creep always sucks,
but while some areas having pre-existing blurbs, the overwhelming
majority of areas don't, and while testing it was very distracting to
see them randomly appearing and disappearing. Most blurbs are pretty
basic but I feel are entirely presentable- more clever individual ones
can follow in a separate PR.
2025-07-25 19:16:33 +00:00

77 lines
2.8 KiB
Plaintext

/datum/event/prison_break
startWhen = 5
announceWhen = 75
var/releaseWhen = 60
//List of areas to affect. Filled by start()
var/list/area/areas = list()
ic_name = "an imprisonment system virus"
no_fake = 1
//Department name in announcement
var/eventDept = "Security"
//Names of areas mentioned in AI and Engineering announcements
var/list/areaName = list("Security")
//Area types to include.
var/list/areaType = list(/area/horizon/security)
//Area types to specifically exclude.
var/list/areaNotType = list(/area/horizon/security/checkpoint, /area/horizon/security/checkpoint2)
/datum/event/prison_break/xenobiology
eventDept = "Science"
areaName = list("Xenobiology")
areaType = list(/area/horizon/rnd/xenobiology)
areaNotType = list(/area/horizon/rnd/xenobiology/xenoflora)
/datum/event/prison_break/bridge
eventDept = "Bridge"
areaName = list("Bridge")
areaType = list(/area/horizon/command/bridge, /area/horizon/command/teleporter, /area/horizon/maintenance/deck_3/bridge)
areaNotType = list(/area/horizon/command/bridge/aibunker, /area/horizon/command/bridge/selfdestruct)
/datum/event/prison_break/setup()
announceWhen = rand(75, 105)
releaseWhen = rand(60, 90)
src.endWhen = src.releaseWhen+2
/datum/event/prison_break/announce()
if(areas && areas.len > 0)
command_announcement.Announce("[pick("Gr3y.T1d3 virus","Malignant trojan")] detected in [station_name()] containment subroutines. Secure any compromised areas immediately. AI involvement is recommended.", "[eventDept] Alert", zlevels = affecting_z)
/datum/event/prison_break/start()
..()
for(var/area/A in GLOB.the_station_areas)
if(is_type_in_list(A,areaType) && !is_type_in_list(A,areaNotType))
areas += A
if(areas && areas.len > 0)
var/my_department = "[station_name()] firewall subroutines"
var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [worldtime2text()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.<br>"
for(var/obj/machinery/telecomms/message_server/MS in SSmachinery.all_telecomms)
MS.send_rc_message("Engineering", my_department, rc_message, "", "", 2)
for(var/mob/living/silicon/ai/A in GLOB.player_list)
to_chat(A, SPAN_DANGER("Malicious program detected in the [english_list(areaName)] lighting and airlock control systems by [my_department]."))
else
log_world("ERROR: Could not initate grey-tide. Unable to find suitable containment area.")
kill(TRUE)
/datum/event/prison_break/tick()
if(activeFor == releaseWhen)
if(areas && areas.len > 0)
for(var/area/A in areas)
for(var/obj/machinery/light/L in A)
L.flicker(10)
/datum/event/prison_break/end(var/faked)
..()
for(var/area/A in shuffle(areas))
A.prison_break()