Changes to Syndicate Radios, which fixes Issue 595. Now if a an radio doesn't have the Syndicate encryption on it, it won't receive any messages over the Syndicate channel(If I can learn TCOMMs a bit better I'll try to make it a per-message basis)

Changed 'traitor' headsets to 'syndicate' headsets to have it make a bit more sense. Syndicate encryption is tied to the keys, so anything with a Syndicate Key can hear the Syndicate Channel. 
Also, added 2 intercoms to the Nuke OP shuttle that are on the Syndicate frequency and have the needed encryption.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3991 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
sieve32@gmail.com
2012-07-05 21:36:15 +00:00
parent 3bd93d58a8
commit 9e35d8cda8
8 changed files with 3006 additions and 2989 deletions

View File

@@ -215,7 +215,7 @@
/datum/game_mode/proc/equip_syndicate(mob/living/carbon/human/synd_mob)
var/radio_freq = SYND_FREQ
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(synd_mob)
var/obj/item/device/radio/R = new /obj/item/device/radio/headset/syndicate(synd_mob)
R.set_frequency(radio_freq)
synd_mob.equip_if_possible(R, synd_mob.slot_ears)

View File

@@ -7,6 +7,7 @@
item_state = ""
var/translate_binary = 0
var/translate_hive = 0
var/syndie = 0
var/list/channels = list()
@@ -14,10 +15,11 @@
/obj/item/device/encryptionkey/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/device/encryptionkey/traitor
/obj/item/device/encryptionkey/syndicate
icon_state = "cypherkey"
channels = list("Syndicate" = 1)
origin_tech = "syndicate=3"
syndie = 1//Signifies that it de-crypts Syndicate transmissions
/obj/item/device/encryptionkey/binary
icon_state = "cypherkey"

View File

@@ -20,12 +20,13 @@
keyslot1 = new /obj/item/device/encryptionkey/
recalculateChannels()
/obj/item/device/radio/headset/traitor
/obj/item/device/radio/headset/syndicate
origin_tech = "syndicate=3"
/obj/item/device/radio/headset/traitor/New()
/obj/item/device/radio/headset/syndicate/New()
..()
del(keyslot1)
keyslot1 = new /obj/item/device/encryptionkey/traitor
keyslot1 = new /obj/item/device/encryptionkey/syndicate
syndie = 1
recalculateChannels()
/obj/item/device/radio/headset/binary
@@ -177,7 +178,6 @@
keyslot2.loc = T
keyslot2 = null
recalculateChannels()
user << "You pop out the encryption keys in the headset!"
@@ -209,6 +209,7 @@
src.channels = list()
src.translate_binary = 0
src.translate_hive = 0
src.syndie = 0
if(keyslot1)
for(var/ch_name in keyslot1.channels)
@@ -223,6 +224,9 @@
if(keyslot1.translate_hive)
src.translate_hive = 1
if(keyslot1.syndie)
src.syndie = 1
if(keyslot2)
for(var/ch_name in keyslot2.channels)
if(ch_name in src.channels)
@@ -236,6 +240,9 @@
if(keyslot2.translate_hive)
src.translate_hive = 1
if(keyslot2.syndie)
src.syndie = 1
for (var/ch_name in channels)
if(!radio_controller)

View File

@@ -25,12 +25,14 @@
attack_self(user)
send_hear()
send_hear(freq)
if (!(src.wires & WIRE_RECEIVE))
return
if (!src.listening)
return
if(freq == SYND_FREQ)
if(!(src.syndie))
return//Prevents broadcast of messages over devices lacking the encryption
/*
var/turf/T = get_turf(src)
var/list/hear = hearers(7, T)

View File

@@ -23,6 +23,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
var/freerange = 0 // 0 - Sanitize frequencies, 1 - Full range
var/list/channels = list() //see communications.dm for full list. First channes is a "default" for :h
var/subspace_transmission = 0
var/syndie = 0//Holder to see if it's a syndicate encrpyed radio
// "Example" = FREQ_LISTENING|FREQ_BROADCASTING
flags = FPRINT | CONDUCT | TABLEPASS
slot_flags = SLOT_BELT
@@ -631,6 +632,9 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
*/
if (!(wires & WIRE_RECEIVE))
return
if(freq == SYND_FREQ)
if(!(src.syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys
return
if (!on)
return
if (!freq) //recieved on main frequency

View File

@@ -143,7 +143,7 @@ var/global/sent_syndicate_strike_team = 0
camera.network = "Syndicate"
camera.c_tag = real_name
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src)
var/obj/item/device/radio/R = new /obj/item/device/radio/headset/syndicate(src)
R.set_frequency(SYND_FREQ) //Same frequency as the syndicate team in Nuke mode.
equip_if_possible(R, slot_ears)
equip_if_possible(new /obj/item/clothing/under/syndicate(src), slot_w_uniform)

View File

@@ -338,7 +338,7 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite
/obj/item/clothing/mask/gas/voice, /obj/item/clothing/glasses/thermal,\
/obj/item/device/chameleon, /obj/item/weapon/card/emag,\
/obj/item/weapon/storage/toolbox/syndicate, /obj/item/weapon/aiModule,\
/obj/item/device/radio/headset/traitor, /obj/item/weapon/plastique,\
/obj/item/device/radio/headset/syndicate, /obj/item/weapon/plastique,\
/obj/item/device/powersink, /obj/item/weapon/storage/syndie_kit,\
/obj/item/toy/syndicateballoon, /obj/item/weapon/gun/energy/laser/captain,\
/obj/item/weapon/hand_tele, /obj/item/weapon/rcd, /obj/item/weapon/tank/jetpack,\