fun fact: This took 6 hours because bay uses different say().

fun fact: I'm never porting say-related stuff from bay.

Conflicts:
	code/game/objects/items/devices/radio/encryptionkey.dm
	code/game/objects/items/devices/radio/headset.dm
	code/modules/mob/living/say.dm
	code/modules/mob/living/silicon/ai/ai.dm
This commit is contained in:
Neerti
2014-07-16 02:34:10 -04:00
committed by ZomgPonies
parent e77ebbb15a
commit dd6f54ed47
5 changed files with 65 additions and 12 deletions
+10
View File
@@ -71,6 +71,10 @@
dat += "<br>"
dat += {"<a href='byond://?src=\ref[src];choice=Wireless'>[A.control_disabled ? "Enable" : "Disable"] Wireless Activity</a>"}
dat += "<br>"
dat += "Subspace Transceiver is: [A.radio.disabledAi ? "Disabled" : "Enabled"]"
dat += "<br>"
dat += {"<a href='byond://?src=\ref[src];choice=Radio'>[A.radio.disabledAi ? "Enable" : "Disable"] Subspace Transceiver</a>"}
dat += "<br>"
dat += {"<a href='byond://?src=\ref[src];choice=Close'> Close</a>"}
user << browse(dat, "window=aicard")
onclose(user, "aicard")
@@ -110,6 +114,12 @@
sleep(10)
flush = 0
if ("Radio")
for(var/mob/living/silicon/ai/A in src)
A.radio.disabledAi = !A.radio.disabledAi
A << "Your Subspace Transceiver has been: [A.radio.disabledAi ? "disabled" : "enabled"]"
U << "You [A.radio.disabledAi ? "Disable" : "Enable"] the AI's Subspace Transceiver"
if ("Wireless")
for(var/mob/living/silicon/ai/A in src)
A.control_disabled = !A.control_disabled
@@ -131,3 +131,9 @@
name = "NanoTrasen ERT Radio Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
channels = list("Response Team" = 1, "Science" = 1, "Command" = 1, "Medical" = 1, "Engineering" = 1, "Security" = 1, "Supply" = 1)
/obj/item/device/encryptionkey/heads/ai_integrated //ported from bay, this goes 'inside' the AI.
name = "AI Integrated Encryption Key"
desc = "Integrated encryption key"
icon_state = "cap_cypherkey"
channels = list("Command" = 1, "Security" = 1, "Engineering" = 1, "Science" = 1, "Medical" = 1, "Supply" = 1, "Service" = 1)
@@ -20,7 +20,10 @@
keyslot1 = new /obj/item/device/encryptionkey/
recalculateChannels()
/obj/item/device/radio/headset/receive_range(freq, level)
/obj/item/device/radio/headset/receive_range(freq, level, aiOverride = 0)
if(aiOverride)
return ..(freq, level)
if(ishuman(src.loc))
var/mob/living/carbon/human/H = src.loc
if(H.l_ear == src || H.r_ear == src)
@@ -164,6 +167,21 @@
freerange = 1
keyslot2 = new /obj/item/device/encryptionkey/ert
//The below was ported from Baystation.
/obj/item/device/radio/headset/heads/ai_integrated //No need to care about icons, it should be hidden inside the AI anyway.
name = "AI Subspace Transceiver"
desc = "Integrated AI radio transceiver."
icon_state = "ai_radio"
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/ai_integrated
var/myAi = null // Atlantis: Reference back to the AI which has this radio.
var/disabledAi = 0 // Atlantis: Used to manually disable AI's integrated radio via intellicard menu.
/obj/item/device/radio/headset/heads/ai_integrated/receive_range(freq, level)
if(disabledAi)
return -1 //Transciever Disabled.
return ..(freq, level, 1)
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.set_machine(src)
@@ -268,4 +286,4 @@
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
return
return