mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
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:
@@ -71,6 +71,10 @@
|
|||||||
dat += "<br>"
|
dat += "<br>"
|
||||||
dat += {"<a href='byond://?src=\ref[src];choice=Wireless'>[A.control_disabled ? "Enable" : "Disable"] Wireless Activity</a>"}
|
dat += {"<a href='byond://?src=\ref[src];choice=Wireless'>[A.control_disabled ? "Enable" : "Disable"] Wireless Activity</a>"}
|
||||||
dat += "<br>"
|
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>"}
|
dat += {"<a href='byond://?src=\ref[src];choice=Close'> Close</a>"}
|
||||||
user << browse(dat, "window=aicard")
|
user << browse(dat, "window=aicard")
|
||||||
onclose(user, "aicard")
|
onclose(user, "aicard")
|
||||||
@@ -92,6 +96,12 @@
|
|||||||
U.unset_machine()
|
U.unset_machine()
|
||||||
return
|
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")
|
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")
|
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")
|
if(confirm == "Yes")
|
||||||
|
|||||||
@@ -74,6 +74,12 @@
|
|||||||
icon_state = "cap_cypherkey"
|
icon_state = "cap_cypherkey"
|
||||||
channels = list("Command" = 1, "Security" = 1, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0)
|
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
|
/obj/item/device/encryptionkey/heads/rd
|
||||||
name = "Research Director's Encryption Key"
|
name = "Research Director's Encryption Key"
|
||||||
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
desc = "An encyption key for a radio headset. Contains cypherkeys."
|
||||||
|
|||||||
@@ -19,7 +19,9 @@
|
|||||||
keyslot1 = new /obj/item/device/encryptionkey/
|
keyslot1 = new /obj/item/device/encryptionkey/
|
||||||
recalculateChannels()
|
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))
|
if(ishuman(src.loc))
|
||||||
var/mob/living/carbon/human/H = src.loc
|
var/mob/living/carbon/human/H = src.loc
|
||||||
if(H.l_ear == src || H.r_ear == src)
|
if(H.l_ear == src || H.r_ear == src)
|
||||||
@@ -99,6 +101,20 @@
|
|||||||
item_state = "headset"
|
item_state = "headset"
|
||||||
keyslot2 = new /obj/item/device/encryptionkey/heads/captain
|
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
|
/obj/item/device/radio/headset/heads/rd
|
||||||
name = "Research Director's headset"
|
name = "Research Director's headset"
|
||||||
desc = "Headset of the researching God. To access the science channel, use :n. For command, use :c."
|
desc = "Headset of the researching God. To access the science channel, use :n. For command, use :c."
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ var/list/department_radio_keys = list(
|
|||||||
italics = 1
|
italics = 1
|
||||||
message_range = 1
|
message_range = 1
|
||||||
|
|
||||||
|
if (!istype(src, /mob/living/silicon/ai)) // Atlantis: Prevents nearby people from hearing the AI when it talks using it's integrated radio.
|
||||||
for(var/mob/living/M in hearers(5, src))
|
for(var/mob/living/M in hearers(5, src))
|
||||||
if(M != src)
|
if(M != src)
|
||||||
M.show_message("<span class='notice'>[src] talks into [used_radios.len ? used_radios[1] : "the radio."]</span>")
|
M.show_message("<span class='notice'>[src] talks into [used_radios.len ? used_radios[1] : "the radio."]</span>")
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ var/list/ai_list = list()
|
|||||||
var/icon/holo_icon//Default is assigned when AI is created.
|
var/icon/holo_icon//Default is assigned when AI is created.
|
||||||
var/obj/item/device/pda/ai/aiPDA = null
|
var/obj/item/device/pda/ai/aiPDA = null
|
||||||
var/obj/item/device/multitool/aiMulti = null
|
var/obj/item/device/multitool/aiMulti = null
|
||||||
|
var/obj/item/device/radio/headset/heads/ai_integrated/aiRadio = null
|
||||||
var/custom_sprite = 0 //For our custom sprites
|
var/custom_sprite = 0 //For our custom sprites
|
||||||
//Hud stuff
|
//Hud stuff
|
||||||
|
|
||||||
@@ -87,12 +88,14 @@ var/list/ai_list = list()
|
|||||||
aiPDA.name = name + " (" + aiPDA.ownjob + ")"
|
aiPDA.name = name + " (" + aiPDA.ownjob + ")"
|
||||||
|
|
||||||
aiMulti = new(src)
|
aiMulti = new(src)
|
||||||
|
aiRadio = new(src)
|
||||||
|
aiRadio.myAi = src
|
||||||
|
|
||||||
if (istype(loc, /turf))
|
if (istype(loc, /turf))
|
||||||
verbs.Add(/mob/living/silicon/ai/proc/ai_call_shuttle,/mob/living/silicon/ai/proc/ai_camera_track, \
|
verbs.Add(/mob/living/silicon/ai/proc/ai_call_shuttle,/mob/living/silicon/ai/proc/ai_camera_track, \
|
||||||
/mob/living/silicon/ai/proc/ai_camera_list, /mob/living/silicon/ai/proc/ai_network_change, \
|
/mob/living/silicon/ai/proc/ai_camera_list, /mob/living/silicon/ai/proc/ai_network_change, \
|
||||||
/mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \
|
/mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \
|
||||||
/mob/living/silicon/ai/proc/toggle_camera_light)
|
/mob/living/silicon/ai/proc/toggle_camera_light, /mob/living/silicon/ai/proc/control_integrateed_radio)
|
||||||
|
|
||||||
//Languages
|
//Languages
|
||||||
add_language("Sol Common", 0)
|
add_language("Sol Common", 0)
|
||||||
@@ -738,3 +741,12 @@ var/list/ai_list = list()
|
|||||||
return
|
return
|
||||||
else
|
else
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
/mob/living/silicon/ai/proc/control_integrateed_radio()
|
||||||
|
set name = "Radio Settings"
|
||||||
|
set desc = "Allows you to change settings of your radio."
|
||||||
|
set category = "AI Commands"
|
||||||
|
|
||||||
|
src << "Accessing Subspace Transceiver control..."
|
||||||
|
if (src.aiRadio)
|
||||||
|
src.aiRadio.interact(src)
|
||||||
@@ -109,7 +109,11 @@
|
|||||||
if("general")
|
if("general")
|
||||||
switch(bot_type)
|
switch(bot_type)
|
||||||
if(IS_AI)
|
if(IS_AI)
|
||||||
src << "Yeah, not yet, sorry"
|
if (AI.aiRadio.disabledAi)
|
||||||
|
src << "\red System Error - Transceiver Disabled"
|
||||||
|
else
|
||||||
|
log_say("[key_name(src)] : [message]")
|
||||||
|
AI.aiRadio.talk_into(src,message,null,verb,speaking)
|
||||||
if(IS_ROBOT)
|
if(IS_ROBOT)
|
||||||
log_say("[key_name(src)] : [message]")
|
log_say("[key_name(src)] : [message]")
|
||||||
R.radio.talk_into(src,message,null,verb,speaking)
|
R.radio.talk_into(src,message,null,verb,speaking)
|
||||||
@@ -122,8 +126,11 @@
|
|||||||
if(message_mode && message_mode in radiochannels)
|
if(message_mode && message_mode in radiochannels)
|
||||||
switch(bot_type)
|
switch(bot_type)
|
||||||
if(IS_AI)
|
if(IS_AI)
|
||||||
src << "You don't have this function yet, I'm working on it"
|
if (AI.aiRadio.disabledAi)
|
||||||
return
|
src << "\red System Error - Transceiver Disabled"
|
||||||
|
else
|
||||||
|
log_say("[key_name(src)] : [message]")
|
||||||
|
AI.aiRadio.talk_into(src,message,message_mode,verb,speaking)
|
||||||
if(IS_ROBOT)
|
if(IS_ROBOT)
|
||||||
log_say("[key_name(src)] : [message]")
|
log_say("[key_name(src)] : [message]")
|
||||||
R.radio.talk_into(src,message,message_mode,verb,speaking)
|
R.radio.talk_into(src,message,message_mode,verb,speaking)
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.2 KiB |
Reference in New Issue
Block a user