readded speech bubbles, tested on humans only. also pre-emptively fixed (?) a bug with alien languages

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2012-10-12 17:43:21 +10:00
parent 39f528e0ce
commit 33e12ca9d3
2 changed files with 43 additions and 3 deletions

View File

@@ -141,6 +141,27 @@ var/list/department_radio_keys = list(
if (!message)
return
//work out if we're speaking skrell or not
var/is_speaking_skrell = 0
if(copytext(message, 1, 3) == ":k" || copytext(message, 1, 3) == ":K")
message = copytext(message, 3)
if(skrell_talk_understand || universal_speak)
is_speaking_skrell = 1
//work out if we're speaking soghun or not
var/is_speaking_soghun = 0
if(copytext(message, 1, 3) == ":o" || copytext(message, 1, 3) == ":O")
message = copytext(message, 3)
if(soghun_talk_understand || universal_speak)
is_speaking_soghun = 1
//work out if we're speaking soghun or not
var/is_speaking_taj = 0
if(copytext(message, 1, 3) == ":j" || copytext(message, 1, 3) == ":J")
message = copytext(message, 3)
if(tajaran_talk_understand || universal_speak)
is_speaking_taj = 1
// :downs:
if (getBrainLoss() >= 60)
message = dd_replacetext(message, " am ", " ")
@@ -324,10 +345,23 @@ var/list/department_radio_keys = list(
for (var/M in listening)
if(hascall(M,"say_understands"))
if (M:say_understands(src))
if (M:say_understands(src) && !is_speaking_skrell && !is_speaking_soghun && !is_speaking_taj)
heard_a += M
else if(ismob(M))
if(is_speaking_skrell && (M:skrell_talk_understand || M:universal_speak))
heard_a += M
else if(is_speaking_soghun && (M:soghun_talk_understand || M:universal_speak))
heard_a += M
else if(is_speaking_taj && (M:tajaran_talk_understand || M:universal_speak))
heard_a += M
else
heard_b += M
else
heard_b += M
heard_a += M
var/speech_bubble_test = say_test(message)
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
spawn(30) del(speech_bubble)
var/rendered = null
if (length(heard_a))
@@ -348,6 +382,7 @@ var/list/department_radio_keys = list(
for (var/M in heard_a)
if(hascall(M,"show_message"))
M:show_message(rendered, 2)
M << speech_bubble
if (length(heard_b))
var/message_b
@@ -367,6 +402,7 @@ var/list/department_radio_keys = list(
for (var/M in heard_b)
if(hascall(M,"show_message"))
M:show_message(rendered, 2)
M << speech_bubble
/*
if(M.client)
@@ -389,6 +425,9 @@ var/list/department_radio_keys = list(
del(B)
*/
//talking crystals
for(var/obj/item/weapon/talkingcrystal/O in view(3,src))
O.catchMessage(message,src)
log_say("[name]/[key] : [message]")

View File

@@ -62,13 +62,14 @@
/mob/proc/say_quote(var/text,var/is_speaking_soghun,var/is_speaking_skrell,var/is_speaking_tajaran)
if(!text)
return "says, \"...\""; //not the best solution, but it will stop a large number of runtimes. The cause is somewhere in the Tcomms code
//tcomms code is still runtiming somewhere here
var/ending = copytext(text, length(text))
if (is_speaking_soghun)
return "hisses, \"<span class='species'>[text]</span>\"";
if (is_speaking_skrell)
return "warbles, \"<span class='species'>[text]</span>\"";
if (is_speaking_tajaran)
return "purrs, \"<span class='species'>[text]</span>\"";
return "mrowls, \"<span class='species'>[text]</span>\"";
//Needs Virus2
// if (src.disease_symptoms & DISEASE_HOARSE)
// return "rasps, \"[text]\"";