Designed to replace AI's intercoms. Integrated headset-like device which has access to all department frequencies. Also let's AIs use radio on intellicard.

AI's communication can however be disabled by using intellicard option. Communication will be disabled until it is restored via intellicard again,
even if the AI is moved back into physical core. ICly it's software lock which prevents the AI from using communication circuits which are standard in all
AI cores/intellicards/etc. This does not stop AI from using intercom, however.

 Forum link: http://baystation12.net/forums/viewtopic.php?f=5&t=6536&start=1260
This commit is contained in:
Atlantiscze
2014-07-15 23:00:24 +02:00
parent d050f0a30b
commit db18074f90
7 changed files with 67 additions and 15 deletions

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.aiRadio.disabledAi ? "Disabled" : "Enabled"]"
dat += "<br>"
dat += {"<a href='byond://?src=\ref[src];choice=Radio'>[A.aiRadio.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")
@@ -92,6 +96,12 @@
U.unset_machine()
return
if ("Radio")
for(var/mob/living/silicon/ai/A in src)
A.aiRadio.disabledAi = !A.aiRadio.disabledAi
A << "Your Subspace Transceiver has been: [A.aiRadio.disabledAi ? "disabled" : "enabled"]"
U << "You [A.aiRadio.disabledAi ? "Disable" : "Enable"] the AI's Subspace Transceiver"
if ("Wipe")
var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No")
if(confirm == "Yes")

View File

@@ -74,6 +74,12 @@
icon_state = "cap_cypherkey"
channels = list("Command" = 1, "Security" = 1, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0)
/obj/item/device/encryptionkey/heads/ai_integrated
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)
/obj/item/device/encryptionkey/heads/rd
name = "Research Director's Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."

View File

@@ -19,7 +19,9 @@
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)
@@ -99,6 +101,20 @@
item_state = "headset"
keyslot2 = new /obj/item/device/encryptionkey/heads/captain
/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/heads/rd
name = "Research Director's headset"
desc = "Headset of the researching God. To access the science channel, use :n. For command, use :c."