There's no way this done yet.

This commit is contained in:
ririchiyo
2015-01-11 22:02:56 -05:00
parent 6d0ebd0a5e
commit 2c69c0dc15
96 changed files with 1329 additions and 2370 deletions

View File

@@ -14,6 +14,7 @@
blinded = 0
anchored = 1 // don't get pushed around
invisibility = INVISIBILITY_OBSERVER
languages = ALL
// For Aghosts dicking with telecoms equipment.
var/obj/item/device/multitool/ghostMulti = null
@@ -28,7 +29,6 @@
var/has_enabled_antagHUD = 0
var/medHUD = 0
var/antagHUD = 0
universal_speak = 1
var/atom/movable/following = null
incorporeal_move = 1
@@ -652,7 +652,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(host)
if(config.uneducated_mice)
host.universal_understand = 0
languages = NONE
host.ckey = src.ckey
host << "<span class='info'>You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.</span>"

View File

@@ -1,6 +1,3 @@
/mob/dead/observer/say_understands(var/other)
return 1
/mob/dead/observer/say(var/message)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
@@ -18,7 +15,7 @@
return
. = src.say_dead(message)
/mob/dead/observer/say_quote(var/text)
var/ending = copytext(text, length(text))
@@ -29,50 +26,5 @@
return "[pick("whines", "cries", "spooks", "complains", "drones", "mutters")], \"[text]\"";
/mob/dead/observer/emote(var/act, var/type, var/message)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
if(!message)
return
if(act != "me")
return
log_emote("Ghost/[src.key] (@[src.x],[src.y],[src.z]): [message]")
if(src.client)
if(src.client.prefs.muted & MUTE_DEADCHAT)
src << "\red You cannot emote in deadchat (muted)."
return
if(src.client.handle_spam_prevention(message, MUTE_DEADCHAT))
return
. = src.emote_dead(message)
/*
for (var/mob/M in hearers(null, null))
if (!M.stat)
if(M.job == "Chaplain")
if (prob (49))
M.show_message("<span class='game'><i>You hear muffled speech... but nothing is there...</i></span>", 2)
if(prob(20))
playsound(get_turf(src), pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
else
M.show_message("<span class='game'><i>You hear muffled speech... you can almost make out some words...</i></span>", 2)
// M.show_message("<span class='game'><i>[stutter(message)]</i></span>", 2)
if(prob(30))
playsound(get_turf(src), pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
else
if (prob(50))
return
else if (prob (95))
M.show_message("<span class='game'><i>You hear muffled speech... but nothing is there...</i></span>", 2)
if(prob(20))
playsound(get_turf(src), pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
else
M.show_message("<span class='game'><i>You hear muffled speech... you can almost make out some words...</i></span>", 2)
// M.show_message("<span class='game'><i>[stutter(message)]</i></span>", 2)
playsound(get_turf(src), pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
*/
/mob/dead/observer/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq)
src << message

View File

@@ -110,6 +110,7 @@
message += " CL[pick("A","I")]CK"
return message+"!"
/*
// Language handling.
/mob/proc/add_language(var/language)
@@ -120,13 +121,16 @@
languages.Add(new_language)
return 1
*/
/*
/mob/proc/remove_language(var/rem_language)
languages.Remove(all_languages[rem_language])
return 0
*/
/*
//TBD
/mob/verb/check_languages()
set name = "Check Known Languages"
@@ -139,4 +143,5 @@
dat += "<b>[L.name] (:[L.key])</b><br/>[L.desc]<br/><br/>"
src << browse(dat, "window=checklanguage")
return
return
*/

View File

@@ -5,16 +5,15 @@
/mob/living/carbon/alien
name = "alien" //The alien, not Alien
voice_name = "alien"
speak_emote = list("hisses")
//speak_emote = list("hisses")
icon = 'icons/mob/alien.dmi'
gender = NEUTER
dna = null
languages = ALIEN
var/storedPlasma = 250
var/max_plasma = 500
alien_talk_understand = 1
var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
var/has_fine_manipulation = 0

View File

@@ -1,33 +1,5 @@
/mob/living/carbon/alien/say_understands(var/other)
if (istype(other, /mob/living/carbon/alien))
return 1
return ..()
/mob/living/carbon/alien/say(var/message)
if (silent)
return
if (length(message) >= 2)
if (department_radio_keys[copytext(message, 1, 3)] == "alientalk")
message = copytext(message, 3)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
if (stat == 2)
return say_dead(message)
else
alien_talk(message)
else
if (copytext(message, 1, 2) != "*" && !stat)
playsound(loc, "hiss", 25, 1, 1)//So aliens can hiss while they hiss yo/N
return ..(message)
else
/* ~lol~
/mob/living/carbon/alien/say_quote(var/text)
// var/ending = copytext(text, length(text))
return "[say_message], \"[text]\"";
*/
return ..(message, "A")
/mob/living/proc/alien_talk(var/message)
@@ -40,40 +12,16 @@
var/message_a = say_quote(message)
var/rendered = "<i><span class='game say'>Hivemind, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
for (var/mob/living/S in player_list)
if(!S.stat)
if(S.alien_talk_understand)
if(S.alien_talk_understand == alien_talk_understand)
S.show_message(rendered, 2)
else if (S.hivecheck())
S.show_message(rendered, 2)
if((!S.stat && (S.hivecheck()) || S.stat == DEAD))
S << rendered
var/list/listening = hearers(1, src)
listening -= src
listening += src
/mob/living/carbon/alien/handle_inherent_channels(message, message_mode)
if(!..())
if(message_mode == MODE_ALIEN)
if(hivecheck())
alien_talk(message)
return 1
return 0
var/list/heard = list()
for (var/mob/M in listening)
if(!istype(M, /mob/living/carbon/alien) && !M.alien_talk_understand)
heard += M
if (length(heard))
var/message_b
message_b = "hsssss"
message_b = say_quote(message_b)
message_b = "<i>[message_b]</i>"
rendered = "<i><span class='game say'><span class='name'>[voice_name]</span> <span class='message'>[message_b]</span></span></i>"
for (var/mob/M in heard)
M.show_message(rendered, 2)
message = say_quote(message)
rendered = "<i><span class='game say'>Hivemind, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
var/rendered2 = null
for (var/mob/dead/observer/M in player_list)
if (M.stat > 1)
rendered2 = "<i><span class='game say'>Hivemind, <span class='name'>[name]</span> <a href='byond://?src=\ref[M];follow2=\ref[M];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_a]</span></span></i>"
M.show_message(rendered2, 2)
/mob/living/carbon/alien/hivecheck()
return 1

View File

@@ -11,46 +11,18 @@
icon = 'icons/obj/surgery.dmi'
icon_state = "brain1"
New()
/mob/living/carbon/brain/New()
var/datum/reagents/R = new/datum/reagents(1000)
reagents = R
R.my_atom = src
..()
Destroy()
if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting.
if(stat!=DEAD) //If not dead.
death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA
ghostize() //Ghostize checks for key so nothing else is necessary.
..()
say_understands(var/other)//Goddamn is this hackish, but this say code is so odd
if (istype(other, /mob/living/silicon/ai))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if (istype(other, /mob/living/silicon/decoy))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if (istype(other, /mob/living/silicon/pai))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if (istype(other, /mob/living/silicon/robot))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if (istype(other, /mob/living/carbon/human))
return 1
if (istype(other, /mob/living/carbon/slime))
return 1
return ..()
/mob/living/carbon/brain/Destroy()
if(key) //If there is a mob connected to this thing. Have to check key twice to avoid false death reporting.
if(stat!=DEAD) //If not dead.
death(1) //Brains can die again. AND THEY SHOULD AHA HA HA HA HA HA
ghostize() //Ghostize checks for key so nothing else is necessary.
..()
/mob/living/carbon/brain/update_canmove()
if(in_contents_of(/obj/mecha))

View File

@@ -148,7 +148,6 @@
src.brainmob.real_name = src.brainmob.name
src.brainmob.loc = src
src.brainmob.container = src
src.brainmob.robot_talk_understand = 0
src.brainmob.stat = 0
src.brainmob.silent = 0
dead_mob_list -= src.brainmob

View File

@@ -1,22 +1,20 @@
/mob/living/carbon/brain/say(var/message)
if (silent)
return
if(!(container && (istype(container, /obj/item/device/mmi) || istype(container, /obj/item/device/mmi/posibrain))))
return //No MMI, can't speak, bucko./N
else
if ((department_radio_keys[copytext(message, 1, 3)] == "binary") && (container && istype(container, /obj/item/device/mmi/posibrain)))
message = copytext(message, 3)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
robot_talk(message)
return
if(prob(emp_damage*4))
if(prob(10))//10% chane to drop the message entirely
if(prob(10))
return
else
message = Gibberish(message, (emp_damage*6))//scrambles the message, gets worse when emp_damage is higher
if(istype(container, /obj/item/device/mmi/radio_enabled))
var/obj/item/device/mmi/radio_enabled/R = container
if(R.radio)
spawn(0) R.radio.hear_talk(src, sanitize(message))
..()
message = Gibberish(message, (emp_damage*6)) //scrambles the message, gets worse when emp_damage is higher
/mob/living/carbon/brain/radio(message, message_mode)
if(message_mode && istype(container, /obj/item/device/mmi/radio_enabled))
var/obj/item/device/mmi/radio_enabled/R = container
if(R.radio)
R.radio.talk_into(src, sanitize(message))
return ITALICS | REDUCE_RANGE
/mob/living/carbon/brain/lingcheck()
return 0

View File

@@ -663,3 +663,6 @@
else
src << "You do not have enough chemicals stored to reproduce."
return
/mob/living/carbon/is_muzzled()
return(istype(src.wear_mask, /obj/item/clothing/mask/muzzle))

View File

@@ -1647,11 +1647,11 @@
else new_species_name = "Human"
if(src.species)
if(src.species.language) src.remove_language(species.language)
//if(src.species.language) src.remove_language(species.language)
if(src.species.abilities) src.verbs -= species.abilities
src.species = all_species[new_species_name]
if(src.species.abilities)
if(src.species.language) src.add_language(species.language)
//if(src.species.language) src.add_language(species.language)
if(src.species.abilities) src.verbs |= species.abilities
if(force_organs || !src.organs || !src.organs.len) src.species.create_organs(src)
src.see_in_dark = species.darksight

View File

@@ -1,4 +1,5 @@
/mob/living/carbon/human
languages = HUMAN
//Hair colour and style
var/r_hair = 0
var/g_hair = 0

View File

