Skip to content

Commit

Permalink
Maintains that weird entire-tcomms-setup-in-one-machine thing (tgstat…
Browse files Browse the repository at this point in the history
…ion#30172)

* Maintains that weird entire-tcomms-setup-in-one-machine thing that's only used on away missions

It had a var for intercepting signals and duplicating them to the syndicate channel, but it never used it, and only sent things if they were already syndicate communication... wat.
  • Loading branch information
RemieRichards authored and lzimann committed Aug 26, 2017
1 parent 4482137 commit a916f35
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
15 changes: 12 additions & 3 deletions code/game/machinery/telecomms/machines/allinone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use_power = NO_POWER_USE
idle_power_usage = 0
machinetype = 6
var/intercept = 0 // if nonzero, broadcasts all messages to syndicate channel
var/intercept = FALSE // if TRUE, broadcasts all (non-syndie) messages to syndicate channel

/obj/machinery/telecomms/allinone/receive_signal(datum/signal/signal)

Expand All @@ -33,12 +33,21 @@
sleep(signal.data["slow"]) // simulate the network lag if necessary

/* ###### Broadcast a message using signal.data ###### */
if(signal.frequency == GLOB.SYND_FREQ) // if syndicate broadcast, just
Broadcast_Message(signal.data["mob"],
signal.data["vmask"],
signal.data["radio"], signal.data["message"],
signal.data["name"], signal.data["job"],
signal.data["realname"],, signal.data["compression"], list(0, z), signal.frequency, signal.data["spans"],
signal.data["verb_say"], signal.data["verb_ask"], signal.data["verb_exclaim"], signal.data["verb_yell"],
signal.data["language"])

/* ###### Copy all non-syndie communications to the Syndicate Frequency ###### */
if(intercept && signal.frequency != GLOB.SYND_FREQ)
Broadcast_Message(signal.data["mob"],
signal.data["vmask"],
signal.data["radio"], signal.data["message"],
signal.data["name"], signal.data["job"],
signal.data["realname"],, signal.data["compression"], list(0, z), signal.frequency, signal.data["spans"],
signal.data["realname"],, signal.data["compression"], list(0, z), GLOB.SYND_FREQ, signal.data["spans"],
signal.data["verb_say"], signal.data["verb_ask"], signal.data["verb_exclaim"], signal.data["verb_yell"],
signal.data["language"])

Expand Down
5 changes: 4 additions & 1 deletion code/game/objects/items/devices/radio/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,10 @@
signal.frequency = freqnum // Quick frequency set
for(var/obj/machinery/telecomms/receiver/R in GLOB.telecomms_list)
R.receive_signal(signal)


// Allinone can act as receivers. (Unless of course whoever coded this last time forgot to put it in somewhere!)
for(var/obj/machinery/telecomms/allinone/R in GLOB.telecomms_list)
R.receive_signal(signal)

spawn(20) // wait a little...

Expand Down

0 comments on commit a916f35

Please sign in to comment.