Revert "Random securised channels, take 2" (#19027)

* Revert "[ci skip] Automatic changelog update."

This reverts commit f09ac8d57f.

* Revert "Random securised channels, take 2 (#18917)"

This reverts commit 4feb8396de.
This commit is contained in:
ShiftyRail
2018-07-30 01:55:07 +02:00
committed by MadmanMartian
parent f09ac8d57f
commit 3fef6c1efd
32 changed files with 629 additions and 910 deletions

View File

@@ -10,8 +10,8 @@
canhear_range = 0 // can't hear headsets from very far away
slot_flags = SLOT_EARS
translate_binary = 0
translate_hive = 0
var/translate_binary = 0
var/translate_hive = 0
var/obj/item/device/encryptionkey/keyslot1 = null
var/obj/item/device/encryptionkey/keyslot2 = null
maxf = 1489
@@ -30,11 +30,11 @@
/obj/item/device/radio/headset/syndicate
origin_tech = Tc_SYNDICATE + "=3"
/obj/item/device/radio/headset/syndicate/New()
..()
qdel(keyslot1)
keyslot1 = new /obj/item/device/encryptionkey/syndicate
syndie = 1
recalculateChannels()
/obj/item/device/radio/headset/syndicate/commando/New()
@@ -47,6 +47,7 @@
..()
qdel(keyslot1)
keyslot1 = new /obj/item/device/encryptionkey/raider
raider = 1
recalculateChannels()
/obj/item/device/radio/headset/raider/pretuned/New() // pre tuned radio to 1215 aka raider freq
@@ -275,13 +276,6 @@
keyslot2 = new /obj/item/device/encryptionkey/ert
..()
/obj/item/device/radio/headset/handle_crypted_channels(var/channel)
var/list/obj/item/device/encryptionkey/keyslots = list(keyslot1, keyslot2) // In the future we'll have more than 2 keyslots.
for (var/obj/item/device/encryptionkey/key in keyslots)
if (channel in key.secured_channels) // We're actually able to decipher that channel.
return TRUE
return FALSE
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.set_machine(src)
@@ -303,6 +297,8 @@
keyslot1.forceMove(T)
keyslot1 = null
if(keyslot2)
var/turf/T = get_turf(user)
if(T)
@@ -334,10 +330,12 @@
return
/obj/item/device/radio/headset/recalculateChannels()
/obj/item/device/radio/headset/proc/recalculateChannels()
src.channels = list()
src.translate_binary = 0
src.translate_hive = 0
src.syndie = 0
src.raider = 0
if(keyslot1)
for(var/ch_name in keyslot1.channels)
@@ -352,6 +350,12 @@
if(keyslot1.translate_hive)
src.translate_hive = 1
if(keyslot1.syndie)
src.syndie = 1
if(keyslot1.raider)
src.raider = 1
if(keyslot2)
for(var/ch_name in keyslot2.channels)
if(ch_name in src.channels)
@@ -365,6 +369,12 @@
if(keyslot2.translate_hive)
src.translate_hive = 1
if(keyslot2.syndie)
src.syndie = 1
if(keyslot2.raider)
src.raider = 1
for (var/ch_name in channels)
//this is the most hilarious piece of code i have seen this week, so im not going to remove it