mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Attempt to make tcomms blackout event more stable (#21051)
Because I'm not game to try to rewrite the entire system, this PR changes the Communications Blackout event to, instead of hitting every tcomms box with EMP effects, toggle a flag on the Processor units to scramble all comms. The effect will be that instead of not transmitting at all, radio communications will just come through as pure static gibberish. Once the event is over, it will toggle the flag off. In the event of the telecomms boxes still failing to come back, anyone with the vv permission can easily restore the processors by editing the "ion_storm" variable from true to false. Few misc other fixes, see changelogs
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
|
||||
/proc/communications_blackout(var/silent = 1)
|
||||
|
||||
if(!silent)
|
||||
command_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/AI/ionospheric.ogg')
|
||||
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
|
||||
for(var/mob/living/silicon/ai/A in GLOB.player_list)
|
||||
to_chat(A, "<br>")
|
||||
to_chat(A, SPAN_WARNING("<b>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT</b>"))
|
||||
to_chat(A, "<br>")
|
||||
for(var/obj/machinery/telecomms/T in SSmachinery.all_telecomms)
|
||||
T.emp_act(EMP_HEAVY)
|
||||
@@ -12,25 +12,28 @@
|
||||
"Ionospheric anomalies dete'fZ\\kg5_0-BZZZZZT", \
|
||||
"Ionospheri:% MCayj^j<.3-BZZZZZZT", \
|
||||
"#4nd%;f4y6,>%-BZZZZZZZT")
|
||||
|
||||
var/found_ai = FALSE
|
||||
for(var/mob/living/silicon/ai/A in GLOB.player_list) //AIs are always aware of communication blackouts.
|
||||
found_ai = TRUE
|
||||
if(A.z in affecting_z)
|
||||
to_chat(A, "<br>")
|
||||
to_chat(A, SPAN_WARNING("<b>[alert]</b>"))
|
||||
to_chat(A, "<br>")
|
||||
|
||||
if(prob(30)) //most of the time, we don't want an announcement, so as to allow AIs to fake blackouts.
|
||||
// If there's no AI, just make the announcement.
|
||||
if(!found_ai)
|
||||
command_announcement.Announce(alert, zlevels = affecting_z)
|
||||
// If there is an AI, then give them a chance to announce or not announce the blackout.
|
||||
else if(prob(30))
|
||||
command_announcement.Announce(alert, zlevels = affecting_z)
|
||||
return
|
||||
return 1
|
||||
|
||||
|
||||
/datum/event/communications_blackout/start()
|
||||
..()
|
||||
|
||||
for(var/obj/machinery/telecomms/T in SSmachinery.all_telecomms)
|
||||
for(var/obj/machinery/telecomms/processor/T in SSmachinery.all_telecomms)
|
||||
if(T.z in affecting_z)
|
||||
T.emp_act(EMP_HEAVY)
|
||||
T.ion_storm()
|
||||
// 10% chance for a given machine to take damage: slight delays in transmission time or slight message garbling until repaired.
|
||||
if(damage_machinery && prob(10))
|
||||
T.emp_damage()
|
||||
T.ion_storm_damage()
|
||||
|
||||
@@ -289,10 +289,6 @@ GLOBAL_LIST_INIT(severity_to_string, list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Comms Blackout", /datum/event/communications_blackout,
|
||||
50),
|
||||
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Comms Blackout - Damage", /datum/event/communications_blackout/damage_machinery,
|
||||
50, list(ASSIGNMENT_ENGINEER = 25),
|
||||
pop_needed = 6),
|
||||
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Comms Blackout - Damage", /datum/event/communications_blackout/damage_machinery,
|
||||
100, list(ASSIGNMENT_ENGINEER = 25),
|
||||
pop_needed = 6),
|
||||
|
||||
Reference in New Issue
Block a user