@@ -1,49 +1,34 @@
/mob/living/carbon/human/say(var/message)
..(message)
if(silent)
src << "\red Silence."
return
/mob/living/carbon/human/say_quote(text)
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
var/ending = copytext(text, length(text))
if (src.stuttering)
return "stammers, \"[text]\"";
if(isliving(src))
var/mob/living/L = src
if (L.getBrainLoss() >= 60)
return "gibbers, \"[text]\"";
if (ending == "?")
return "asks, \"[text]\"";
if (ending == "!")
return "exclaims, \"[text]\"";
//Mimes dont speak! Changeling hivemind and emotes are allowed.
if(miming)
if(length(message) >= 2)
if(mind && mind.changeling)
if(copytext(message, 1, 2) != "*" && department_radio_keys[copytext(message, 1, 3)] != "changeling")
return
else
return ..(message)
if(stat == DEAD)
return ..(message)
// if(dna)
// return "[dna.species.say_mod], \"[text]\"";
if(length(message) >= 1) //In case people forget the '*help' command, this will slow them the message and prevent people from saying one letter at a time
if (copytext(message, 1, 2) != "*")
return
return "says, \"[text]\"";
if(dna)
if(length(message) >= 2)
if (copytext(message, 1, 2) != "*" && department_radio_keys[copytext(message, 1, 3)] != "changeling")
for(var/datum/dna/gene/gene in dna_genes)
if(!gene.block)
continue
if(gene.is_active(src))
message = gene.OnSay(src,message)
/*
if(dna.mutantrace == "lizard")
if(copytext(message, 1, 2) != "*")
message = replacetext(message, "s", stutter("ss"))
/mob/living/carbon/human/treat_message(message)
//if(dna)
//message = dna.species.handle_speech(message,src)
if(dna.mutantrace == "slime" && prob(5))
if(copytext(message, 1, 2) != "*")
if(copytext(message, 1, 2) == ";")
message = ";"
else
message = ""
message += "SKR"
var/imax = rand(5,20)
for(var/i = 0,i<imax,i++)
message += "E"*/
if ((M_HULK in mutations) && health >= 25 && length(message))
message = "[uppertext(replacetext(message, ".", "!"))]!!" //because I don't know how to code properly in getting vars from other files -Bro
if(stat != DEAD)
if(viruses)
for(var/datum/disease/pierrot_throat/D in viruses)
var/list/temp_message = text2list(message, " ") //List each word in the message
var/list/pick_list = list()
@@ -56,89 +41,79 @@
temp_message[H] = "HONK"
pick_list -= H //Make sure that you dont HONK the same word twice
message = list2text(temp_message, " ")
if(wear_mask)
if(istype(wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja) && wear_mask:voice == "Unknown")
if(copytext(message, 1, 2) != "*")
var/list/temp_message = text2list(message, " ")
var/list/pick_list = list()
for(var/i = 1, i <= temp_message.len, i++)
pick_list += i
for(var/i=1, i <= abs(temp_message.len/3), i++)
var/H = pick(pick_list)
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
temp_message[H] = ninjaspeak(temp_message[H])
pick_list -= H
message = list2text(temp_message, " ")
message = replacetext(message, "o", "<22>")
message = replacetext(message, "p", "<22>")
message = replacetext(message, "l", "<22>")
message = replacetext(message, "s", "<22>")
message = replacetext(message, "u", "<22>")
message = replacetext(message, "b", "<22>")
else if(istype(wear_mask, /obj/item/clothing/mask/luchador))
if(copytext(message, 1, 2) != "*")
message = replacetext(message, "captain", "CAPIT<49>N")
message = replacetext(message, "station", "ESTACI<43>N")
message = replacetext(message, "sir", "SE<53>OR")
message = replacetext(message, "the ", "el ")
message = replacetext(message, "my ", "mi ")
message = replacetext(message, "is ", "es ")
message = replacetext(message, "it's", "es")
message = replacetext(message, "friend", "amigo")
message = replacetext(message, "buddy", "amigo")
message = replacetext(message, "hello", "hola")
message = replacetext(message, " hot", " caliente")
message = replacetext(message, " very ", " muy ")
message = replacetext(message, "sword", "espada")
message = replacetext(message, "library", "biblioteca")
message = replacetext(message, "traitor", "traidor")
message = replacetext(message, "wizard", "mago")
message = uppertext(message) //Things end up looking better this way (no mixed cases), and it fits the macho wrestler image.
if(prob(25))
message += " OLE!"
message = ..(message)
else if(istype(wear_mask, /obj/item/clothing/mask/horsehead))
var/obj/item/clothing/mask/horsehead/hoers = wear_mask
if(hoers.voicechange)
if(!(copytext(message, 1, 2) == "*" || (mind && mind.changeling && department_radio_keys[copytext(message, 1, 3)] != "changeling")))
message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
return message
else if(istype(wear_mask, /obj/item/clothing/mask/happy))
var/obj/item/clothing/mask/happy/happiest = wear_mask
if(copytext(message, 1, 2) != "*")
if(prob(5))
message = pick("AHAHAHAHA!", "GAHAHAHAHA!")
playsound(get_turf(src), 'sound/effects/hellclown.ogg', 50, 1)
flick("happiest_flash", happiest)
src << "<span class=warning>You lose self-control for a second and let out an ugly laugh.</span>"
else
message = replacetext(message, "die", "laugh")
message = replacetext(message, "dying", "laughing")
message = replacetext(message, "death", "laughter")
message = replacetext(message, "kill", "tickle")
message = replacetext(message, "killed", "tickled")
message = replacetext(message, "killing", "tickling")
message = replacetext(message, "murder", "humor")
message = replacetext(message, "murderer", "clown")
message = replacetext(message, "ghost", "fan")
message = replacetext(message, "dead", "happy")
message = replacetext(message, "killer", "comedian")
message = replacetext(message, "blood", "confetti")
message = replacetext(message, "gun", "banana")
message = replacetext(message, "killer", "comedian")
message = replacetext(message, "bomb", "pie")
message = replacetext(message, "explode", "comedian")
message = replacetext(message, "violence", "joy")
if ((M_HULK in mutations) && health >= 25 && length(message))
if(copytext(message, 1, 2) != "*")
message = "[uppertext(message)]!!" //because I don't know how to code properly in getting vars from other files -Bro
/mob/living/carbon/human/GetVoice()
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice))
var/obj/item/clothing/mask/gas/voice/V = src.wear_mask
if(V.vchange)
return V.voice
else
return name
if(mind && mind.changeling && mind.changeling.mimicing)
return mind.changeling.mimicing
if(GetSpecialVoice())
return GetSpecialVoice()
return real_name
if (src.slurring)
if(copytext(message, 1, 2) != "*")
message = slur(message)
..(message)
/mob/living/carbon/human/IsVocal()
if(mind)
return !miming
return 1
/mob/living/carbon/human/proc/SetSpecialVoice(var/new_voice)
if(new_voice)
special_voice = new_voice
return
/mob/living/carbon/human/proc/UnsetSpecialVoice()
special_voice = ""
return
/mob/living/carbon/human/proc/GetSpecialVoice()
return special_voice
/mob/living/carbon/human/binarycheck()
if(ears)
var/obj/item/device/radio/headset/dongle = ears
if(!istype(dongle)) return 0
if(dongle.translate_binary) return 1
/mob/living/carbon/human/radio(message, message_mode)
. = ..()
if(. != 0)
return .
switch(message_mode)
if(MODE_HEADSET)
if (ears)
ears.talk_into(src, message)
return ITALICS | REDUCE_RANGE
if(MODE_SECURE_HEADSET)
if (ears)
ears.talk_into(src, message, 1)
return ITALICS | REDUCE_RANGE
if(MODE_DEPARTMENT)
if (ears)
ears.talk_into(src, message, message_mode)
return ITALICS | REDUCE_RANGE
if(message_mode in radiochannels)
if(ears)
ears.talk_into(src, message, message_mode)
return ITALICS | REDUCE_RANGE
return 0
/mob/living/carbon/human/get_alt_name()
if(name != GetVoice())
return " (as [get_id_name("Unknown")])"
/mob/living/carbon/human/proc/forcesay(list/append)
if(stat == CONSCIOUS)
@@ -170,46 +145,3 @@
say(temp)
winset(client, "input", "text=[null]")
/mob/living/carbon/human/say_understands(var/other,var/datum/language/speaking = null)
if(has_brain_worms()) //Brain worms translate everything. Even mice and alien speak.
return 1
if (istype(other, /mob/living/silicon/ai))
return 1
if (istype(other, /mob/living/silicon/decoy))
return 1
if (istype(other, /mob/living/silicon/pai))
return 1
if (istype(other, /mob/living/silicon/robot))
return 1
if (istype(other, /mob/living/carbon/brain))
return 1
if (istype(other, /mob/living/carbon/slime))
return 1
return ..()
/mob/living/carbon/human/GetVoice()
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice))
var/obj/item/clothing/mask/gas/voice/V = src.wear_mask
if(V.vchange)
return V.voice
else
return name
if(mind && mind.changeling && mind.changeling.mimicing)
return mind.changeling.mimicing
if(GetSpecialVoice())
return GetSpecialVoice()
return real_name
/mob/living/carbon/human/proc/SetSpecialVoice(var/new_voice)
if(new_voice)
special_voice = new_voice
return
/mob/living/carbon/human/proc/UnsetSpecialVoice()
special_voice = ""
return
/mob/living/carbon/human/proc/GetSpecialVoice()
return special_voice

View File

