Files
Bubberstation/code/modules/events/processor_overload.dm
LemonInTheDark ed6405829e Updates individual telecomm machines to autolink/operate properly cross zs (#90747)
## About The Pull Request

I thought I fixed this a while back with changes to signals and such
(#76360), but I failed to handle machine to machine interaction and
autolinking properly which broke behavior. Mildly hard to test but it...
should? work better now. I don't think I've missed something but it is
possible.

[Unfucks telecomms_list, mild code quality
stuff](cc8316d523)

[cc8316d](cc8316d523)

GLOB.telecomms_list proported to hold just /telecomms machines but it
WASN'T, we stuffed message computers in there too to make references a
bit easier to clean.

This fixes that, handling them instead with a one to many pattern. I've
also renamed a few things (most prominently GLOB.telecomms_list ->
GLOB.telecomm_machines), and unindented an if check that was essentially
dead code. Also killed a really messy define and replaced it with a
proc.

## Why It's Good For The Game

Mapper asked for it, really should have done this years ago but we
didn't have a usecase for it.

## Changelog
🆑
fix: Tcomms machines will interoperate across z levels in the same
"stack" as expected now
/🆑
2025-04-29 18:33:34 -06:00

42 lines
1.6 KiB
Plaintext

/datum/round_event_control/processor_overload
name = "Processor Overload"
typepath = /datum/round_event/processor_overload
weight = 15
min_players = 20
category = EVENT_CATEGORY_ENGINEERING
description = "Emps the telecomm processors, scrambling radio speech. Might blow up a few."
/datum/round_event/processor_overload
announce_when = 1
/datum/round_event/processor_overload/announce(fake)
var/alert = pick("Exospheric bubble inbound. Processor overload is likely. Please contact you*%xp25)`6cq-BZZT",
"Exospheric bubble inbound. Processor overload is likel*1eta;c5;'1v¬-BZZZT",
"Exospheric bubble inbound. Processor ov#MCi46:5.;@63-BZZZZT",
"Exospheric bubble inbo'Fz\\k55_@-BZZZZZT",
"Exospheri:%£ QCbyj^j</.3-BZZZZZZT",
"!!hy%;f3l7e,<$^-BZZZZZZZT",
)
//AIs are always aware of processor overload
for(var/mob/living/silicon/ai/ai in GLOB.ai_list)
to_chat(ai, "<br>[span_warning("<b>[alert]</b>")]<br>")
// Announce most of the time, but leave a little gap so people don't know
// whether it's, say, a tesla zapping tcomms, or some selective
// modification of the tcomms bus
if(prob(80) || fake)
priority_announce(alert, "Anomaly Alert")
/datum/round_event/processor_overload/start()
for(var/obj/machinery/telecomms/processor/spinny_thing in GLOB.telecomm_machines)
if(!prob(10))
spinny_thing.emp_act(EMP_HEAVY)
continue
announce_to_ghosts(spinny_thing)
// Damage the surrounding area to indicate that it popped
explosion(spinny_thing, light_impact_range = 2, explosion_cause = src)
// Only a level 1 explosion actually damages the machine
// at all
SSexplosions.high_mov_atom += spinny_thing