diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index a0166e34cb..12309900b3 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -92,7 +92,7 @@ var/list/department_radio_keys = list( if (speaking.flags & SIGNLANG) say_signlang(message, pick(speaking.signlang_verb), speaking) - return + return 1 //speaking into radios if(used_radios.len) @@ -115,13 +115,13 @@ var/list/department_radio_keys = list( if(pressure < SOUND_MINIMUM_PRESSURE) italics = 1 message_range = 1 - + if (speech_sound) sound_vol *= 0.5 //muffle the sound a bit, so it's like we're actually talking through contact var/list/listening = list() var/list/listening_obj = list() - + if(T) var/list/hear = hear(message_range, T) var/list/hearturfs = list() @@ -143,7 +143,7 @@ var/list/department_radio_keys = list( var/obj/O = I hearturfs += O.locs[1] listening_obj |= O - + for(var/mob/M in player_list) if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS)) @@ -164,8 +164,9 @@ var/list/department_radio_keys = list( spawn(0) if(O) //It's possible that it could be deleted in the meantime. O.hear_talk(src, message, verb, speaking) - + log_say("[name]/[key] : [message]") + return 1 /mob/living/proc/say_signlang(var/message, var/verb="gestures", var/datum/language/language) for (var/mob/O in viewers(src, null)) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 44da5d74af..cac6dd1907 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -27,6 +27,7 @@ var/list/ai_list = list() var/viewalerts = 0 var/lawcheck[1] var/ioncheck[1] + var/lawchannel = "Common" // Default channel on which to state laws var/icon/holo_icon//Default is assigned when AI is created. var/obj/item/device/pda/ai/aiPDA = null var/obj/item/device/multitool/aiMulti = null @@ -390,6 +391,13 @@ var/list/ai_list = list() // src << text ("Switching Law [L]'s report status to []", lawcheck[L+1]) checklaws() + if (href_list["lawr"]) // Selects on which channel to state laws + var/setchannel = input(usr, "Specify channel.", "Channel selection") in list("State","Common","Science","Command","Medical","Engineering","Security","Supply","Binary","Holopad", "Cancel") + if(setchannel == "Cancel") + return + lawchannel = setchannel + checklaws() + //Uncomment this line of code if you are enabling the AI Vocal (VOX) announcements. /* if(href_list["say_word"]) diff --git a/code/modules/mob/living/silicon/ai/laws.dm b/code/modules/mob/living/silicon/ai/laws.dm index 904451aa1d..9e104ac100 100755 --- a/code/modules/mob/living/silicon/ai/laws.dm +++ b/code/modules/mob/living/silicon/ai/laws.dm @@ -51,24 +51,33 @@ src.laws_sanity_check() src.laws.clear_supplied_laws() - - - - /mob/living/silicon/ai/proc/statelaws() // -- TLE // set category = "AI Commands" // set name = "State Laws" - src.say("Current Active Laws:") + /var/prefix = "" + switch(lawchannel) + if("Common") prefix = ";" + if("Science") prefix = ":n " + if("Command") prefix = ":c " + if("Medical") prefix = ":m " + if("Engineering") prefix = ":e " + if("Security") prefix = ":s " + if("Supply") prefix = ":u " + if("Binary") prefix = ":b " + if("Holopad") prefix = ":h " + else prefix = "" + + if(src.say("[prefix]Current Active Laws:") != 1) + return + //src.laws_sanity_check() //src.laws.show_laws(world) var/number = 1 sleep(10) - - if (src.laws.zeroth) if (src.lawcheck[1] == "Yes") //This line and the similar lines below make sure you don't state a law unless you want to. --NeoFite - src.say("0. [src.laws.zeroth]") + src.say("[prefix]0. [src.laws.zeroth]") sleep(10) for (var/index = 1, index <= src.laws.ion.len, index++) @@ -76,7 +85,7 @@ var/num = ionnum() if (length(law) > 0) if (src.ioncheck[index] == "Yes") - src.say("[num]. [law]") + src.say("[prefix][num]. [law]") sleep(10) for (var/index = 1, index <= src.laws.inherent.len, index++) @@ -84,22 +93,20 @@ if (length(law) > 0) if (src.lawcheck[index+1] == "Yes") - src.say("[number]. [law]") + src.say("[prefix][number]. [law]") sleep(10) number++ - for (var/index = 1, index <= src.laws.supplied.len, index++) var/law = src.laws.supplied[index] if (length(law) > 0) if(src.lawcheck.len >= number+1) if (src.lawcheck[number+1] == "Yes") - src.say("[number]. [law]") + src.say("[prefix][number]. [law]") sleep(10) number++ - /mob/living/silicon/ai/verb/checklaws() //Gives you a link-driven interface for deciding what laws the statelaws() proc will share with the crew. --NeoFite set category = "AI Commands" set name = "State Laws" @@ -144,6 +151,8 @@ src.lawcheck[number+1] = "Yes" list += {"[src.lawcheck[number+1]] [number]: [law]
"} number++ - list += {"

State Laws"} + + list += {"
Channel: [src.lawchannel]
"} + list += {"State Laws"} usr << browse(list, "window=laws") \ No newline at end of file diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm index 65118d811c..f3f1b4e1c8 100644 --- a/code/modules/mob/living/silicon/ai/say.dm +++ b/code/modules/mob/living/silicon/ai/say.dm @@ -1,9 +1,8 @@ /mob/living/silicon/ai/say(var/message) if(parent && istype(parent) && parent.stat != 2) - parent.say(message) - return + return parent.say(message) //If there is a defined "parent" AI, it is actually an AI, and it is alive, anything the AI tries to say is said by the parent instead. - ..(message) + return ..(message) // These Verbs are commented out since we've disabled the AI vocal (VOX) announcements. // If you re-enable them there is 3 lines in ai.dm Topic() that you need to uncomment as well. diff --git a/code/modules/mob/living/silicon/say.dm b/code/modules/mob/living/silicon/say.dm index 57f2f24aa3..ca24e95b79 100644 --- a/code/modules/mob/living/silicon/say.dm +++ b/code/modules/mob/living/silicon/say.dm @@ -85,14 +85,14 @@ if("department") switch(bot_type) if(IS_AI) - AI.holopad_talk(message) + return AI.holopad_talk(message) if(IS_ROBOT) log_say("[key_name(src)] : [message]") R.radio.talk_into(src,message,message_mode,verb,speaking) if(IS_PAI) log_say("[key_name(src)] : [message]") P.radio.talk_into(src,message,message_mode,verb,speaking) - return + return 1 if("binary") switch(bot_type) @@ -105,12 +105,13 @@ return robot_talk(message) - return + return 1 if("general") switch(bot_type) if(IS_AI) if (AI.aiRadio.disabledAi) src << "\red System Error - Transceiver Disabled" + return else log_say("[key_name(src)] : [message]") AI.aiRadio.talk_into(src,message,null,verb,speaking) @@ -120,7 +121,7 @@ if(IS_PAI) log_say("[key_name(src)] : [message]") P.radio.talk_into(src,message,null,verb,speaking) - return + return 1 else if(message_mode && message_mode in radiochannels) @@ -128,6 +129,7 @@ if(IS_AI) if (AI.aiRadio.disabledAi) src << "\red System Error - Transceiver Disabled" + return else log_say("[key_name(src)] : [message]") AI.aiRadio.talk_into(src,message,message_mode,verb,speaking) @@ -137,7 +139,7 @@ if(IS_PAI) log_say("[key_name(src)] : [message]") P.radio.talk_into(src,message,message_mode,verb,speaking) - return + return 1 return ..(message,speaking,verb) @@ -172,7 +174,8 @@ This is another way of saying that we won't bother dealing with them.*/ else src << "No holopad connected." - return + return + return 1 /mob/living/proc/robot_talk(var/message)