Files
BatrachophrenoandGitHub c8d82d3f27 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
2025-07-25 19:54:01 +00:00

53 lines
1.8 KiB
Plaintext

/*
The processor is a very simple machine that decompresses subspace signals and
transfers them back to the original bus. It is essential in producing audible
data.
Link to servers if bus is not present
*/
#define COMPRESS 0
#define UNCOMPRESS 1
/obj/machinery/telecomms/processor
name = "processor unit"
icon_state = "processor"
desc = "This machine is used to process large quantities of information."
telecomms_type = /obj/machinery/telecomms/processor
delay = 5
circuitboard = "/obj/item/circuitboard/telecomms/processor"
var/process_mode = UNCOMPRESS
/obj/machinery/telecomms/processor/antagonist_hints(mob/user, distance, is_adjacent)
. += ..()
. += "Attacking/damaging this machine will cause communications over its linked frequency(s) to become increasingly garbled."
/obj/machinery/telecomms/processor/receive_information(datum/signal/subspace/signal, obj/machinery/telecomms/machine_from)
if(!is_freq_listening(signal))
return
// Processor set to COMPRESS
if(!process_mode)
// Data scrambling increased from 35-65 to MAXIMUM GIBBERISH
signal.data["compression"] = 100
// Processor set to UNCOMPRESS
else if (signal.data["compression"])
// Ion storm? Blow out any intelligibility.
if(ion_storm)
signal.data["compression"] = 100
// Taken any damage? Start gently scrambling things.
else if(integrity < 100)
signal.data["compression"] = rand(0, round((100-integrity)))
// Uncompress signal to complete clarity
else signal.data["compression"] = 0
if(istype(machine_from, /obj/machinery/telecomms/bus))
relay_direct_information(signal, machine_from) // send the signal back to the machine
else // no bus detected - send the signal to servers instead
signal.data["slow"] += rand(5, 10) // slow the signal down
relay_information(signal, signal.server_type)
#undef COMPRESS
#undef UNCOMPRESS