@@ -1,178 +1,73 @@
// NOTE THAT HEARD AND UNHEARD USE GENDER_REPLACE SYNTAX SINCE BYOND IS STUPID
/mob/living/carbon/human/whisper(var/message as text, var/unheard=" whispers something", var/heard="whispers,", var/apply_filters=1, var/allow_lastwords=1)
if(say_disabled) //This is here to try to identify lag problems
usr << "\red Speech is currently admin-disabled."
/mob/living/carbon/human/whisper(var/message as text)
if(!IsVocal())
return
// N3X15'S AWFUL GENDER SHIT
unheard=gender_replace(src.gender,unheard)
heard=gender_replace(src.gender,heard)
if(say_disabled) //This is here to try to identify lag problems
usr << "<span class='danger'>Speech is currently admin-disabled.</span>"
return
message = trim(copytext(strip_html_simple(message), 1, MAX_MESSAGE_LEN))
if (!message || silent || miming)
if(!can_speak(message))
return
message = "<i>[message]</i>"
log_whisper("[src.name]/[src.key] : [message]")
if (src.client)
if (src.client.prefs.muted & MUTE_IC)
src << "\red You cannot whisper (muted)."
src << "<span class='danger'>You cannot whisper (muted).</span>"
return
if (src.client.handle_spam_prevention(message,MUTE_IC))
return
log_whisper("[src.name]/[src.key] : [message]")
var/alt_name = get_alt_name()
if (src.stat == 2)
return src.say_dead(message)
var/whispers = "whispers"
var/critical = InCritical()
if (src.stat && (said_last_words || !src.isInCrit())) // TIME TO WHISPER WHILE IN CRIT
// We are unconscious but not in critical, so don't allow them to whisper.
if(stat == UNCONSCIOUS && !critical)
return
var/alt_name = ""
if (istype(src, /mob/living/carbon/human) && src.name != GetVoice())
var/mob/living/carbon/human/H = src
alt_name = " (as [H.get_id_name("Unknown")])"
// If whispering your last words, limit the whisper based on how close you are to death.
if(critical)
var/health_diff = round(-config.health_threshold_dead + health)
// If we cut our message short, abruptly end it with a-..
var/message_len = length(message)
message = copytext(message, 1, health_diff) + "[message_len > health_diff ? "-.." : "..."]"
message = Ellipsis(message, 10, 1)
whispers = "whispers in their final breath"
// Mute disability
if (src.sdisabilities & MUTE)
return
message = treat_message(message)
if(M_WHISPER in src.mutations)
src.say(message)
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
return
log_whisper("[src.name]/[src.key] (@[src.x],[src.y],[src.z]): [message]")
var/italics = 1
var/message_range = 1
//var/orig_text=message
if(apply_filters)
if(istype(src.wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)&&src.wear_mask:voice=="Unknown")
if(copytext(message, 1, 2) != "*")
var/list/temp_message = text2list(message, " ")
var/list/pick_list = list()
for(var/i = 1, i <= temp_message.len, i++)
pick_list += i
for(var/i=1, i <= abs(temp_message.len/3), i++)
var/H = pick(pick_list)
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
temp_message[H] = ninjaspeak(temp_message[H])
pick_list -= H
message = list2text(temp_message, " ")
message = replacetext(message, "o", "<22>")
message = replacetext(message, "p", "<22>")
message = replacetext(message, "l", "<22>")
message = replacetext(message, "s", "<22>")
message = replacetext(message, "u", "<22>")
message = replacetext(message, "b", "<22>")
if (src.stuttering)
message = stutter(message)
for (var/obj/O in view(message_range, src))
spawn (0)
if (O)
O.hear_talk(src, message)
var/list/listening = hearers(message_range, src)
listening |= src
//Pass whispers on to anything inside the immediate listeners.
for(var/mob/L in listening)
for(var/mob/C in L.contents)
if(istype(C,/mob/living))
listening += C
var/list/listening_dead = list()
for(var/mob/M in player_list)
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTEARS) && client)
listening_dead |= M
var/list/listening = get_hear(1, src) | listening_dead
var/list/eavesdropping = hearers(2, src)
eavesdropping -= src
eavesdropping -= listening
var/list/watching = hearers(5, src)
watching -= src
watching -= listening
watching -= eavesdropping
var/list/heard_a = list() // understood us
var/list/heard_b = list() // didn't understand us
var/and_passes_on=""
var/rendered
if(!said_last_words && src.isInCrit())
and_passes_on=" - and passes on"
said_last_words=src.stat
for (var/mob/M in listening)
if (M.say_understands(src))
heard_a += M
else
heard_b += M
var/rendered = null
for (var/mob/M in watching)
if (!(M.client) || istype(M, /mob/new_player))
continue
if (M.say_understands(src))
rendered = "<span class='game say'><span class='name'>[src.name]</span> [unheard][and_passes_on].</span>"
else
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> [unheard][and_passes_on].</span>"
rendered = "<span class='game say'><span class='name'>[src.name]</span> [whispers] something.</span>"
for(var/mob/M in watching)
M.show_message(rendered, 2)
if (length(heard_a))
var/message_a = message
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] [whispers], <span class='message'>\"[message]\"</span></span>"
if (italics)
message_a = "<i>[message_a]</i>"
//This appears copied from carbon/living say.dm so the istype check for mob is probably not needed. Appending for src is also not needed as the game will check that automatically.
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] [heard] <span class='message'>\"[message_a]\"</span>[and_passes_on]</span>"
for(var/mob/M in listening)
M.Hear(rendered, src, languages, message)
for (var/mob/M in heard_a)
if (!(M.client) || istype(M, /mob/new_player))
continue
M.show_message(rendered, 2)
message = stars(message)
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] [whispers], <span class='message'>\"[message]\"</span></span>"
for(var/mob/M in eavesdropping)
M.Hear(rendered, src, languages, message)
if (length(heard_b))
var/message_b
message_b = stars(message)
if (italics)
message_b = "<i>[message_b]</i>"
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> [heard] <span class='message'>\"[message_b]\"</span>[and_passes_on]</span>"
for (var/mob/M in heard_b)
if (!(M.client) || istype(M, /mob/new_player))
continue
M.show_message(rendered, 2)
for (var/mob/M in eavesdropping)
if (!(M.client) || istype(M, /mob/new_player))
continue
if (M.say_understands(src))
var/message_c
message_c = stars(message)
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] [heard] <span class='message'>\"[message_c]\"</span>[and_passes_on]</span>"
M.show_message(rendered, 2)
else
rendered = "<span class='game say'><span class='name'>[src.voice_name]</span> [unheard][and_passes_on].</span>"
M.show_message(rendered, 2)
if (italics)
message = "<i>[message]</i>"
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] [heard] <span class='message'>\"[message]\"</span>[and_passes_on]</span>"
for (var/mob/M in dead_mob_list)
if (!(M.client) || istype(M, /mob/new_player))
continue
if (M.stat > 1 && !(M in heard_a) && (M.client.prefs.toggles & CHAT_GHOSTEARS))
M.show_message(rendered, 2)
if(said_last_words)
// Kill 'em.
src.stat = DEAD
src.death(0)
src.regenerate_icons()
if(critical) //Dying words.
succumb(1)

View File

@@ -7,7 +7,6 @@
if(istype(src, /mob/living/carbon/slime/adult))
//ghostize() - Messes up making momma slime a baby
var/mob/living/carbon/slime/M1 = new primarytype(loc)
M1.universal_speak = universal_speak
if(src.mind)
src.mind.transfer_to(M1)
else

View File

@@ -4,6 +4,7 @@
icon_state = "grey baby slime"
pass_flags = PASSTABLE
speak_emote = list("hums")
languages = SLIME | HUMAN
layer = 5
@@ -39,6 +40,8 @@
var/list/Friends = list() // A list of potential friends
var/list/FriendsWeight = list() // A list containing values respective to Friends. This determines how many times a slime "likes" something. If the slime likes it more than 2 times, it becomes a friend
var/list/speech_buffer = list()
// slimes pass on genetic data, so all their offspring have the same "Friends",
///////////TIME FOR SUBSPECIES

View File

@@ -183,7 +183,7 @@
src.mind.transfer_to(new_slime)
else
new_slime.key = src.key
new_slime.universal_speak = universal_speak
new_slime.languages = languages
new_slime << "<B>You are now an adult slime.</B>"
del(src)
else
@@ -225,8 +225,7 @@
var/mob/living/carbon/slime/new_slime = pick(babies)
new_slime.a_intent = "hurt"
new_slime.universal_speak = universal_speak
new_slime.universal_understand = universal_understand
new_slime.languages = languages
if(src.mind)
src.mind.transfer_to(new_slime)
else

View File

@@ -1,8 +1,5 @@
/mob/living/carbon/slime/say(var/message)
if (silent)
return
else
return ..()
..()
/mob/living/carbon/slime/say_quote(var/text)
var/ending = copytext(text, length(text))
@@ -14,8 +11,10 @@
return "telepathically chirps, \"[text]\"";
/mob/living/carbon/slime/say_understands(var/other)
if (istype(other, /mob/living/carbon/slime))
return 1
return ..()
/mob/living/carbon/slime/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq)
if(speaker != src && !radio_freq)
if(speaker in Friends)
speech_buffer = list()
speech_buffer += speaker.name
speech_buffer += lowertext(html_decode(message))
..()

View File

@@ -72,7 +72,7 @@
gender = NEUTER
dna.mutantrace = "plant"
greaterform = "Diona"
add_language("Rootspeak")
//add_language("Rootspeak")
//Verbs after this point.
@@ -142,8 +142,8 @@
src.loc = L.loc
del(L)
for(var/datum/language/L in languages)
adult.add_language(L.name)
//for(var/datum/language/L in languages)
//adult.add_language(L.name)
adult.regenerate_icons()
adult.name = src.name
@@ -186,10 +186,9 @@
ready_evolve = 1
src << "\green You feel ready to move on to your next stage of growth."
else if(donors.len == 2)
universal_understand = 1
src << "\green You feel your awareness expand, and realize you know how to understand the creatures around you."
else if(donors.len == 4)
universal_speak = 1
languages = HUMAN
src << "\green You feel your vocal range expand, and realize you know how to speak with the creatures around you."
else if(donors.len == 3)
src << "\green More blood seeps into you, continuing to expand your growing collection of memories."

View File

@@ -1,7 +1,8 @@
/mob/living/carbon/monkey
name = "monkey"
voice_name = "monkey"
speak_emote = list("chimpers")
//speak_emote = list("chimpers")
languages = MONKEY
icon_state = "monkey1"
icon = 'icons/mob/monkey.dmi'
gender = NEUTER
@@ -89,21 +90,21 @@
..()
dna.mutantrace = "lizard"
greaterform = "Unathi"
add_language("Sinta'unathi")
//add_language("Sinta'unathi")
/mob/living/carbon/monkey/skrell/New()
..()
dna.mutantrace = "skrell"
greaterform = "Skrell"
add_language("Skrellian")
//add_language("Skrellian")
/mob/living/carbon/monkey/tajara/New()
..()
dna.mutantrace = "tajaran"
greaterform = "Tajaran"
add_language("Siik'tajr")
//add_language("Siik'tajr")
/mob/living/carbon/monkey/diona/New()
@@ -112,7 +113,7 @@
gender = NEUTER
dna.mutantrace = "plant"
greaterform = "Diona"
add_language("Rootspeak")
//add_language("Rootspeak")
/mob/living/carbon/monkey/show_inv(mob/living/carbon/user as mob)
user.set_machine(src)

View File

@@ -1,9 +1,2 @@
/mob/living/carbon/monkey/say(var/message,var/forced_by=null)
if (silent)
return
else
return ..()
/*
/mob/living/carbon/monkey/say_quote(var/text)
return "[src.say_message], \"[text]\"";
*/
return "chimpers, \"[text]\"";

