Merge pull request #2077 from Markolie/languages

Language fixes
This commit is contained in:
Fox-McCloud
2015-09-17 16:30:45 -04:00
6 changed files with 12 additions and 14 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ var/list/ai_verbs_default = list(
aiRadio = new(src)
common_radio = aiRadio
aiRadio.myAi = src
additional_law_channels["Binary"] = ":b"
additional_law_channels["Binary"] = ":b "
additional_law_channels["Holopad"] = ":h"
aiCamera = new/obj/item/device/camera/siliconcam/ai_camera(src)
@@ -1,9 +1,3 @@
/mob/living/silicon/ai/say(var/message)
if(parent && istype(parent) && parent.stat != 2)
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.
return ..(message)
/mob/living/silicon/ai/proc/IsVocal()
var/announcing_vox = 0 // Stores the time of the last announcement
@@ -152,7 +152,7 @@ var/list/robot_verbs_default = list(
/mob/living/silicon/robot/proc/init(var/alien=0)
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
make_laws()
additional_law_channels["Binary"] = ":b"
additional_law_channels["Binary"] = ":b "
var/new_ai = select_active_ai_with_fewest_borgs()
if(new_ai)
lawupdate = 1
+3 -2
View File
@@ -1,3 +1,4 @@
/mob/proc/say()
return
@@ -129,11 +130,11 @@
//parses the language code (e.g. :j) from text, such as that supplied to say.
//returns the language object only if the code corresponds to a language that src can speak, otherwise null.
/mob/proc/parse_language(var/message)
if(length(message) >= 1 && copytext(message,1,2) == "!")
var/prefix = copytext(message,1,2)
if(length(message) >= 1 && prefix == "!")
return all_languages["Noise"]
if(length(message) >= 2)
var/language_prefix = trim_right(lowertext(copytext(message, 1 ,4)))
var/datum/language/L = language_keys[language_prefix]
if (can_speak(L))