* Disease antagonist * Update mobs.dm * can I go to sleep yet
135 lines
4.1 KiB
Plaintext
135 lines
4.1 KiB
Plaintext
/mob/living/carbon/human/say_mod(input, message_mode)
|
|
verb_say = dna.species.say_mod
|
|
if(slurring)
|
|
return "slurs"
|
|
else
|
|
. = ..()
|
|
|
|
/mob/living/carbon/human/treat_message(message)
|
|
message = dna.species.handle_speech(message,src)
|
|
if(diseases.len)
|
|
for(var/datum/disease/pierrot_throat/D in diseases)
|
|
var/list/temp_message = splittext(message, " ") //List each word in the message
|
|
var/list/pick_list = list()
|
|
for(var/i = 1, i <= temp_message.len, i++) //Create a second list for excluding words down the line
|
|
pick_list += i
|
|
for(var/i=1, ((i <= D.stage) && (i <= temp_message.len)), i++) //Loop for each stage of the disease or until we run out of words
|
|
if(prob(3 * D.stage)) //Stage 1: 3% Stage 2: 6% Stage 3: 9% Stage 4: 12%
|
|
var/H = pick(pick_list)
|
|
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":"))
|
|
continue
|
|
temp_message[H] = "HONK"
|
|
pick_list -= H //Make sure that you dont HONK the same word twice
|
|
message = jointext(temp_message, " ")
|
|
message = ..(message)
|
|
message = dna.mutations_say_mods(message)
|
|
return message
|
|
|
|
/mob/living/carbon/human/get_spans()
|
|
return ..() | dna.mutations_get_spans() | dna.species_get_spans()
|
|
|
|
/mob/living/carbon/human/GetVoice()
|
|
if(istype(wear_mask, /obj/item/clothing/mask/chameleon))
|
|
var/obj/item/clothing/mask/chameleon/V = wear_mask
|
|
if(V.vchange && wear_id)
|
|
var/obj/item/card/id/idcard = wear_id.GetID()
|
|
if(istype(idcard))
|
|
return idcard.registered_name
|
|
else
|
|
return real_name
|
|
else
|
|
return real_name
|
|
if(mind)
|
|
var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling)
|
|
if(changeling && changeling.mimicing )
|
|
return changeling.mimicing
|
|
if(GetSpecialVoice())
|
|
return GetSpecialVoice()
|
|
return real_name
|
|
|
|
/mob/living/carbon/human/IsVocal()
|
|
// how do species that don't breathe talk? magic, that's what.
|
|
if(!has_trait(TRAIT_NOBREATH, SPECIES_TRAIT) && !getorganslot(ORGAN_SLOT_LUNGS))
|
|
return FALSE
|
|
if(mind)
|
|
return !mind.miming
|
|
return TRUE
|
|
|
|
/mob/living/carbon/human/proc/SetSpecialVoice(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, list/spans, language)
|
|
. = ..()
|
|
if(. != 0)
|
|
return .
|
|
|
|
switch(message_mode)
|
|
if(MODE_HEADSET)
|
|
if (ears)
|
|
ears.talk_into(src, message, , spans, language)
|
|
return ITALICS | REDUCE_RANGE
|
|
|
|
if(MODE_DEPARTMENT)
|
|
if (ears)
|
|
ears.talk_into(src, message, message_mode, spans, language)
|
|
return ITALICS | REDUCE_RANGE
|
|
|
|
if(message_mode in GLOB.radiochannels)
|
|
if(ears)
|
|
ears.talk_into(src, message, message_mode, spans, language)
|
|
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) //this proc is at the bottom of the file because quote fuckery makes notepad++ cri
|
|
if(stat == CONSCIOUS)
|
|
if(client)
|
|
var/virgin = 1 //has the text been modified yet?
|
|
var/temp = winget(client, "input", "text")
|
|
if(findtextEx(temp, "Say \"", 1, 7) && length(temp) > 5) //"case sensitive means
|
|
|
|
temp = replacetext(temp, ";", "") //general radio
|
|
|
|
if(findtext(trim_left(temp), ":", 6, 7)) //dept radio
|
|
temp = copytext(trim_left(temp), 8)
|
|
virgin = 0
|
|
|
|
if(virgin)
|
|
temp = copytext(trim_left(temp), 6) //normal speech
|
|
virgin = 0
|
|
|
|
while(findtext(trim_left(temp), ":", 1, 2)) //dept radio again (necessary)
|
|
temp = copytext(trim_left(temp), 3)
|
|
|
|
if(findtext(temp, "*", 1, 2)) //emotes
|
|
return
|
|
|
|
var/trimmed = trim_left(temp)
|
|
if(length(trimmed))
|
|
if(append)
|
|
temp += pick(append)
|
|
|
|
say(temp)
|
|
winset(client, "input", "text=[null]")
|