View File

@@ -849,4 +849,7 @@
return(gain)
/mob/living/singularity_pull(S)
step_towards(src, S)
step_towards(src, S)
/mob/living/proc/InCritical()
return (src.health < 0 && src.health > -95.0 && stat == UNCONSCIOUS)

View File

@@ -1,5 +1,6 @@
/mob/living
see_invisible = SEE_INVISIBLE_LIVING
languages = HUMAN
//Health and life related vars
var/maxHealth = 100 //Maximum health that should be possible.

View File

@@ -1,3 +1,22 @@
//bitflag #defines for radio returns.
#define ITALICS 1
#define REDUCE_RANGE 2
#define NOPASS 4
//message modes. you're not supposed to mess with these.
#define MODE_HEADSET "headset"
#define MODE_ROBOT "robot"
#define MODE_R_HAND "right hand"
#define MODE_L_HAND "left hand"
#define MODE_INTERCOM "intercom"
#define MODE_BINARY "binary"
#define MODE_WHISPER "whisper"
#define MODE_SECURE_HEADSET "secure headset"
#define MODE_DEPARTMENT "department"
#define MODE_ALIEN "alientalk"
#define MODE_HOLOPAD "holopad"
#define MODE_CHANGELING "changeling"
#define SAY_MINIMUM_PRESSURE 10
var/list/department_radio_keys = list(
":r" = "right ear", "#r" = "right ear", ".r" = "right ear", "!r" = "fake right ear",
@@ -55,19 +74,7 @@ var/list/department_radio_keys = list(
)
/mob/living/proc/binarycheck()
if (istype(src, /mob/living/silicon/pai))
return
if (issilicon(src))
return 1
if (!ishuman(src))
return
var/mob/living/carbon/human/H = src
if (H.ears)
var/obj/item/device/radio/headset/dongle
if(istype(H.ears,/obj/item/device/radio/headset))
dongle = H.ears
if(!istype(dongle)) return
if(dongle.translate_binary) return 1
return 0
/mob/living/proc/hivecheck()
if (isalien(src)) return 1
@@ -82,7 +89,7 @@ var/list/department_radio_keys = list(
// /vg/edit: Added forced_by for handling braindamage messages and meme stuff
/mob/living/say(var/message, var/forced_by=null)
/mob/living/say(var/message, bubble_type)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
message = capitalize(message)
@@ -92,543 +99,187 @@ var/list/department_radio_keys = list(
src << "\red You can't speak while silenced."
return
if (stat == 2) // Dead.
return say_dead(message)
else if (stat) // Unconcious.
if (stat == DEAD) // Dead.
say_dead(message)
return
if (stat) // Unconcious.
return
if(check_emote(message))
return
if(!can_speak_basic(message))
return
if (src.client)
if(client.prefs.muted & MUTE_IC)
src << "\red You cannot speak in IC (muted)."
return
if (src.client.handle_spam_prevention(message, MUTE_IC))
src << "\red Stop spamming, shitbird."
return
// stat == 2 is handled above, so this stops transmission of uncontious messages
if (stat)
src << "\red You cannot find the strength to form the words."
return
// undo last word status.
if(ishuman(src))
var/mob/living/carbon/human/H=src
if(H.said_last_words)
H.said_last_words=0
// Mute disability
if (sdisabilities & MUTE)
src << "\red Your words don't leave your mouth!"
return
// Muzzled.
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
src << "\red [pick("Mmmrf!","Mmmf!","Hmmmf!")]"
return
// Emotes.
if (copytext(message, 1, 2) == "*" && !stat)
return emote(copytext(message, 2))
/*
Identity hiding.
*/
var/alt_name = ""
if (istype(src, /mob/living/carbon/human) && name != GetVoice())
var/mob/living/carbon/human/H = src
alt_name = " (as [H.get_id_name("Unknown")])"
/*
Now we get into the real meat of the say processing. Determining the message mode.
*/
var/italics = 0
var/message_range = null
var/message_mode = null
var/datum/language/speaking = null //For use if a specific language is being spoken.
var/braindam = getBrainLoss()
if (braindam >= 60)
if(prob(braindam/4))
message = stutter(message)
if(prob(braindam))
message = uppertext(message)
// General public key. Special message handling
var/mmode
var/cprefix = ""
if(length(message) >= 2)
cprefix = copytext(message, 1, 3)
if(cprefix in department_radio_keys)
mmode = department_radio_keys[cprefix]
if (copytext(message, 1, 2) == ";" || (prob(braindam/2) && !mmode))
message_mode = "headset"
var/message_mode = get_message_mode(message)
if(message_mode == MODE_HEADSET || message_mode == MODE_ROBOT)
message = copytext(message, 2)
else if(message_mode)
message = copytext(message, 3)
if(findtext(message, " ",1, 2))
message = copytext(message, 2)
// Begin checking for either a message mode or a language to speak.
else if (length(message) >= 2)
var/channel_prefix = copytext(message, 1, 3)
//Check if the person is speaking a language that they know.
if(languages.len)
for(var/datum/language/L in languages)
if(lowertext(channel_prefix) == ":[L.key]")
speaking = L
break
message_mode = department_radio_keys[channel_prefix]
if (message_mode || speaking || copytext(message,1,2) == ":")
message = trim(copytext(message, 3))
if (!(istype(src,/mob/living/carbon/human) || istype(src,/mob/living/carbon/monkey) || istype(src, /mob/living/simple_animal/parrot) || isrobot(src) && (message_mode=="department" || (message_mode in radiochannels))))
message_mode = null //only humans can use headsets
// Check changed so that parrots can use headsets. Other simple animals do not have ears and will cause runtimes.
// And borgs -Sieve
if(handle_inherent_channels(message, message_mode))
return
if(!can_speak_vocal(message))
return
message = treat_message(message)
/* /vg/ removals
if(src.stunned > 2 || (traumatic_shock > 61 && prob(50)))
message_mode = null //Stunned people shouldn't be able to physically turn on their radio/hold down the button to speak into it
*/
if(!message) return
var/message_range = 7
var/radio_return = radio(message, message_mode)
if(radio_return & NOPASS) //There's a whisper() message_mode, no need to continue the proc if that is called
return
if(radio_return & ITALICS)
message = "<i>[message]</i>"
if(radio_return & REDUCE_RANGE)
message = 1
// :downs:
if (getBrainLoss() >= 60)
message = replacetext(message, " am ", " ")
message = replacetext(message, " is ", " ")
message = replacetext(message, " are ", " ")
message = replacetext(message, "you", "u")
message = replacetext(message, "help", "halp")
message = replacetext(message, "grief", "griff")
message = replacetext(message, "murder", "griff")
message = replacetext(message, "slipping", "griffing")
message = replacetext(message, "slipped", "griffed")
message = replacetext(message, "slip", "griff")
message = replacetext(message, "sec", "shit")
message = replacetext(message, "space", "spess")
message = replacetext(message, "carp", "crap")
message = replacetext(message, "reason", "raisin")
message = replacetext(message, "mommi", "spidurr")
message = replacetext(message, "spider", "spidurr")
message = replacetext(message, "skitterbot", "spidurbutt")
message = replacetext(message, "skitter", "spider sound")
// /vg/: LOUDER
message = uppertext(message)
if(prob(50))
message = uppertext(message)
message += "[stutter(pick("!", "!!", "!!!"))]"
if(!stuttering && prob(15))
message = stutter(message)
send_speech(message, message_range, src, bubble_type)
if (stuttering)
log_say("[name]/[key] : [message]")
/mob/living/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq)
if(!client)
return
var/deaf_message
var/deaf_type
if(speaker != src)
deaf_message = "<span class='name'>[name]</span> talks but you cannot hear them."
deaf_type = 1
else
deaf_message = "<span class='notice'>You can't hear yourself!</span>"
deaf_type = 2 // Since you should be able to hear yourself without looking
if(!(message_langs & languages) || force_compose) //force_compose is so AIs don't end up without their hrefs.
message = compose_message(speaker, message_langs, raw_message, radio_freq)
show_message(message, 2, deaf_message, deaf_type)
return message
/mob/living/send_speech(message, message_range = 7, obj/source = src, bubble_type)
var/list/listening = get_hearers_in_view(message_range, source)
var/list/listening_dead = list()
for(var/mob/M in player_list)
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTEARS) && client) // client is so that ghosts don't have to listen to mice
listening_dead |= M
listening -= listening_dead //so ghosts dont hear stuff twice
var/rendered = compose_message(src, languages, message)
for(var/atom/movable/AM in listening)
AM.Hear(rendered, src, languages, message)
for(var/mob/M in listening_dead)
M.Hear(rendered, src, languages, message)
//speech bubble
var/list/speech_bubble_recipients = list()
for(var/mob/M in (listening + listening_dead))
if(M.client)
speech_bubble_recipients.Add(M.client)
spawn(0)
flick_overlay(image('icons/mob/talk.dmi', src, "h[bubble_type][say_test(message)]",MOB_LAYER+1), speech_bubble_recipients, 30)
/mob/living/proc/say_test(var/text)
var/ending = copytext(text, length(text))
if (ending == "?")
return "1"
else if (ending == "!")
return "2"
return "0"
/mob/living/can_speak(message) //For use outside of Say()
if(can_speak_basic(message) && can_speak_vocal(message))
return 1
/mob/living/proc/can_speak_basic(message) //Check BEFORE handling of xeno and ling channels
if(!message || message == "")
return
if(client)
if(client.prefs.muted & MUTE_IC)
src << "<span class='danger'>You cannot speak in IC (muted).</span>"
return
if(client.handle_spam_prevention(message,MUTE_IC))
return
return 1
/mob/living/proc/can_speak_vocal(message) //Check AFTER handling of xeno and ling channels
if(!message)
return
if(sdisabilities & MUTE)
return
if(is_muzzled())
return
if(!IsVocal())
return
return 1
/mob/living/proc/check_emote(message)
if(copytext(message, 1, 2) == "*")
emote(copytext(message, 2))
return 1
/mob/living/proc/get_message_mode(message)
if(copytext(message, 1, 2) == ";")
return MODE_HEADSET
else if(length(message) > 2)
return department_radio_keys[copytext(message, 1, 3)]
/mob/living/proc/handle_inherent_channels(message, message_mode)
if(message_mode == MODE_CHANGELING)
if(lingcheck())
log_say("[mind.changeling.changelingID]/[src.key] : [message]")
for(var/mob/M in mob_list)
if(M.lingcheck() || M.stat == DEAD)
M << "<i><font color=#800080><b>[mind.changeling.changelingID]:</b> [message]</font></i>"
return 1
return 0
/mob/living/proc/treat_message(message)
if(getBrainLoss() >= 60)
message = derpspeech(message, stuttering)
if(stuttering)
message = stutter(message)
// BEGIN OLD RADIO CODE
/////////////////////////////////////////////////////////////////////////
var/list/obj/item/used_radios = new
var/is_speaking_radio = 0
return message
switch (message_mode)
if ("headset")
if (isrobot(src) && src:radio)
spawn src:radio.talk_into(src, message)
used_radios += src:radio
is_speaking_radio = 1
if (!isrobot(src) && src:ears)
spawn src:ears.talk_into(src, message)
used_radios += src:ears
is_speaking_radio = 1
message_range = 1
italics = 1
if ("secure headset")
if (src:ears)
spawn src:ears.talk_into(src, message, 1)
used_radios += src:ears
is_speaking_radio = 1
message_range = 1
italics = 1
if ("right hand")
/mob/living/proc/radio(message, message_mode, steps)
switch(message_mode)
if(MODE_R_HAND)
if (r_hand)
spawn r_hand.talk_into(src, message)
used_radios += src:r_hand
is_speaking_radio = 1
message_range = 1
italics = 1
if ("left hand")
r_hand.talk_into(src, message)
return ITALICS | REDUCE_RANGE
if(MODE_L_HAND)
if (l_hand)
l_hand.talk_into(src, message)
used_radios += src:l_hand
is_speaking_radio = 1
message_range = 1
italics = 1
if ("intercom")
return ITALICS | REDUCE_RANGE
if(MODE_INTERCOM)
for (var/obj/item/device/radio/intercom/I in view(1, null))
spawn I.talk_into(src, message)
used_radios += I
is_speaking_radio = 1
message_range = 1
italics = 1
//I see no reason to restrict such way of whispering
if ("whisper")
whisper(message)
return
if ("binary")
if(robot_talk_understand || binarycheck())
//message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant
I.talk_into(src, message)
return ITALICS | REDUCE_RANGE
if(MODE_BINARY)
if(binarycheck())
robot_talk(message)
return
return ITALICS | REDUCE_RANGE //Does not return 0 since this is only reached by humans, not borgs or AIs.
if(MODE_WHISPER)
whisper(message)
return NOPASS
return 0
/mob/living/lingcheck()
if(mind && mind.changeling)
return 1
if ("alientalk")
if(alien_talk_understand || hivecheck())
//message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant
alien_talk(message)
return
if ("department")
if(istype(src, /mob/living/carbon))
if (src:ears)
spawn src:ears.talk_into(src, message, message_mode)
used_radios += src:ears
is_speaking_radio = 1
else if(istype(src, /mob/living/silicon/robot))
if (src:radio)
spawn src:radio.talk_into(src, message, message_mode)
used_radios += src:radio
message_range = 1
italics = 1
if ("pAI")
if (src:radio)
spawn src:radio.talk_into(src, message)
used_radios += src:radio
message_range = 1
italics = 1
if("changeling")
if(mind && mind.changeling)
log_say("[key_name(src)] ([mind.changeling.changelingID])(@[src.x],[src.y],[src.z]): [message]")
for(var/mob/Changeling in mob_list)
if(istype(Changeling, /mob/living/silicon)) continue //WHY IS THIS NEEDED?
if(!Changeling.client) continue
var/controls = ""
if(isobserver(Changeling))
controls = " (<a href='byond://?src=\ref[Changeling];follow2=\ref[Changeling];follow=\ref[src]'>Follow</a>"
if(Changeling.client.holder)
controls+= " | <A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>"
controls += " - AKA [src]"
controls += ")"
if( (Changeling.mind && Changeling.mind.changeling) \
|| isobserver(Changeling))
// TODO: needs CSS
Changeling << "<i><font color=#800080><b>[mind.changeling.changelingID]</b>[controls]: [message]</font></i>"
return
////SPECIAL HEADSETS START
else
//world << "SPECIAL HEADSETS"
if (message_mode in radiochannels)
if(isrobot(src))//Seperates robots to prevent runtimes from the ear stuff
var/mob/living/silicon/robot/R = src
if(R.radio)//Sanityyyy
spawn R.radio.talk_into(src, message, message_mode)
used_radios += R.radio
else
if (src:ears)
spawn src:ears.talk_into(src, message, message_mode)
used_radios += src:ears
message_range = 1
italics = 1
/////SPECIAL HEADSETS END
/////////////////////////////////////////////////////////////////////
// END OLD RADIO CODE
/*
///////////////////////////////////////////////////////////
// VIDEO KILLED THE RADIO STAR V2.0
//
// EXPERIMENTAL CODE BY YOUR PALS AT /vg/
///////////////////////////////////////////////////////////
var/list/obj/item/used_radios = new
// Actually speaking on the radio?
var/is_speaking_radio = 0
// Devices selected
var/list/devices=list()
// Select all always_talk devices
// Carbon lifeforms
//if(istype(src, /mob/living/carbon))
for(var/obj/item/device/radio/R in contents)
if(R.always_talk)
devices += R
//src << "Speaking on [message_mode]: [message]"
if(message_mode)
switch (message_mode)
if ("right hand")
if (r_hand)
r_hand.talk_into(src, message)
used_radios += src:r_hand
message_range = 1
italics = 1
if ("left hand")
if (l_hand)
l_hand.talk_into(src, message)
used_radios += src:l_hand
message_range = 1
italics = 1
// Select a headset and speak into it without actually sending a message
if ("fake")
if(iscarbon(src))
var/mob/living/carbon/C=src
if(C:ears) used_radios += C:ears
if(issilicon(src))
var/mob/living/silicon/Ro=src
if(Ro:radio) devices += Ro:radio
message_range = 1
italics = 1
if ("fake left hand")
if(iscarbon(src))
var/mob/living/carbon/C=src
if(C:l_hand) used_radios += C:l_hand
message_range = 1
italics = 1
if ("fake right hand")
if(iscarbon(src))
var/mob/living/carbon/C=src
if(C:r_hand) used_radios += C:r_hand
message_range = 1
italics = 1
if ("intercom")
for (var/obj/item/device/radio/intercom/I in view(1, null))
devices += I
message_mode=null
message_range = 1
italics = 1
//I see no reason to restrict such way of whispering
if ("whisper")
whisper(message)
return
if ("binary")
if(robot_talk_understand || binarycheck())
//message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant
robot_talk(message)
return
if ("alientalk")
if(alien_talk_understand || hivecheck())
//message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) //seems redundant
alien_talk(message)
return
if ("pAI")
message_range = 1
italics = 1
if("changeling")
if(mind && mind.changeling)
log_say("[key_name(src)] ([mind.changeling.changelingID])(@[src.x],[src.y],[src.z]): [message]")
for(var/mob/Changeling in mob_list)
if(istype(Changeling, /mob/living/silicon)) continue //WHY IS THIS NEEDED?
if((Changeling.mind && Changeling.mind.changeling) || istype(Changeling, /mob/dead/observer))
Changeling << "<i><font color=#800080><b>[mind.changeling.changelingID]:</b> [message]</font></i>"
else if(istype(Changeling,/mob/dead/observer) && (Changeling.client && Changeling.client.prefs.toggles & CHAT_GHOSTEARS))
Changeling << "<i><font color=#800080><b>[mind.changeling.changelingID] (:</b> <a href='byond://?src=\ref[Changeling];follow2=\ref[Changeling];follow=\ref[src]'>(Follow)</a> [message]</font></i>"
return
else // headset, department channels.
if(iscarbon(src))
var/mob/living/carbon/C=src
if(C:ears) devices += C:ears
if(issilicon(src))
var/mob/living/silicon/Ro=src
if(Ro:radio) devices += Ro:radio
message_range = 1
italics = 1
if(devices.len>0)
for(var/obj/item/device/radio/R in devices)
if(istype(R))
R.talk_into(src, message, message_mode)
used_radios += R
is_speaking_radio = 1
/////////////////////////////////////////////////////////////////
// </NEW RADIO CODE>
/////////////////////////////////////////////////////////////////
*/
var/datum/gas_mixture/environment = loc.return_air()
if(environment)
var/pressure = environment.return_pressure()
if (pressure < SAY_MINIMUM_PRESSURE) //in space no one can hear you scream
italics = 1
message_range = 1
var/list/listening
listening = get_mobs_in_view(message_range, src)
//var/list/onscreen = get_mobs_in_view(7, src)
for(var/mob/M in player_list)
if (!M.client)
continue //skip monkeys and leavers
if (istype(M, /mob/new_player))
continue
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTEARS) && src.client) // src.client is so that ghosts don't have to listen to mice
listening|=M
var/turf/T = get_turf(src)
var/list/W = hear(message_range, T)
for (var/obj/O in ((W | contents)-used_radios))
W |= O
for (var/mob/M in W)
W |= M.contents
for (var/atom/A in W)
if(istype(A, /mob/living/simple_animal/parrot)) //Parrot speech mimickry
if(A == src)
continue //Dont imitate ourselves
var/mob/living/simple_animal/parrot/P = A
if(P.speech_buffer.len >= 10)
P.speech_buffer.Remove(pick(P.speech_buffer))
P.speech_buffer.Add(message)
if(istype(A, /obj/)) //radio in pocket could work, radio in backpack wouldn't --rastaf0
var/obj/O = A
spawn (0)
if(O && !istype(O.loc, /obj/item/weapon/storage))
O.hear_talk(src, message)
var/list/heard_a = list() // understood us
var/list/heard_b = list() // didn't understand us
for (var/M in listening)
if(hascall(M,"say_understands"))
if (M:say_understands(src,speaking))
heard_a += M
else
heard_b += M
else
heard_a += M
var/speech_bubble_test = say_test(message)
var/image/speech_bubble = image('icons/mob/talk.dmi',src,"h[speech_bubble_test]")
for(var/mob/M in hearers(5, src))
if(M != src && is_speaking_radio)
M:show_message("<span class='notice'>[src] talks into [used_radios.len ? used_radios[1] : "radio"]</span>")
var/rendered = null
if (length(heard_a))
var/message_a=message
if(ishuman(src))
var/mob/living/carbon/human/H=src
message_a=H.species.say_filter(src,message_a)
message_a = say_quote(message,speaking)
if (italics)
message_a = "<i>[message_a]</i>"
rendered = "<span class='game say'><span class='name'>[GetVoice()]</span>[alt_name] <span class='message'>[message_a]</span></span>"
var/rendered2 = null
for (var/mob/M in heard_a)
//BEGIN TELEPORT CHANGES
if(!istype(M, /mob/new_player))
if(M && M.stat == DEAD)
if(forced_by)
rendered2 = "<span class='game say'><span class='name'>[GetVoice()] (forced by [forced_by])</span></span>[alt_name] <a href='byond://?src=\ref[M];follow2=\ref[M];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_a]</span></span>"
else
rendered2 = "<span class='game say'><span class='name'>[GetVoice()]</span></span> [alt_name] <a href='byond://?src=\ref[M];follow2=\ref[M];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_a]</span></span>"
M:show_message(rendered2, 2)
continue
//END CHANGES
if(hascall(M,"show_message"))
var/deaf_message = ""
var/deaf_type = 1
if(M != src)
deaf_message = "<span class='name'>[name]</span>[alt_name] talks but you cannot hear them."
else
deaf_message = "<span class='notice'>You cannot hear yourself!</span>"
deaf_type = 2 // Since you should be able to hear yourself without looking
M:show_message(rendered, 2, deaf_message, deaf_type)
M.addSpeechBubble(speech_bubble)
if (length(heard_b))
var/message_b
if(speaking)
message_b = speaking.say_misunderstood(src,message)
else
message_b = stars(message)
message_b = say_quote(message_b,speaking)
if (italics)
message_b = "<i>[message_b]</i>"
rendered = "<span class='game say'><span class='name'>[name]</span>[alt_name] <span class='message'>[message_b]</span></span>" //Voice_name isn't too useful. You'd be able to tell who was talking presumably.
var/rendered2 = null
for (var/M in heard_b)
var/mob/MM
if(istype(M, /mob))
MM = M
if(!istype(MM, /mob/new_player) && MM)
if(MM && MM.stat == DEAD)
if(forced_by)
rendered2 = "<span class='game say'><span class='name'>[voice_name] (forced by [forced_by])</span></span> <a href='byond://?src=\ref[MM];follow2=\ref[MM];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_b]</span></span>"
else
rendered2 = "<span class='game say'><span class='name'>[voice_name]</span></span> <a href='byond://?src=\ref[MM];follow2=\ref[MM];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_b]</span></span>"
MM:show_message(rendered2, 2)
MM.addSpeechBubble(speech_bubble)
continue
if(hascall(M,"show_message"))
M:show_message(rendered, 2)
/*
if(M.client)
if(!M.client.bubbles || M == src)
var/image/I = image('icons/effects/speechbubble.dmi', B, "override")
I.override = 1
M << I
*/ /*
flick("[presay]say", B)
if(istype(loc, /turf))
B.loc = loc
else
B.loc = loc.loc
spawn()
sleep(11)
del(B)
*/
//talking items
for(var/obj/item/weapon/O in view(3,src))
if(O.listening_to_players)
O.catchMessage(message, src)
log_say("[name]/[key] (@[x],[y],[z]): [message]")
/mob/living/say_quote()
if (stuttering)
return "stammers, \"[text]\""
if (getBrainLoss() >= 60)
return "gibbers, \"[text]\""
return ..()
/mob/proc/addSpeechBubble(image/speech_bubble)
if(client)
@@ -637,9 +288,4 @@ var/list/department_radio_keys = list(
if(client) client.images -= speech_bubble
/obj/effect/speech_bubble
var/mob/parent
/mob/living/proc/GetVoice()
return name
var/mob/parent

View File

@@ -19,6 +19,7 @@ var/list/ai_list = list()
anchored = 1 // -- TLE
density = 1
status_flags = CANSTUN|CANPARALYSE
force_compose = 1
var/list/network = list("SS13")
var/obj/machinery/camera/current = null
var/list/connected_robots = list()

View File

@@ -1,22 +1,24 @@
/mob/living/silicon/ai/say(var/message)
if(parent && istype(parent) && parent.stat != 2)
if(parent && istype(parent) && parent.stat != 2) //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.
parent.say(message)
return
//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)
/mob/living/silicon/ai/say_understands(var/other)
if (istype(other, /mob/living/carbon/human))
return 1
if (istype(other, /mob/living/silicon/robot))
return 1
if (istype(other, /mob/living/silicon/decoy))
return 1
if (istype(other, /mob/living/carbon/brain))
return 1
if (istype(other, /mob/living/silicon/pai))
return 1
return ..()
/mob/living/silicon/ai/compose_track_href(atom/movable/speaker, message_langs, raw_message, radio_freq)
//this proc assumes that the message originated from a radio. if the speaker is not a virtual speaker this will probably fuck up hard.
var/mob/M = speaker.GetSource()
var/obj/item/device/radio = speaker.GetRadio()
if(M)
var/faketrack = "byond://?src=\ref[radio];track2=\ref[src];track=\ref[M]"
if(speaker.GetTrack())
faketrack = "byond://?src=\ref[radio];track2=\ref[src];faketrack=\ref[M]"
return "<a href='[faketrack]'>"
return ""
/mob/living/silicon/ai/compose_job(atom/movable/speaker, message_langs, raw_message, radio_freq)
//Also includes the </a> for AI hrefs, for convenience.
return " [radio_freq ? "(" + speaker.GetJob() + ")" : ""]" + "[speaker.GetSource() ? "</a>" : ""]"
/mob/living/silicon/ai/say_quote(var/text)
var/ending = copytext(text, length(text))
@@ -28,7 +30,41 @@
return "states, \"[text]\"";
/mob/living/silicon/ai/proc/IsVocal()
/mob/living/silicon/ai/IsVocal()
//return !config.silent_ai
/mob/living/silicon/ai/get_message_mode(message)
if(copytext(message, 1, 3) in list(":h", ":H", ".h", ".H", "#h", "#H"))
return MODE_HOLOPAD
else
return ..()
/mob/living/silicon/ai/handle_inherent_channels(message, message_mode)
. = ..()
if(.)
return .
if(message_mode == MODE_HOLOPAD)
holopad_talk(message)
return 1
//For holopads only. Usable by AI.
/mob/living/silicon/ai/proc/holopad_talk(var/message)
log_say("[key_name(src)] : [message]")
message = trim(message)
if (!message)
return
var/obj/machinery/hologram/holopad/T = current
if(istype(T) && T.hologram && T.master == src)//If there is a hologram and its master is the user.
send_speech(message, 7, T, "R")
src << "<i><span class='game say'>Holopad transmitted, <span class='name'>[real_name]</span> <span class='message'>\"[message]\"</span></span></i>"//The AI can "hear" its own message.
else
src << "No holopad connected."
return
var/announcing_vox = 0 // Stores the time of the last announcement
var/const/VOX_CHANNEL = 200

View File

@@ -11,15 +11,6 @@
src.anchored = 1
src.canmove = 0
/mob/living/silicon/decoy/say_understands(var/other)
if (istype(other, /mob/living/carbon/human))
return 1
if (istype(other, /mob/living/silicon/robot))
return 1
if (istype(other, /mob/living/silicon/ai))
return 1
return ..()
/mob/living/silicon/decoy/say_quote(var/text)
var/ending = copytext(text, length(text))

View File

@@ -1,19 +1,3 @@
/mob/living/silicon/robot/mommi/say_understands(var/other)
if (istype(other, /mob/living/silicon/ai))
return 1
if (istype(other, /mob/living/silicon/decoy))
return 1
if (istype(other, /mob/living/silicon/robot))
return 1
if (istype(other, /mob/living/carbon/human))
return 1
if (istype(other, /mob/living/carbon/brain))
return 1
if (istype(other, /mob/living/silicon/pai))
return 1
// if (istype(other, /mob/living/silicon/hivebot))
// return 1
return ..()
/mob/living/silicon/robot/mommi/say_quote(var/text)
var/ending = copytext(text, length(text))

View File

@@ -3,7 +3,6 @@
icon = 'icons/mob/mob.dmi'//
icon_state = "shadow"
robot_talk_understand = 0
emote_type = 2 // pAIs emotes are heard, not seen, so they can be seen through a container (eg. person)
var/network = list("SS13")
@@ -13,7 +12,6 @@
var/list/software = list()
var/userDNA // The DNA string of our assigned user
var/obj/item/device/paicard/card // The card we inhabit
var/obj/item/device/radio/radio // Our primary radio
var/speakStatement = "states"
var/speakExclamation = "declares"

View File

@@ -1,18 +1,3 @@
/mob/living/silicon/pai/say_understands(var/other)
if (istype(other, /mob/living/carbon/human))
return 1
if (istype(other, /mob/living/silicon/robot))
return 1
if (istype(other, /mob/living/silicon/pai))
return 1
if (istype(other, /mob/living/silicon/ai))
return 1
if (istype(other, /mob/living/silicon/decoy))
return 1
if (istype(other, /mob/living/carbon/brain))
return 1
return ..()
/mob/living/silicon/pai/say_quote(var/text)
var/ending = copytext(text, length(text))
@@ -27,4 +12,7 @@
if(silence_time)
src << "<font color=green>Communication circuits remain unitialized.</font>"
else
..(msg)
..(msg)
/mob/living/silicon/pai/binarycheck()
return 0

View File

@@ -276,7 +276,7 @@
src.medHUD = !src.medHUD
if("translator")
if(href_list["toggle"])
src.universal_speak = !src.universal_speak
languages = languages == ALL ? HUMAN & ROBOT : ALL
if("doorjack")
if(href_list["jack"])
if(src.cable && src.cable.machine)
@@ -339,7 +339,7 @@
if(s == "medical HUD")
dat += "<a href='byond://?src=\ref[src];software=medicalhud;sub=0'>Medical Analysis Suite</a> <br>"
if(s == "universal translator")
dat += "<a href='byond://?src=\ref[src];software=translator;sub=0'>Universal Translator</a>[(src.universal_speak) ? "<font color=#55FF55><3E></font>" : "<font color=#FF5555><3E></font>"] <br>"
dat += "<a href='byond://?src=\ref[src];software=translator;sub=0'>Universal Translator</a>[(languages == ALL) ? "<font color=#55FF55><3E></font>" : "<font color=#FF5555><3E></font>"] <br>"
if(s == "projection array")
dat += "<a href='byond://?src=\ref[src];software=projectionarray;sub=0'>Projection Array</a> <br>"
if(s == "camera jack")
@@ -501,7 +501,7 @@
/mob/living/silicon/pai/proc/softwareTranslator()
var/dat = {"<h3>Universal Translator</h3><br>
When enabled, this device will automatically convert all spoken and written language into a format that any known recipient can understand.<br><br>
The device is currently [ (src.universal_speak) ? "<font color=#55FF55>en" : "<font color=#FF5555>dis" ]abled.</font><br>
The device is currently [ (languages == ALL) ? "<font color=#55FF55>en" : "<font color=#FF5555>dis" ]abled.</font><br>
<a href='byond://?src=\ref[src];software=translator;sub=0;toggle=1'>Toggle Device</a><br>
"}
return dat

View File

@@ -5,7 +5,6 @@
icon_state = "robot"
maxHealth = 300
health = 300
universal_speak = 1
var/sight_mode = 0
var/custom_name = ""
@@ -27,7 +26,6 @@
var/module_state_2 = null
var/module_state_3 = null
var/obj/item/device/radio/borg/radio = null
var/mob/living/silicon/ai/connected_ai = null
var/obj/item/weapon/cell/cell = null
var/obj/machinery/camera/camera = null

View File

@@ -9,164 +9,62 @@
return "states, \"[text]\"";
/mob/living/silicon/say(var/message)
if (!message)
return
if (src.client)
if(client.prefs.muted & MUTE_IC)
src << "You cannot send IC messages (muted)."
return
if (src.client.handle_spam_prevention(message,MUTE_IC))
return
if (stat == 2)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
return say_dead(message)
//Must be concious to speak
if (stat)
return
if (length(message) >= 2)
var/prefix = copytext(message, 1, 3)
if (department_radio_keys[prefix] == "binary")
if(istype(src, /mob/living/silicon/pai) || istype(src, /mob/living/carbon/brain))
return ..(message)
message = copytext(message, 3)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
/*if(istype(src, /mob/living/silicon/robot/mommi))
src << "Your binary communication device is set to receive only."
return*/
// TODO: move the component system up to silicon so we don't have to use this ugly hack..
if(istype(src, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = src
if(!R.is_component_functioning("comms"))
src << "\red Your binary communications component isn't functional."
return
robot_talk(message)
else if (department_radio_keys[prefix] == "department")
if(isAI(src)&&client)//For patching directly into AI holopads.
var/mob/living/silicon/ai/U = src
message = copytext(message, 3)
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
U.holopad_talk(message)
else//Will not allow anyone by an active AI to use this function.
src << "This function is not available to you."
return
else
if(isMoMMI(src)&&client)//For patching directly into AI holopads.
// Beep boop. Emotes are acceptable.
if (copytext(message, 1, 2) == "*" && !stat)
return ..(message)
var/mob/living/silicon/robot/mommi/U = src
if(U.keeper)
U.mommi_talk(message)
return
return ..(message)
else
// Fix MoMMIs speaking one letter at a time.
if(isMoMMI(src)&&client)
var/mob/living/silicon/robot/mommi/U = src
if(U.keeper)
U.mommi_talk(message)
return
return ..(message)
//For holopads only. Usable by AI.
/mob/living/silicon/ai/proc/holopad_talk(var/message)
message = trim(message)
if (!message)
return
var/obj/machinery/hologram/holopad/T = src.current
log_say("[key_name(src)] (holopad@[T.x],[T.y],[T.z]): [message]")
if(istype(T) && T.hologram && T.master == src)//If there is a hologram and its master is the user.
var/message_a = say_quote(message)
//Human-like, sorta, heard by those who understand humans.
var/rendered_a = "<span class='game say'><span class='name'>[name]</span> <span class='message'>[message_a]</span></span>"
//Speach distorted, heard by those who do not understand AIs.
message = stars(message)
var/message_b = say_quote(message)
var/rendered_b = "<span class='game say'><span class='name'>[voice_name]</span> <span class='message'>[message_b]</span></span>"
src << "<i><span class='game say'>Holopad transmitted, <span class='name'>[real_name]</span> <span class='message'>[message_a]</span></span></i>"//The AI can "hear" its own message.
for(var/mob/M in hearers(T.loc))//The location is the object, default distance.
if(M.say_understands(src))//If they understand AI speak. Humans and the like will be able to.
M.show_message(rendered_a, 2)
else//If they do not.
M.show_message(rendered_b, 2)
/*Radios "filter out" this conversation channel so we don't need to account for them.
This is another way of saying that we won't bother dealing with them.*/
else
src << "No holopad connected."
return
return ..(message, "R")
/mob/living/proc/robot_talk(var/message)
log_say("[key_name(src)] (@[src.x],[src.y],[src.z])(binary): [message]")
message = trim(message)
if (!message)
return
var/message_a = say_quote(message)
var/rendered = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
for (var/mob/living/S in living_mob_list)
if(S.robot_talk_understand && (S.robot_talk_understand == robot_talk_understand)) // This SHOULD catch everything caught by the one below, but I'm not going to change it.
if(S.binarycheck() || S.stat == DEAD) // This SHOULD catch everything caught by the one below, but I'm not going to change it.
if(istype(S , /mob/living/silicon/ai) && !isMoMMI(src))
var/renderedAI = "<i><span class='game say'>Robotic Talk, <a href='byond://?src=\ref[S];track2=\ref[S];track=\ref[src]'><span class='name'>[name]</span></a> <span class='message'>[message_a]</span></span></i>"
S.show_message(renderedAI, 2)
S << renderedAI
else if(istype(S , /mob/dead/observer) && S.stat == DEAD)
var/rendered2 = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <a href='byond://?src=\ref[S];follow2=\ref[S];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_a]</span></span></i>"
S.show_message(rendered2, 2)
var/rendered_Obs = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <a href='byond://?src=\ref[S];follow2=\ref[S];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_a]</span></span></i>"
S << rendered_Obs
else
S.show_message(rendered, 2)
S << rendered
/mob/living/silicon/binarycheck()
return 1
else if (S.binarycheck())
if(istype(S , /mob/living/silicon/ai))
var/renderedAI = "<i><span class='game say'>Robotic Talk, <a href='byond://?src=\ref[S];track2=\ref[S];track=\ref[src]'><span class='name'>[name]</span></a> <span class='message'>[message_a]</span></span></i>"
S.show_message(renderedAI, 2)
else if(istype(S , /mob/dead/observer) && S.stat == DEAD)
var/rendered2 = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <a href='byond://?src=\ref[S];follow2=\ref[S];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_a]</span></span></i>"
S.show_message(rendered2, 2)
else
S.show_message(rendered, 2)
/mob/living/silicon/lingcheck()
return 0 //Borged or AI'd lings can't speak on the ling channel.
var/list/listening = hearers(1, src)
listening -= src
listening += src
/mob/living/silicon/radio(message, message_mode)
. = ..()
if(. != 0)
return .
if(message_mode == "robot")
if(radio)
radio.talk_into(src, message)
return REDUCE_RANGE
var/list/heard = list()
for (var/mob/M in listening)
if(!istype(M, /mob/living/silicon) && !M.robot_talk_understand)
heard += M
else if(message_mode in radiochannels)
if(radio)
radio.talk_into(src, message, message_mode)
return ITALICS | REDUCE_RANGE
return 0
if (length(heard))
var/message_b
/mob/living/silicon/get_message_mode(message)
. = ..()
if(..() == MODE_HEADSET)
return MODE_ROBOT
else
return .
message_b = "beep beep beep"
message_b = say_quote(message_b)
message_b = "<i>[message_b]</i>"
/mob/living/silicon/handle_inherent_channels(message, message_mode)
. = ..()
if(.)
return .
rendered = "<i><span class='game say'><span class='name'>[voice_name]</span> <span class='message'>[message_b]</span></span></i>"
for (var/mob/M in heard)
M.show_message(rendered, 2)
message = say_quote(message)
rendered = null
for (var/mob/M in dead_mob_list)
if(!istype(M,/mob/new_player) && !istype(M,/mob/living/carbon/brain) && isobserver(M)) //No meta-evesdropping
rendered = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <a href='byond://?src=\ref[M];follow2=\ref[M];follow=\ref[src]'>(Follow)</a> <span class='message'>[message_a]</span></span></i>"
M.show_message(rendered, 2)
if(message_mode == MODE_BINARY)
if(binarycheck())
robot_talk(message)
return 1
return 0

View File

@@ -1,13 +1,16 @@
/mob/living/silicon
gender = NEUTER
robot_talk_understand = 1
voice_name = "synthesized voice"
languages = ROBOT | HUMAN
var/syndicate = 0
var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS
var/list/alarms_to_show = list()
var/list/alarms_to_clear = list()
immune_to_ssd = 1
var/obj/item/device/radio/borg/radio = null //AIs dont use this but this is at the silicon level to advoid copypasta in say()
var/sensor_mode = 0 //Determines the current HUD.
#define SEC_HUD 1 //Security HUD mode
#define MED_HUD 2 //Medical HUD mode

View File

@@ -1,7 +1,6 @@
/mob/living/captive_brain
name = "host brain"
real_name = "host brain"
universal_understand=1
/mob/living/captive_brain/say(var/message)
@@ -88,8 +87,8 @@ var/global/borer_chem_types = typesof(/datum/borer_chem) - /datum/borer_chem
friendly = "prods"
wander = 0
pass_flags = PASSTABLE
languages = ALL
universal_understand=1
var/chemicals = 10 // Chemicals used for reproduction and spitting neurotoxin.
var/mob/living/carbon/human/host // Human host for the brain worm.

View File

@@ -26,7 +26,6 @@
min_oxy = 16 //Require atleast 16kPA oxygen
minbodytemp = 223 //Below -50 Degrees Celcius
maxbodytemp = 323 //Above 50 Degrees Celcius
universal_speak = 0
/mob/living/simple_animal/mouse/Life()
..()

View File

@@ -6,6 +6,7 @@
* AI
* Procs / Verbs (usable by players)
* Sub-types
* Hear & say (the things we do for gimmicks)
*/
/*
@@ -123,6 +124,41 @@
stat("Held Item", held_item)
stat("Mode",a_intent)
/mob/living/simple_animal/parrot/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq)
if(speaker != src && prob(20)) //Don't imitate outselves
if(speech_buffer.len >= 20)
speech_buffer -= pick(speech_buffer)
speech_buffer |= html_decode(raw_message)
..()
/mob/living/simple_animal/parrot/radio(message, message_mode) //literally copied from human/radio(), but there's no other way to do this, at least it's better than it used to be.
. = ..()
if(. != 0)
return .
switch(message_mode)
if(MODE_HEADSET)
if (ears)
ears.talk_into(src, message)
return ITALICS | REDUCE_RANGE
if(MODE_SECURE_HEADSET)
if(ears)
ears.talk_into(src, message, 1)
return ITALICS | REDUCE_RANGE
if(MODE_DEPARTMENT)
if(ears)
ears.talk_into(src, message, message_mode)
return ITALICS | REDUCE_RANGE
if(message_mode in radiochannels)
if(ears)
ears.talk_into(src, message, message_mode)
return ITALICS | REDUCE_RANGE
return 0
/*
* Inventory
*/
@@ -327,7 +363,7 @@
//-----SPEECH
/* Parrot speech mimickry!
Phrases that the parrot hears in mob/living/say() get added to speach_buffer.
Phrases that the parrot Hears() get added to speech_buffer.
Every once in a while, the parrot picks one of the lines from the buffer and replaces an element of the 'speech' list.
Then it clears the buffer to make sure they dont magically remember something from hours ago. */
if(speech_buffer.len && prob(10))
@@ -370,7 +406,7 @@
useradio = 1
if(copytext(possible_phrase,1,3) in department_radio_keys)
possible_phrase = "[useradio?pick(available_channels):""] [copytext(possible_phrase,3,length(possible_phrase)+1)]" //crop out the channel prefix
possible_phrase = "[useradio?pick(available_channels):""] [copytext(possible_phrase,3)]" //crop out the channel prefix
else
possible_phrase = "[useradio?pick(available_channels):""] [possible_phrase]"

View File

@@ -16,7 +16,6 @@
var/turns_per_move = 1
var/turns_since_move = 0
universal_speak = 1
var/meat_amount = 0
var/meat_type
var/stop_automated_movement = 0 //Use this to temporarely stop random movement or to if you write special movement code for animals.

View File

@@ -17,7 +17,7 @@
environment_smash = 2 // WALLS
attack_sound = 'sound/weapons/bladeslice.ogg'
status_flags = 0
universal_speak = 1
languages = HUMAN
var/armour = null
var/amp = null

View File

@@ -25,6 +25,9 @@
store_position()
/mob/proc/is_muzzled()
return 0
/mob/proc/store_position()
origin_x = x
origin_y = y
@@ -1630,4 +1633,4 @@ note dizziness decrements automatically in the mob's Life() proc.
return 0
mob/proc/assess_threat()
return 0
return 0

View File

@@ -6,6 +6,7 @@
w_type = RECYK_BIOLOGICAL
// flags = NOREACT
flags = HEAR
var/datum/mind/mind
var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak
@@ -108,7 +109,6 @@
var/list/callOnFace = list()
var/list/pinned = list() // List of things pinning this creature to walls (see living_defense.dm)
var/list/embedded = list() // Embedded items, since simple mobs don't have organs.
var/list/languages = list() // For speaking/listening.
var/list/abilities = list() // For species-derived or admin-given powers.
var/list/speak_emote = list("says") // Verbs used when speaking. Defaults to 'say' if speak_emote is null.
var/emote_type = 1 // Define emote default type, 1 for seen emotes, 2 for heard emotes
@@ -227,14 +227,17 @@
var/list/radar_blips = list() // list of screen objects, radar blips
var/radar_open = 0 // nonzero is radar is open
var/force_compose = 0 //If this is nonzero, the mob will always compose it's own hear message instead of using the one given in the arguments.
var/obj/control_object //Used by admins to possess objects. All mobs should have this var
//Whether or not mobs can understand other mobtypes. These stay in /mob so that ghosts can hear everything.
var/universal_speak = 0 // Set to 1 to enable the mob to speak to everyone -- TLE
/*var/universal_speak = 0 // Set to 1 to enable the mob to speak to everyone -- TLE
var/universal_understand = 0 // Set to 1 to enable the mob to understand everyone, not necessarily speak
var/robot_talk_understand = 0
var/alien_talk_understand = 0
var/alien_talk_understand = 0*/
var/has_limbs = 1 //Whether this mob have any limbs he can move with
var/can_stand = 1 //Whether this mob have ability to stand

View File

@@ -365,6 +365,23 @@ proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 fo
return returntext
/proc/derpspeech(message, stuttering)
message = replacetext(message, " am ", " ")
message = replacetext(message, " is ", " ")
message = replacetext(message, " are ", " ")
message = replacetext(message, "you", "u")
message = replacetext(message, "help", "halp")
message = replacetext(message, "grief", "grife")
message = replacetext(message, "space", "spess")
message = replacetext(message, "carp", "crap")
message = replacetext(message, "reason", "raisin")
if(prob(50))
message = uppertext(message)
message += "[stutter(pick("!", "!!", "!!!"))]"
if(!stuttering && prob(15))
message = stutter(message)
return message
/proc/ninjaspeak(n)
/*

View File

@@ -5,7 +5,8 @@
var/spawning = 0//Referenced when you want to delete the new_player later on in the code.
var/totalPlayers = 0 //Player counts for the Lobby tab
var/totalPlayersReady = 0
universal_speak = 1
flags = NONE
invisibility = 101
@@ -343,7 +344,7 @@
var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null)// BS12 EDIT Arrivals Announcement Computer, rather than the AI.
if(character.mind.role_alt_title)
rank = character.mind.role_alt_title
a.autosay("[character.real_name],[rank ? " [rank]," : " visitor," ] has arrived on the station.", "Arrivals Announcement Computer")
say("[character.real_name],[rank ? " [rank]," : " visitor," ] has arrived on the station.", "Arrivals Announcement Computer")
del(a)
/mob/new_player/proc/LateChoices()
@@ -392,15 +393,15 @@ Round Duration: [round(hours)]h [round(mins)]m<br>"}
if(chosen_species)
if(is_alien_whitelisted(src, client.prefs.species) || !config.usealienwhitelist || !(chosen_species.flags & WHITELISTED) || (client.holder.rights & R_ADMIN) )// Have to recheck admin due to no usr at roundstart. Latejoins are fine though.
new_character.set_species(client.prefs.species)
if(chosen_species.language)
new_character.add_language(chosen_species.language)
//if(chosen_species.language)
//new_character.add_language(chosen_species.language)
var/datum/language/chosen_language
if(client.prefs.language)
//var/datum/language/chosen_language
/* if(client.prefs.language)
chosen_language = all_languages[client.prefs.language]
if(chosen_language)
if(is_alien_whitelisted(src, client.prefs.language) || !config.usealienwhitelist || !(chosen_language.flags & WHITELISTED))
new_character.add_language(client.prefs.language)
new_character.add_language(client.prefs.language)*/
if(ticker.random_players || appearance_isbanned(src)) //disabling ident bans for now
new_character.gender = pick(MALE, FEMALE)
client.prefs.real_name = random_name(new_character.gender)

View File

@@ -1,35 +1,32 @@
/mob/proc/say()
src << "\red /MOB/SAY NOT OVERRIDDEN WHAT THE FUCK MAN"
return
/mob/verb/whisper_verb(var/message as text)
set name = "Whisper"
set category = "IC"
whisper(message)
/mob/proc/whisper(var/message, var/unheard=" whispers something", var/heard="whispers,", var/apply_filters=1, var/allow_lastwords=1)
return
/mob/verb/say_verb(message as text)
set name = "Say"
set category = "IC"
if(say_disabled) //This is here to try to identify lag problems
usr << "\red Speech is currently admin-disabled."
if(say_disabled)
usr << "<span class='danger'>Speech is currently admin-disabled.</span>"
return
usr.say(message)
/mob/verb/whisper(message as text)
set name = "Whisper"
set category = "IC"
return
/*
/mob/proc/whisper(var/message, var/unheard=" whispers something", var/heard="whispers,", var/apply_filters=1, var/allow_lastwords=1)
return
*/
/mob/verb/me_verb(message as text)
set name = "Me"
set category = "IC"
if(say_disabled) //This is here to try to identify lag problems
usr << "\red Speech is currently admin-disabled."
usr << "<span class='danger'>Speech is currently admin-disabled.</span>"
return
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
if(use_me)
if(ishuman(src) || isrobot(src))
usr.emote("me",usr.emote_type,message)
else
usr.emote(message)
@@ -39,11 +36,11 @@
var/alt_name = ""
if(say_disabled) //This is here to try to identify lag problems
usr << "\red Speech is currently admin-disabled."
usr << "<span class='danger'>Speech is currently admin-disabled.</span>"
return
if(client && !(client.prefs.toggles & CHAT_DEAD))
usr << "\red You have deadchat muted."
usr << "<span class='danger'>You have deadchat muted.</span>"
return
if(mind && mind.name)
@@ -63,70 +60,10 @@
if(M.client && M.client.holder && M.client.holder.rights & R_ADMIN && (M.client.prefs.toggles & CHAT_DEAD)) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above
M << rendered2 //Admins can hear deadchat, if they choose to, no matter if they're blind/deaf or not.
else if(M.stat == DEAD)
M.show_message(rendered2, 2) //Takes into account blindness and such.
//M.show_message(rendered2, 2) //Takes into account blindness and such.
M << rendered2
return
/mob/proc/say_understands(var/mob/other,var/datum/language/speaking = null)
if(!other)
return 1
//Universal speak makes everything understandable, for obvious reasons.
else if(other.universal_speak || src.universal_speak || src.universal_understand)
return 1
else if (src.stat == 2)
return 1
else if (speaking) //Language check.
var/understood
for(var/datum/language/L in src.languages)
if(speaking.name == L.name)
understood = 1
break
if(understood || universal_speak)
return 1
else
return 0
else if(other.universal_speak || src.universal_speak || src.universal_understand)
return 1
else if(isAI(src) && ispAI(other))
return 1
else if (istype(other, src.type) || istype(src, other.type))
return 1
return 0
/mob/proc/say_quote(var/text,var/datum/language/speaking)
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))
var/speech_verb = "says"
var/speech_style = "body"
if (speaking)
speech_verb = speaking.speech_verb
speech_style = speaking.colour
else if(speak_emote && speak_emote.len)
speech_verb = pick(speak_emote)
else if (src.stuttering)
speech_verb = "stammers"
else if (src.slurring)
speech_verb = "slurrs"
else if (ending == "?")
speech_verb = "asks"
else if (ending == "!")
speech_verb = "exclaims"
else if(isliving(src))
var/mob/living/L = src
if (L.getBrainLoss() >= 60)
speech_verb = "gibbers"
return "<span class='say_quote'>[speech_verb],</span> \"<span class='[speech_style]'>[text]</span>\""
/mob/proc/emote(var/act, var/type, var/message, var/auto)
if(act == "me")
return custom_emote(type, message)
@@ -140,10 +77,5 @@
return get_turf(src)
/mob/proc/say_test(var/text)
var/ending = copytext(text, length(text))
if (ending == "?")
return "1"
else if (ending == "!")
return "2"
return "0"
/mob/proc/lingcheck()
return 0

View File

@@ -67,7 +67,6 @@
del(t)
var/mob/living/simple_animal/hostile/retaliate/cluwne/new_mob = new (src.loc)
new_mob.universal_speak = 1
new_mob.gender=src.gender
new_mob.name = pick(clown_names)
new_mob.real_name = new_mob.name