mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
Ports "Cleans up saycode by removing random hook stubs and using a signal where relevant"
This commit is contained in:
@@ -131,6 +131,16 @@
|
||||
#define COMSIG_MOB_ATTACK_RANGED "mob_attack_ranged" //from base of mob/RangedAttack(): (atom/A, params)
|
||||
#define COMSIG_MOB_THROW "mob_throw" //from base of /mob/throw_item(): (atom/target)
|
||||
#define COMSIG_MOB_UPDATE_SIGHT "mob_update_sight" //from base of /mob/update_sight(): ()
|
||||
#define COMSIG_MOB_SAY "mob_say" // from /mob/living/say(): (proc args list)
|
||||
#define COMPONENT_UPPERCASE_SPEECH 1
|
||||
// used to access COMSIG_MOB_SAY argslist
|
||||
#define SPEECH_MESSAGE 1
|
||||
// #define SPEECH_BUBBLE_TYPE 2
|
||||
#define SPEECH_SPANS 3
|
||||
/* #define SPEECH_SANITIZE 4
|
||||
#define SPEECH_LANGUAGE 5
|
||||
#define SPEECH_IGNORE_SPAM 6
|
||||
#define SPEECH_FORCED 7 */
|
||||
|
||||
// /mob/living signals
|
||||
#define COMSIG_LIVING_RESIST "living_resist" //from base of mob/living/resist() (/mob/living)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#define ENABLE_BITFIELD(variable, flag) (variable |= (flag))
|
||||
#define DISABLE_BITFIELD(variable, flag) (variable &= ~(flag))
|
||||
#define CHECK_BITFIELD(variable, flag) (variable & flag)
|
||||
#define TOGGLE_BITFIELD(variable, flag) (variable ^= (flag))
|
||||
|
||||
GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768))
|
||||
|
||||
|
||||
@@ -35,3 +35,5 @@
|
||||
#define MASKINTERNALS (1<<3) // mask allows internals
|
||||
#define NOSLIP (1<<4) //prevents from slipping on wet floors, in space etc
|
||||
#define THICKMATERIAL (1<<5) //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body.
|
||||
#define VOICEBOX_TOGGLABLE (1<<6) // The voicebox in this clothing can be toggled.
|
||||
#define VOICEBOX_DISABLED (1<<7) // The voicebox is currently turned off.
|
||||
@@ -112,6 +112,7 @@
|
||||
#define TRAIT_PARALYSIS_R_ARM "para-r-arm"
|
||||
#define TRAIT_PARALYSIS_L_LEG "para-l-leg"
|
||||
#define TRAIT_PARALYSIS_R_LEG "para-r-leg"
|
||||
#define TRAIT_UNINTELLIGIBLE_SPEECH "unintelligible-speech"
|
||||
#define TRAIT_LAW_ENFORCEMENT_METABOLISM "law-enforcement-metabolism"
|
||||
#define TRAIT_STRONG_GRABBER "strong_grabber"
|
||||
#define TRAIT_CALCIUM_HEALER "calcium_healer"
|
||||
|
||||
@@ -767,3 +767,27 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
|
||||
return "twelfth"
|
||||
else
|
||||
return "[number]\th"
|
||||
|
||||
/proc/unintelligize(message)
|
||||
var/prefix=copytext(message,1,2)
|
||||
if(prefix == ";")
|
||||
message = copytext(message,2)
|
||||
else if(prefix in list(":","#"))
|
||||
prefix += copytext(message,2,3)
|
||||
message = copytext(message,3)
|
||||
else
|
||||
prefix=""
|
||||
|
||||
var/list/words = splittext(message," ")
|
||||
var/list/rearranged = list()
|
||||
for(var/i=1;i<=words.len;i++)
|
||||
var/cword = pick(words)
|
||||
words.Remove(cword)
|
||||
var/suffix = copytext(cword,length(cword)-1,length(cword))
|
||||
while(length(cword)>0 && suffix in list(".",",",";","!",":","?"))
|
||||
cword = copytext(cword,1 ,length(cword)-1)
|
||||
suffix = copytext(cword,length(cword)-1,length(cword) )
|
||||
if(length(cword))
|
||||
rearranged += cword
|
||||
message = "[prefix][jointext(rearranged," ")]"
|
||||
. = message
|
||||
|
||||
@@ -140,6 +140,8 @@ GLOBAL_LIST_INIT(bitfields, list(
|
||||
"MASKINTERNALS" = MASKINTERNALS,
|
||||
"NOSLIP" = NOSLIP,
|
||||
"THICKMATERIAL" = THICKMATERIAL,
|
||||
"VOICEBOX_TOGGLABLE" = VOICEBOX_TOGGLABLE,
|
||||
"VOICEBOX_DISABLED" = VOICEBOX_DISABLED,
|
||||
),
|
||||
"tesla_flags" = list(
|
||||
"TESLA_MOB_DAMAGE" = TESLA_MOB_DAMAGE,
|
||||
@@ -171,4 +173,9 @@ GLOBAL_LIST_INIT(bitfields, list(
|
||||
"RAD_PROTECT_CONTENTS" = RAD_PROTECT_CONTENTS,
|
||||
"RAD_NO_CONTAMINATE" = RAD_NO_CONTAMINATE,
|
||||
),
|
||||
))
|
||||
"disease_flags" = list(
|
||||
"CURABLE" = CURABLE,
|
||||
"CAN_CARRY" = CAN_CARRY,
|
||||
"CAN_RESIST" = CAN_RESIST
|
||||
),
|
||||
))
|
||||
@@ -32,16 +32,18 @@
|
||||
//Called when given to a mob
|
||||
/datum/brain_trauma/proc/on_gain()
|
||||
to_chat(owner, gain_text)
|
||||
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
//Called when removed from a mob
|
||||
/datum/brain_trauma/proc/on_lose(silent)
|
||||
if(!silent)
|
||||
to_chat(owner, lose_text)
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
//Called when hearing a spoken message
|
||||
/datum/brain_trauma/proc/on_hear(message, speaker, message_language, raw_message, radio_freq)
|
||||
return message
|
||||
|
||||
//Called when speaking
|
||||
/datum/brain_trauma/proc/on_say(message)
|
||||
return message
|
||||
/datum/brain_trauma/proc/handle_speech(datum/source, list/speech_args)
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
@@ -68,18 +68,12 @@
|
||||
lose_text = ""
|
||||
|
||||
/datum/brain_trauma/mild/speech_impediment/on_gain()
|
||||
owner.dna.add_mutation(UNINTELLIGIBLE)
|
||||
..()
|
||||
|
||||
//no fiddling with genetics to get out of this one
|
||||
/datum/brain_trauma/mild/speech_impediment/on_life()
|
||||
if(!(GLOB.mutations_list[UNINTELLIGIBLE] in owner.dna.mutations))
|
||||
on_gain()
|
||||
..()
|
||||
ADD_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, TRAUMA_TRAIT)
|
||||
. = ..()
|
||||
|
||||
/datum/brain_trauma/mild/speech_impediment/on_lose()
|
||||
owner.dna.remove_mutation(UNINTELLIGIBLE)
|
||||
..()
|
||||
REMOVE_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, TRAUMA_TRAIT)
|
||||
. = ..()
|
||||
|
||||
/datum/brain_trauma/mild/concussion
|
||||
name = "Concussion"
|
||||
|
||||
@@ -78,14 +78,13 @@
|
||||
break
|
||||
return message
|
||||
|
||||
/datum/brain_trauma/mild/phobia/on_say(message)
|
||||
/datum/brain_trauma/mild/phobia/handle_speech(datum/source, list/speech_args)
|
||||
for(var/word in trigger_words)
|
||||
var/reg = regex("(\\b|\\A)[REGEX_QUOTE(word)]'?s*(\\b|\\Z)", "i")
|
||||
|
||||
if(findtext(message, reg))
|
||||
if(findtext(speech_args[SPEECH_MESSAGE], reg))
|
||||
to_chat(owner, "<span class='warning'>You can't bring yourself to say the word \"[word]\"!</span>")
|
||||
return ""
|
||||
return message
|
||||
speech_args[SPEECH_MESSAGE] = ""
|
||||
|
||||
/datum/brain_trauma/mild/phobia/proc/freak_out(atom/reason, trigger_word)
|
||||
next_scare = world.time + 120
|
||||
|
||||
@@ -199,10 +199,9 @@
|
||||
addtimer(CALLBACK(src, /datum/brain_trauma/severe/split_personality.proc/switch_personalities), 10)
|
||||
return message
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/brainwashing/on_say(message)
|
||||
if(findtext(message, codeword))
|
||||
return "" //oh hey did you want to tell people about the secret word to bring you back?
|
||||
return message
|
||||
/datum/brain_trauma/severe/split_personality/brainwashing/handle_speech(datum/source, list/speech_args)
|
||||
if(findtext(speech_args[SPEECH_MESSAGE], codeword))
|
||||
speech_args[SPEECH_MESSAGE] = "" //oh hey did you want to tell people about the secret word to bring you back?
|
||||
|
||||
/mob/living/split_personality/traitor
|
||||
name = "split personality"
|
||||
|
||||
@@ -26,3 +26,30 @@
|
||||
if(4)
|
||||
if(prob(5))
|
||||
affected_mob.say( pick( list("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk...") ) , forced = "pierrot's throat")
|
||||
|
||||
/datum/disease/pierrot_throat/after_add()
|
||||
RegisterSignal(affected_mob, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/disease/pierrot_throat/proc/handle_speech(datum/source, list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
var/list/split_message = splittext(message, " ") //List each word in the message
|
||||
var/applied = 0
|
||||
for (var/i in 1 to length(split_message))
|
||||
if(prob(3 * stage)) //Stage 1: 3% Stage 2: 6% Stage 3: 9% Stage 4: 12%
|
||||
if(findtext(split_message[i], "*") || findtext(split_message[i], ";") || findtext(split_message[i], ":"))
|
||||
continue
|
||||
split_message[i] = "HONK"
|
||||
if (applied++ > stage)
|
||||
break
|
||||
if (applied)
|
||||
speech_args[SPEECH_SPANS] |= SPAN_CLOWN // a little bonus
|
||||
message = jointext(split_message, " ")
|
||||
speech_args[SPEECH_MESSAGE] = message
|
||||
|
||||
/datum/disease/pierrot_throat/Destroy()
|
||||
UnregisterSignal(affected_mob, COMSIG_MOB_SAY)
|
||||
return ..()
|
||||
|
||||
/datum/disease/pierrot_throat/remove_disease()
|
||||
UnregisterSignal(affected_mob, COMSIG_MOB_SAY)
|
||||
return ..()
|
||||
@@ -185,25 +185,6 @@
|
||||
if(DNA_TAUR_BLOCK)
|
||||
construct_block(GLOB.taur_list.Find(features["taur"]), GLOB.taur_list.len)
|
||||
|
||||
/datum/dna/proc/mutations_say_mods(message)
|
||||
if(message)
|
||||
for(var/datum/mutation/human/M in mutations)
|
||||
message = M.say_mod(message)
|
||||
return message
|
||||
|
||||
/datum/dna/proc/mutations_get_spans()
|
||||
var/list/spans = list()
|
||||
for(var/datum/mutation/human/M in mutations)
|
||||
spans |= M.get_spans()
|
||||
return spans
|
||||
|
||||
/datum/dna/proc/species_get_spans()
|
||||
var/list/spans = list()
|
||||
if(species)
|
||||
spans |= species.get_spans()
|
||||
return spans
|
||||
|
||||
|
||||
/datum/dna/proc/is_same_as(datum/dna/D)
|
||||
if(uni_identity == D.uni_identity && struc_enzymes == D.struc_enzymes && real_name == D.real_name && nameless == D.nameless && custom_species == D.custom_species)
|
||||
if(species.type == D.species.type && features == D.features && blood_type == D.blood_type)
|
||||
|
||||
@@ -105,13 +105,6 @@ GLOBAL_LIST_EMPTY(mutations_list)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/mutation/human/proc/say_mod(message)
|
||||
if(message)
|
||||
return message
|
||||
|
||||
/datum/mutation/human/proc/get_spans()
|
||||
return list()
|
||||
|
||||
/mob/living/carbon/proc/update_mutations_overlay()
|
||||
return
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
ADD_TRAIT(owner, TRAIT_PUSHIMMUNE, TRAIT_HULK)
|
||||
owner.update_body_parts()
|
||||
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "hulk", /datum/mood_event/hulk)
|
||||
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/mutation/human/hulk/on_attack_hand(mob/living/carbon/human/owner, atom/target, proximity)
|
||||
if(proximity) //no telekinetic hulk attack
|
||||
@@ -32,8 +33,11 @@
|
||||
REMOVE_TRAIT(owner, TRAIT_PUSHIMMUNE, TRAIT_HULK)
|
||||
owner.update_body_parts()
|
||||
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "hulk")
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
/datum/mutation/human/hulk/say_mod(message)
|
||||
/datum/mutation/human/hulk/proc/handle_speech(original_message, wrapped_message)
|
||||
var/message = wrapped_message[1]
|
||||
if(message)
|
||||
message = "[uppertext(replacetext(message, ".", "!"))]!!"
|
||||
return message
|
||||
message = "[replacetext(message, ".", "!")]!!"
|
||||
wrapped_message[1] = message
|
||||
return COMPONENT_UPPERCASE_SPEECH
|
||||
|
||||
@@ -17,9 +17,20 @@
|
||||
text_gain_indication = "<span class='sans'>You feel an off sensation in your voicebox.</span>"
|
||||
text_lose_indication = "<span class='notice'>The off sensation passes.</span>"
|
||||
|
||||
/datum/mutation/human/wacky/get_spans()
|
||||
return list(SPAN_SANS)
|
||||
/datum/mutation/human/wacky/on_acquiring(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/mutation/human/wacky/on_losing(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
/datum/mutation/human/wacky/proc/handle_speech(datum/source, list/speech_args)
|
||||
speech_args[SPEECH_SPANS] |= SPAN_SANS
|
||||
|
||||
/datum/mutation/human/mute
|
||||
name = "Mute"
|
||||
@@ -28,12 +39,14 @@
|
||||
text_lose_indication = "<span class='danger'>You feel able to speak freely again.</span>"
|
||||
|
||||
/datum/mutation/human/mute/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
ADD_TRAIT(owner, TRAIT_MUTE, GENETIC_MUTATION)
|
||||
|
||||
/datum/mutation/human/mute/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
REMOVE_TRAIT(owner, TRAIT_MUTE, GENETIC_MUTATION)
|
||||
|
||||
@@ -45,7 +58,20 @@
|
||||
text_gain_indication = "<span class='notice'>You feel so happy. Nothing can be wrong with anything. :)</span>"
|
||||
text_lose_indication = "<span class='notice'>Everything is terrible again. :(</span>"
|
||||
|
||||
/datum/mutation/human/smile/say_mod(message)
|
||||
/datum/mutation/human/smile/on_acquiring(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/mutation/human/smile/on_losing(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
/datum/mutation/human/smile/proc/handle_speech(datum/source, list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message)
|
||||
message = " [message] "
|
||||
//Time for a friendly game of SS13
|
||||
@@ -92,7 +118,7 @@
|
||||
message = replacetext(message," cunt "," privates ")
|
||||
message = replacetext(message," dick "," jerk ")
|
||||
message = replacetext(message," vagina "," privates ")
|
||||
return trim(message)
|
||||
speech_args[SPEECH_MESSAGE] = trim(message)
|
||||
|
||||
|
||||
/datum/mutation/human/unintelligible
|
||||
@@ -102,30 +128,17 @@
|
||||
text_gain_indication = "<span class='danger'>You can't seem to form any coherent thoughts!</span>"
|
||||
text_lose_indication = "<span class='danger'>Your mind feels more clear.</span>"
|
||||
|
||||
/datum/mutation/human/unintelligible/say_mod(message)
|
||||
if(message)
|
||||
var/prefix=copytext(message,1,2)
|
||||
if(prefix == ";")
|
||||
message = copytext(message,2)
|
||||
else if(prefix in list(":","#"))
|
||||
prefix += copytext(message,2,3)
|
||||
message = copytext(message,3)
|
||||
else
|
||||
prefix=""
|
||||
/datum/mutation/human/unintelligible/on_acquiring(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
ADD_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, GENETIC_MUTATION)
|
||||
|
||||
var/list/words = splittext(message," ")
|
||||
var/list/rearranged = list()
|
||||
for(var/i=1;i<=words.len;i++)
|
||||
var/cword = pick(words)
|
||||
words.Remove(cword)
|
||||
var/suffix = copytext(cword,length(cword)-1,length(cword))
|
||||
while(length(cword)>0 && suffix in list(".",",",";","!",":","?"))
|
||||
cword = copytext(cword,1 ,length(cword)-1)
|
||||
suffix = copytext(cword,length(cword)-1,length(cword) )
|
||||
if(length(cword))
|
||||
rearranged += cword
|
||||
message ="[prefix][jointext(rearranged," ")]"
|
||||
return message
|
||||
/datum/mutation/human/unintelligible/on_losing(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
REMOVE_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, GENETIC_MUTATION)
|
||||
|
||||
|
||||
/datum/mutation/human/swedish
|
||||
@@ -135,7 +148,20 @@
|
||||
text_gain_indication = "<span class='notice'>You feel Swedish, however that works.</span>"
|
||||
text_lose_indication = "<span class='notice'>The feeling of Swedishness passes.</span>"
|
||||
|
||||
/datum/mutation/human/swedish/say_mod(message)
|
||||
/datum/mutation/human/swedish/on_acquiring(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/mutation/human/swedish/on_losing(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
/datum/mutation/human/swedish/proc/handle_speech(datum/source, list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message)
|
||||
message = replacetext(message,"w","v")
|
||||
message = replacetext(message,"j","y")
|
||||
@@ -144,7 +170,7 @@
|
||||
message = replacetext(message,"o",pick("<22>","<22>","o"))
|
||||
if(prob(30))
|
||||
message += " Bork[pick("",", bork",", bork, bork")]!"
|
||||
return message
|
||||
speech_args[SPEECH_MESSAGE] = trim(message)
|
||||
|
||||
|
||||
/datum/mutation/human/chav
|
||||
@@ -154,7 +180,20 @@
|
||||
text_gain_indication = "<span class='notice'>Ye feel like a reet prat like, innit?</span>"
|
||||
text_lose_indication = "<span class='notice'>You no longer feel like being rude and sassy.</span>"
|
||||
|
||||
/datum/mutation/human/chav/say_mod(message)
|
||||
/datum/mutation/human/chav/on_acquiring(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/mutation/human/chav/on_losing(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
/datum/mutation/human/chav/proc/handle_speech(datum/source, list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message)
|
||||
message = " [message] "
|
||||
message = replacetext(message," looking at "," gawpin' at ")
|
||||
@@ -178,7 +217,7 @@
|
||||
message = replacetext(message," break "," do ")
|
||||
message = replacetext(message," your "," yer ")
|
||||
message = replacetext(message," security "," coppers ")
|
||||
return trim(message)
|
||||
speech_args[SPEECH_MESSAGE] = trim(message)
|
||||
|
||||
|
||||
/datum/mutation/human/elvis
|
||||
@@ -199,7 +238,20 @@
|
||||
if(prob(15))
|
||||
owner.visible_message("<b>[owner]</b> [pick("jiggles their hips", "rotates their hips", "gyrates their hips", "taps their foot", "dances to an imaginary song", "jiggles their legs", "snaps their fingers")]!")
|
||||
|
||||
/datum/mutation/human/elvis/say_mod(message)
|
||||
/datum/mutation/human/elvis/on_acquiring(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/mutation/human/elvis/on_losing(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
/datum/mutation/human/elvis/proc/handle_speech(datum/source, list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message)
|
||||
message = " [message] "
|
||||
message = replacetext(message," i'm not "," I aint ")
|
||||
@@ -211,7 +263,7 @@
|
||||
message = replacetext(message," yes ",pick(" sure", "yea "))
|
||||
message = replacetext(message," faggot "," square ")
|
||||
message = replacetext(message," muh valids "," getting my kicks ")
|
||||
return trim(message)
|
||||
speech_args[SPEECH_MESSAGE] = trim(message)
|
||||
|
||||
|
||||
/datum/mutation/human/stoner
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
var/verb_exclaim = "exclaims"
|
||||
var/verb_whisper = "whispers"
|
||||
var/verb_yell = "yells"
|
||||
var/speech_span
|
||||
var/inertia_dir = 0
|
||||
var/atom/inertia_last_loc
|
||||
var/inertia_moving = 0
|
||||
|
||||
@@ -96,10 +96,10 @@ GLOBAL_LIST_EMPTY(announcement_systems)
|
||||
message = "The arrivals shuttle has been damaged. Docking for repairs..."
|
||||
|
||||
if(channels.len == 0)
|
||||
radio.talk_into(src, message, null, list(SPAN_ROBOT), get_default_language())
|
||||
radio.talk_into(src, message, null)
|
||||
else
|
||||
for(var/channel in channels)
|
||||
radio.talk_into(src, message, channel, list(SPAN_ROBOT), get_default_language())
|
||||
radio.talk_into(src, message, channel)
|
||||
|
||||
//config stuff
|
||||
|
||||
|
||||
@@ -49,12 +49,9 @@
|
||||
if(next_warning < world.time && prob(15))
|
||||
var/area/A = get_area(loc)
|
||||
var/message = "Unauthorized credit withdrawal underway in [A.map_name]!!"
|
||||
radio.talk_into(src, message, radio_channel, get_spans())
|
||||
radio.talk_into(src, message, radio_channel)
|
||||
next_warning = world.time + minimum_time_between_warnings
|
||||
|
||||
/obj/machinery/computer/bank_machine/get_spans()
|
||||
. = ..() | SPAN_ROBOT
|
||||
|
||||
/obj/machinery/computer/bank_machine/ui_interact(mob/user)
|
||||
. = ..()
|
||||
var/dat = "[station_name()] secure vault. Authorized personnel only.<br>"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#define CLONE_INITIAL_DAMAGE 150 //Clones in clonepods start with 150 cloneloss damage and 150 brainloss damage, thats just logical
|
||||
#define MINIMUM_HEAL_LEVEL 40
|
||||
|
||||
#define SPEAK(message) radio.talk_into(src, message, radio_channel, get_spans(), get_default_language())
|
||||
#define SPEAK(message) radio.talk_into(src, message, radio_channel)
|
||||
|
||||
/obj/machinery/clonepod
|
||||
name = "cloning pod"
|
||||
|
||||
@@ -323,7 +323,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
emergency = "Medical"
|
||||
if(radio_freq)
|
||||
Radio.set_frequency(radio_freq)
|
||||
Radio.talk_into(src,"[emergency] emergency in [department]!!",radio_freq,get_spans(),get_default_language())
|
||||
Radio.talk_into(src,"[emergency] emergency in [department]!!",radio_freq)
|
||||
update_icon()
|
||||
addtimer(CALLBACK(src, .proc/clear_emergency), 3000)
|
||||
|
||||
@@ -382,7 +382,7 @@ GLOBAL_LIST_EMPTY(allConsoles)
|
||||
screen = 6
|
||||
|
||||
if(radio_freq)
|
||||
Radio.talk_into(src,"[alert]: <i>[message]</i>",radio_freq,get_spans(),get_default_language())
|
||||
Radio.talk_into(src, "[alert]: <i>[message]</i>", radio_freq)
|
||||
|
||||
switch(priority)
|
||||
if(2)
|
||||
|
||||
@@ -230,9 +230,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
research_msg += "."
|
||||
to_chat(user, research_msg.Join())
|
||||
|
||||
/obj/item/proc/speechModification(message) //for message modding by mask slot.
|
||||
return message
|
||||
|
||||
/obj/item/interact(mob/user)
|
||||
add_fingerprint(user)
|
||||
ui_interact(user)
|
||||
@@ -647,11 +644,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
else
|
||||
. = ""
|
||||
|
||||
|
||||
//when an item modify our speech spans when in our active hand. Override this to modify speech spans.
|
||||
/obj/item/proc/get_held_item_speechspans(mob/living/carbon/user)
|
||||
return
|
||||
|
||||
/obj/item/hitby(atom/movable/AM)
|
||||
return
|
||||
|
||||
|
||||
@@ -234,11 +234,18 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
actions_types = list(/datum/action/item_action/instrument)
|
||||
|
||||
/obj/item/instrument/harmonica/speechModification(message)
|
||||
/obj/item/instrument/harmonica/proc/handle_speech(datum/source, list/speech_args)
|
||||
if(song.playing && ismob(loc))
|
||||
to_chat(loc, "<span class='warning'>You stop playing the harmonica to talk...</span>")
|
||||
song.playing = FALSE
|
||||
return message
|
||||
|
||||
/obj/item/instrument/harmonica/equipped(mob/M, slot)
|
||||
. = ..()
|
||||
RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/obj/item/instrument/harmonica/dropped(mob/M)
|
||||
. = ..()
|
||||
UnregisterSignal(M, COMSIG_MOB_SAY)
|
||||
|
||||
/obj/item/instrument/bikehorn
|
||||
name = "gilded bike horn"
|
||||
|
||||
@@ -17,13 +17,25 @@
|
||||
user.say("AAAAAAAAAAAARGHHHHH", forced="megaphone suicide")//he must have died while coding this
|
||||
return OXYLOSS
|
||||
|
||||
/obj/item/megaphone/get_held_item_speechspans(mob/living/carbon/user)
|
||||
if(spamcheck > world.time)
|
||||
to_chat(user, "<span class='warning'>\The [src] needs to recharge!</span>")
|
||||
/obj/item/megaphone/equipped(mob/M, slot)
|
||||
. = ..()
|
||||
if (slot == SLOT_HANDS)
|
||||
RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
else
|
||||
playsound(loc, 'sound/items/megaphone.ogg', 100, 0, 1)
|
||||
spamcheck = world.time + 50
|
||||
return voicespan
|
||||
UnregisterSignal(M, COMSIG_MOB_SAY)
|
||||
|
||||
/obj/item/megaphone/dropped(mob/M)
|
||||
. = ..()
|
||||
UnregisterSignal(M, COMSIG_MOB_SAY)
|
||||
|
||||
/obj/item/megaphone/proc/handle_speech(mob/living/carbon/user, list/speech_args)
|
||||
if (user.get_active_held_item() == src)
|
||||
if(spamcheck > world.time)
|
||||
to_chat(user, "<span class='warning'>\The [src] needs to recharge!</span>")
|
||||
else
|
||||
playsound(loc, 'sound/items/megaphone.ogg', 100, 0, 1)
|
||||
spamcheck = world.time + 50
|
||||
speech_args[SPEECH_SPANS] |= voicespan
|
||||
|
||||
/obj/item/megaphone/emag_act(mob/user)
|
||||
if(obj_flags & EMAGGED)
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
|
||||
/obj/item/radio/talk_into(atom/movable/M, message, channel, list/spans, datum/language/language)
|
||||
if(!spans)
|
||||
spans = M.get_spans()
|
||||
spans = list(M.speech_span)
|
||||
if(!language)
|
||||
language = M.get_default_language()
|
||||
INVOKE_ASYNC(src, .proc/talk_into_impl, M, message, channel, spans.Copy(), language)
|
||||
|
||||
@@ -282,9 +282,7 @@
|
||||
var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead
|
||||
magichead.item_flags |= NODROP //curses!
|
||||
magichead.flags_inv &= ~HIDEFACE //so you can still see their face
|
||||
magichead.voicechange = TRUE //NEEEEIIGHH
|
||||
if(!user.dropItemToGround(user.wear_mask))
|
||||
qdel(user.wear_mask)
|
||||
user.dropItemToGround(user.wear_mask, TRUE)
|
||||
user.equip_to_slot_if_possible(magichead, SLOT_WEAR_MASK, TRUE, TRUE)
|
||||
qdel(src)
|
||||
else
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
var/taste_sensitivity = 15
|
||||
speech_span = null
|
||||
|
||||
/obj/item/taster/get_spans()
|
||||
return list()
|
||||
var/taste_sensitivity = 15
|
||||
|
||||
/obj/item/taster/afterattack(atom/O, mob/user, proximity)
|
||||
. = ..()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/obj
|
||||
var/crit_fail = FALSE
|
||||
animate_movement = 2
|
||||
speech_span = SPAN_ROBOT
|
||||
var/obj_flags = CAN_BE_HIT
|
||||
var/set_obj_flags // ONLY FOR MAPPING: Sets flags from a string list, handled in Initialize. Usage: set_obj_flags = "EMAGGED;!CAN_BE_HIT" to set EMAGGED and clear CAN_BE_HIT.
|
||||
|
||||
@@ -204,9 +205,6 @@
|
||||
if(!anchored || current_size >= STAGE_FIVE)
|
||||
step_towards(src,S)
|
||||
|
||||
/obj/get_spans()
|
||||
return ..() | SPAN_ROBOT
|
||||
|
||||
/obj/get_dumping_location(datum/component/storage/source,mob/user)
|
||||
return get_turf(src)
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ GLOBAL_LIST_INIT(freqtospan, list(
|
||||
return
|
||||
if(message == "" || !message)
|
||||
return
|
||||
spans |= get_spans()
|
||||
spans |= speech_span
|
||||
if(!language)
|
||||
language = get_default_language()
|
||||
send_speech(message, 7, src, , spans, message_language=language)
|
||||
@@ -40,10 +40,6 @@ GLOBAL_LIST_INIT(freqtospan, list(
|
||||
var/atom/movable/AM = _AM
|
||||
AM.Hear(rendered, src, message_language, message, , spans, message_mode)
|
||||
|
||||
//To get robot span classes, stuff like that.
|
||||
/atom/movable/proc/get_spans()
|
||||
return list()
|
||||
|
||||
/atom/movable/proc/compose_message(atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode, face_name = FALSE)
|
||||
//This proc uses text() because it is faster than appending strings. Thanks BYOND.
|
||||
//Basic span
|
||||
@@ -87,7 +83,7 @@ GLOBAL_LIST_INIT(freqtospan, list(
|
||||
else
|
||||
return verb_say
|
||||
|
||||
/atom/movable/proc/say_quote(input, list/spans=list(), message_mode)
|
||||
/atom/movable/proc/say_quote(input, list/spans=list(speech_span), message_mode)
|
||||
if(!input)
|
||||
input = "..."
|
||||
|
||||
@@ -97,7 +93,7 @@ GLOBAL_LIST_INIT(freqtospan, list(
|
||||
var/spanned = attach_spans(input, spans)
|
||||
return "[say_mod(input, message_mode)][spanned ? ", \"[spanned]\"" : ""]"
|
||||
// Citadel edit [spanned ? ", \"[spanned]\"" : ""]"
|
||||
|
||||
|
||||
/atom/movable/proc/lang_treat(atom/movable/speaker, datum/language/language, raw_message, list/spans, message_mode)
|
||||
if(has_language(language))
|
||||
var/atom/movable/AM = speaker.GetSource()
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/proc/blob_chat(msg)
|
||||
var/spanned_message = say_quote(msg, get_spans())
|
||||
var/spanned_message = say_quote(msg)
|
||||
var/rendered = "<font color=\"#EE4000\"><b>\[Blob Telepathy\] [real_name]</b> [spanned_message]</font>"
|
||||
for(var/M in GLOB.mob_list)
|
||||
if(isovermind(M) || istype(M, /mob/living/simple_animal/hostile/blob))
|
||||
|
||||
@@ -210,7 +210,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
|
||||
src.log_talk(message, LOG_SAY)
|
||||
|
||||
var/message_a = say_quote(message, get_spans())
|
||||
var/message_a = say_quote(message)
|
||||
var/rendered = "<span class='big'><font color=\"#EE4000\"><b>\[Blob Telepathy\] [name](<font color=\"[blob_reagent_datum.color]\">[blob_reagent_datum.name]</font>)</b> [message_a]</font></span>"
|
||||
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
bubble_icon = "clock"
|
||||
light_color = "#E42742"
|
||||
death_sound = 'sound/magic/clockwork/anima_fragment_death.ogg'
|
||||
speech_span = SPAN_ROBOT
|
||||
var/playstyle_string = "<span class='heavy_brass'>You are a bug, yell at whoever spawned you!</span>"
|
||||
var/empower_string = "<span class='heavy_brass'>You have nothing to empower, yell at the coders!</span>" //Shown to the mob when the herald beacon activates
|
||||
|
||||
@@ -26,9 +27,6 @@
|
||||
. = ..()
|
||||
update_values()
|
||||
|
||||
/mob/living/simple_animal/hostile/clockwork/get_spans()
|
||||
return ..() | SPAN_ROBOT
|
||||
|
||||
/mob/living/simple_animal/hostile/clockwork/Login()
|
||||
..()
|
||||
add_servant_of_ratvar(src, TRUE)
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
deathmessage = "explodes with a sharp pop!"
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
hud_type = /datum/hud/swarmer
|
||||
speech_span = SPAN_ROBOT
|
||||
var/resources = 0 //Resource points, generated by consuming metal/glass
|
||||
var/max_resources = 100
|
||||
|
||||
@@ -126,9 +127,6 @@
|
||||
if(statpanel("Status"))
|
||||
stat("Resources:",resources)
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/get_spans()
|
||||
return ..() | SPAN_ROBOT
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/emp_act()
|
||||
. = ..()
|
||||
if(. & EMP_PROTECT_SELF)
|
||||
@@ -666,7 +664,7 @@
|
||||
set_light(0)
|
||||
|
||||
/mob/living/simple_animal/hostile/swarmer/proc/swarmer_chat(msg)
|
||||
var/rendered = "<B>Swarm communication - [src]</b> [say_quote(msg, get_spans())]"
|
||||
var/rendered = "<B>Swarm communication - [src]</b> [say_quote(msg)]"
|
||||
for(var/i in GLOB.mob_list)
|
||||
var/mob/M = i
|
||||
if(isswarmer(M))
|
||||
|
||||
@@ -167,10 +167,11 @@
|
||||
on = FALSE
|
||||
update_icon()
|
||||
playsound(src, 'sound/machines/cryo_warning.ogg', volume) // Bug the doctors.
|
||||
radio.talk_into(src, "Patient fully restored", radio_channel, get_spans(), get_default_language())
|
||||
var/msg = "Patient fully restored."
|
||||
if(autoeject) // Eject if configured.
|
||||
radio.talk_into(src, "Auto ejecting patient now", radio_channel, get_spans(), get_default_language())
|
||||
msg += " Auto ejecting patient now."
|
||||
open_machine()
|
||||
radio.talk_into(src, msg, radio_channel)
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/air1 = airs[1]
|
||||
|
||||
@@ -184,33 +184,41 @@
|
||||
mode = DRILL_CANADIAN
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/head/warden/drill/speechModification(M)
|
||||
if(copytext(M, 1, 2) != "*")
|
||||
if(mode == DRILL_DEFAULT)
|
||||
M = " [M]"
|
||||
return trim(M)
|
||||
if(mode == DRILL_SHOUTING)
|
||||
M = " [M]!"
|
||||
return trim(M)
|
||||
if(mode == DRILL_YELLING)
|
||||
M = " [M]!!"
|
||||
return trim(M)
|
||||
if(mode == DRILL_CANADIAN)
|
||||
M = " [M]"
|
||||
var/list/canadian_words = strings("canadian_replacement.json", "canadian")
|
||||
/obj/item/clothing/head/warden/drill/equipped(mob/M, slot)
|
||||
. = ..()
|
||||
if (slot == SLOT_HEAD)
|
||||
RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
else
|
||||
UnregisterSignal(M, COMSIG_MOB_SAY)
|
||||
|
||||
for(var/key in canadian_words)
|
||||
var/value = canadian_words[key]
|
||||
if(islist(value))
|
||||
value = pick(value)
|
||||
/obj/item/clothing/head/warden/drill/dropped(mob/M)
|
||||
. = ..()
|
||||
UnregisterSignal(M, COMSIG_MOB_SAY)
|
||||
|
||||
M = replacetextEx(M, " [uppertext(key)]", " [uppertext(value)]")
|
||||
M = replacetextEx(M, " [capitalize(key)]", " [capitalize(value)]")
|
||||
M = replacetextEx(M, " [key]", " [value]")
|
||||
/obj/item/clothing/head/warden/drill/proc/handle_speech(datum/source, mob/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message[1] != "*")
|
||||
switch (mode)
|
||||
if(DRILL_SHOUTING)
|
||||
message += "!"
|
||||
if(DRILL_YELLING)
|
||||
message += "!!"
|
||||
if(DRILL_CANADIAN)
|
||||
message = " [message]"
|
||||
var/list/canadian_words = strings("canadian_replacement.json", "canadian")
|
||||
|
||||
if(prob(30))
|
||||
M += pick(", eh?", ", EH?")
|
||||
return trim(M)
|
||||
for(var/key in canadian_words)
|
||||
var/value = canadian_words[key]
|
||||
if(islist(value))
|
||||
value = pick(value)
|
||||
|
||||
message = replacetextEx(message, " [uppertext(key)]", " [uppertext(value)]")
|
||||
message = replacetextEx(message, " [capitalize(key)]", " [capitalize(value)]")
|
||||
message = replacetextEx(message, " [key]", " [value]")
|
||||
|
||||
if(prob(30))
|
||||
message += pick(", eh?", ", EH?")
|
||||
speech_args[SPEECH_MESSAGE] = message
|
||||
|
||||
/obj/item/clothing/head/beret/sec
|
||||
name = "security beret"
|
||||
|
||||
@@ -330,9 +330,21 @@
|
||||
icon_state = "beretblack"
|
||||
dynamic_hair_suffix = ""
|
||||
|
||||
/obj/item/clothing/head/frenchberet/speechModification(M)
|
||||
if(copytext(M, 1, 2) != "*")
|
||||
M = " [M]"
|
||||
/obj/item/clothing/head/frenchberet/equipped(mob/M, slot)
|
||||
. = ..()
|
||||
if (slot == SLOT_HEAD)
|
||||
RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
else
|
||||
UnregisterSignal(M, COMSIG_MOB_SAY)
|
||||
|
||||
/obj/item/clothing/head/frenchberet/dropped(mob/M)
|
||||
. = ..()
|
||||
UnregisterSignal(M, COMSIG_MOB_SAY)
|
||||
|
||||
/obj/item/clothing/head/frenchberet/proc/handle_speech(datum/source, mob/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message[1] != "*")
|
||||
message = " [message]"
|
||||
var/list/french_words = strings("french_replacement.json", "french")
|
||||
|
||||
for(var/key in french_words)
|
||||
@@ -340,10 +352,10 @@
|
||||
if(islist(value))
|
||||
value = pick(value)
|
||||
|
||||
M = replacetextEx(M, " [uppertext(key)]", " [uppertext(value)]")
|
||||
M = replacetextEx(M, " [capitalize(key)]", " [capitalize(value)]")
|
||||
M = replacetextEx(M, " [key]", " [value]")
|
||||
message = replacetextEx(message, " [uppertext(key)]", " [uppertext(value)]")
|
||||
message = replacetextEx(message, " [capitalize(key)]", " [capitalize(value)]")
|
||||
message = replacetextEx(message, " [key]", " [value]")
|
||||
|
||||
if(prob(3))
|
||||
M += pick(" Honh honh honh!"," Honh!"," Zut Alors!")
|
||||
return trim(M)
|
||||
message += pick(" Honh honh honh!"," Honh!"," Zut Alors!")
|
||||
speech_args[SPEECH_MESSAGE] = trim(message)
|
||||
|
||||
@@ -5,12 +5,54 @@
|
||||
slot_flags = ITEM_SLOT_MASK
|
||||
strip_delay = 40
|
||||
equip_delay_other = 40
|
||||
var/modifies_speech = FALSE
|
||||
var/mask_adjusted = 0
|
||||
var/adjusted_flags = null
|
||||
var/muzzle_var = NORMAL_STYLE
|
||||
mutantrace_variation = NO_MUTANTRACE_VARIATION //most masks have overrides, but not all probably.
|
||||
|
||||
|
||||
/obj/item/clothing/mask/attack_self(mob/user)
|
||||
if(CHECK_BITFIELD(clothing_flags, VOICEBOX_TOGGLABLE))
|
||||
TOGGLE_BITFIELD(clothing_flags, VOICEBOX_DISABLED)
|
||||
var/status = !CHECK_BITFIELD(clothing_flags, VOICEBOX_DISABLED)
|
||||
to_chat(user, "<span class='notice'>You turn the voice box in [src] [status ? "on" : "off"].</span>")
|
||||
|
||||
/obj/item/clothing/mask/equipped(mob/M, slot)
|
||||
. = ..()
|
||||
if (slot == SLOT_WEAR_MASK && modifies_speech)
|
||||
RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
else
|
||||
UnregisterSignal(M, COMSIG_MOB_SAY)
|
||||
if(!ishuman(M))
|
||||
return
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/species/pref_species = H.dna.species
|
||||
|
||||
if(mutantrace_variation)
|
||||
if("mam_snouts" in pref_species.default_features)
|
||||
if(H.dna.features["mam_snouts"] != "None")
|
||||
muzzle_var = ALT_STYLE
|
||||
else
|
||||
muzzle_var = NORMAL_STYLE
|
||||
|
||||
else if("snout" in pref_species.default_features)
|
||||
if(H.dna.features["snout"] != "None")
|
||||
muzzle_var = ALT_STYLE
|
||||
else
|
||||
muzzle_var = NORMAL_STYLE
|
||||
|
||||
else
|
||||
muzzle_var = NORMAL_STYLE
|
||||
|
||||
H.update_inv_wear_mask()
|
||||
|
||||
/obj/item/clothing/mask/dropped(mob/M)
|
||||
. = ..()
|
||||
UnregisterSignal(M, COMSIG_MOB_SAY)
|
||||
|
||||
/obj/item/clothing/mask/proc/handle_speech()
|
||||
|
||||
/obj/item/clothing/mask/worn_overlays(isinhands = FALSE)
|
||||
. = list()
|
||||
if(!isinhands)
|
||||
@@ -20,31 +62,6 @@
|
||||
IF_HAS_BLOOD_DNA(src)
|
||||
. += mutable_appearance('icons/effects/blood.dmi', "maskblood")
|
||||
|
||||
/obj/item/clothing/mask/equipped(mob/user, slot)
|
||||
..()
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/datum/species/pref_species = H.dna.species
|
||||
|
||||
if(mutantrace_variation)
|
||||
if("mam_snouts" in pref_species.default_features)
|
||||
if(H.dna.features["mam_snouts"] != "None")
|
||||
muzzle_var = ALT_STYLE
|
||||
else
|
||||
muzzle_var = NORMAL_STYLE
|
||||
|
||||
else if("snout" in pref_species.default_features)
|
||||
if(H.dna.features["snout"] != "None")
|
||||
muzzle_var = ALT_STYLE
|
||||
else
|
||||
muzzle_var = NORMAL_STYLE
|
||||
|
||||
else
|
||||
muzzle_var = NORMAL_STYLE
|
||||
|
||||
H.update_inv_wear_mask()
|
||||
|
||||
|
||||
/obj/item/clothing/mask/update_clothes_damaged_state(damaging = TRUE)
|
||||
..()
|
||||
if(ismob(loc))
|
||||
|
||||
@@ -20,9 +20,11 @@
|
||||
flags_inv = HIDEFACE|HIDEHAIR|HIDEFACIALHAIR
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
mutantrace_variation = MUTANTRACE_VARIATION
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/clothing/mask/luchador/speechModification(message)
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
/obj/item/clothing/mask/luchador/handle_speech(datum/source, list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message[1] != "*")
|
||||
message = replacetext(message, "captain", "CAPITÁN")
|
||||
message = replacetext(message, "station", "ESTACIÓN")
|
||||
message = replacetext(message, "sir", "SEÑOR")
|
||||
@@ -42,7 +44,7 @@
|
||||
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!"
|
||||
return message
|
||||
speech_args[SPEECH_MESSAGE] = message
|
||||
|
||||
/obj/item/clothing/mask/luchador/tecnicos
|
||||
name = "Tecnicos Mask"
|
||||
|
||||
@@ -46,10 +46,12 @@
|
||||
/obj/item/clothing/mask/fakemoustache/italian
|
||||
name = "italian moustache"
|
||||
desc = "Made from authentic Italian moustache hairs. Gives the wearer an irresistable urge to gesticulate wildly."
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/clothing/mask/fakemoustache/italian/speechModification(M)
|
||||
if(copytext(M, 1, 2) != "*")
|
||||
M = " [M]"
|
||||
/obj/item/clothing/mask/fakemoustache/italian/handle_speech(datum/source, list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message[1] != "*")
|
||||
message = " [message]"
|
||||
var/list/italian_words = strings("italian_replacement.json", "italian")
|
||||
|
||||
for(var/key in italian_words)
|
||||
@@ -57,13 +59,13 @@
|
||||
if(islist(value))
|
||||
value = pick(value)
|
||||
|
||||
M = replacetextEx(M, " [uppertext(key)]", " [uppertext(value)]")
|
||||
M = replacetextEx(M, " [capitalize(key)]", " [capitalize(value)]")
|
||||
M = replacetextEx(M, " [key]", " [value]")
|
||||
message = replacetextEx(message, " [uppertext(key)]", " [uppertext(value)]")
|
||||
message = replacetextEx(message, " [capitalize(key)]", " [capitalize(value)]")
|
||||
message = replacetextEx(message, " [key]", " [value]")
|
||||
|
||||
if(prob(3))
|
||||
M += pick(" Ravioli, ravioli, give me the formuoli!"," Mamma-mia!"," Mamma-mia! That's a spicy meat-ball!", " La la la la la funiculi funicula!")
|
||||
return trim(M)
|
||||
message += pick(" Ravioli, ravioli, give me the formuoli!"," Mamma-mia!"," Mamma-mia! That's a spicy meat-ball!", " La la la la la funiculi funicula!")
|
||||
speech_args[SPEECH_MESSAGE] = trim(message)
|
||||
|
||||
/obj/item/clothing/mask/joy
|
||||
name = "joy mask"
|
||||
@@ -77,32 +79,20 @@
|
||||
icon_state = "pig"
|
||||
item_state = "pig"
|
||||
flags_inv = HIDEFACE|HIDEHAIR|HIDEFACIALHAIR
|
||||
clothing_flags = VOICEBOX_TOGGLABLE
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
actions_types = list(/datum/action/item_action/toggle_voice_box)
|
||||
var/voicechange = 0
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/clothing/mask/pig/attack_self(mob/user)
|
||||
voicechange = !voicechange
|
||||
to_chat(user, "<span class='notice'>You turn the voice box [voicechange ? "on" : "off"]!</span>")
|
||||
/obj/item/clothing/mask/pig/handle_speech(datum/source, list/speech_args)
|
||||
if(!CHECK_BITFIELD(clothing_flags, VOICEBOX_DISABLED))
|
||||
speech_args[SPEECH_MESSAGE] = pick("Oink!","Squeeeeeeee!","Oink Oink!")
|
||||
|
||||
/obj/item/clothing/mask/pig/speechModification(message)
|
||||
if(voicechange)
|
||||
message = pick("Oink!","Squeeeeeeee!","Oink Oink!")
|
||||
return message
|
||||
|
||||
/obj/item/clothing/mask/spig //needs to be different otherwise you could turn the speedmodification off and on
|
||||
/obj/item/clothing/mask/pig/cursed //needs to be different otherwise you could turn the speedmodification off and on
|
||||
name = "Pig face"
|
||||
desc = "It looks like a mask, but closer inspection reveals it's melded onto this persons face!" //It's only ever going to be attached to your face.
|
||||
icon_state = "pig"
|
||||
item_state = "pig"
|
||||
flags_inv = HIDEFACE|HIDEHAIR|HIDEFACIALHAIR
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/voicechange = 1
|
||||
|
||||
/obj/item/clothing/mask/spig/speechModification(message)
|
||||
if(voicechange)
|
||||
message = pick("Oink!","Squeeeeeeee!","Oink Oink!")
|
||||
return message
|
||||
flags_inv = HIDEFACIALHAIR
|
||||
clothing_flags = NONE
|
||||
item_flags = NODROP
|
||||
|
||||
///frog mask - reeee!!
|
||||
/obj/item/clothing/mask/frog
|
||||
@@ -112,47 +102,47 @@
|
||||
item_state = "frog"
|
||||
flags_inv = HIDEFACE|HIDEHAIR|HIDEFACIALHAIR
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/voicechange = TRUE
|
||||
clothing_flags = VOICEBOX_TOGGLABLE
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/clothing/mask/frog/attack_self(mob/user)
|
||||
voicechange = !voicechange
|
||||
to_chat(user, "<span class='notice'>You turn the voice box [voicechange ? "on" : "off"]!</span>")
|
||||
|
||||
/obj/item/clothing/mask/frog/speechModification(message) //whenever you speak
|
||||
if(voicechange)
|
||||
/obj/item/clothing/mask/frog/handle_speech(datum/source, list/speech_args) //whenever you speak
|
||||
if(!CHECK_BITFIELD(clothing_flags, VOICEBOX_DISABLED))
|
||||
if(prob(5)) //sometimes, the angry spirit finds others words to speak.
|
||||
message = pick("HUUUUU!!","SMOOOOOKIN'!!","Hello my baby, hello my honey, hello my rag-time gal.", "Feels bad, man.", "GIT DIS GUY OFF ME!!" ,"SOMEBODY STOP ME!!", "NORMIES, GET OUT!!")
|
||||
speech_args[SPEECH_MESSAGE] = pick("HUUUUU!!","SMOOOOOKIN'!!","Hello my baby, hello my honey, hello my rag-time gal.", "Feels bad, man.", "GIT DIS GUY OFF ME!!" ,"SOMEBODY STOP ME!!", "NORMIES, GET OUT!!")
|
||||
else
|
||||
message = pick("Ree!!", "Reee!!","REEE!!","REEEEE!!") //but its usually just angry gibberish,
|
||||
return message
|
||||
speech_args[SPEECH_MESSAGE] = pick("Ree!!", "Reee!!","REEE!!","REEEEE!!") //but its usually just angry gibberish,
|
||||
|
||||
/obj/item/clothing/mask/frog/cursed
|
||||
clothing_flags = NONE
|
||||
item_flags = NODROP //reee!!
|
||||
|
||||
/obj/item/clothing/mask/frog/cursed/attack_self(mob/user)
|
||||
return //no voicebox to alter.
|
||||
|
||||
/obj/item/clothing/mask/frog/cursed/equipped(mob/user, slot)
|
||||
var/mob/living/carbon/C = user
|
||||
if(C.wear_mask == src)
|
||||
to_chat(user, "<span class='warning'><B>[src] was cursed! Ree!!</B></span>")
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/clothing/mask/cowmask
|
||||
name = "Cowface"
|
||||
desc = "It looks like a mask, but closer inspection reveals it's melded onto this persons face!"
|
||||
name = "Cow mask"
|
||||
desc = "A rubber cow mask,"
|
||||
icon = 'icons/mob/mask.dmi'
|
||||
icon_state = "cowmask"
|
||||
item_state = "cowmask"
|
||||
clothing_flags = VOICEBOX_TOGGLABLE
|
||||
flags_inv = HIDEFACE|HIDEHAIR|HIDEFACIALHAIR
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/voicechange = 1
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/clothing/mask/cowmask/speechModification(message)
|
||||
if(voicechange)
|
||||
message = pick("Moooooooo!","Moo!","Moooo!")
|
||||
return message
|
||||
/obj/item/clothing/mask/cowmask/handle_speech(datum/source, list/speech_args)
|
||||
if(!CHECK_BITFIELD(clothing_flags, VOICEBOX_DISABLED))
|
||||
speech_args[SPEECH_MESSAGE] = pick("Moooooooo!","Moo!","Moooo!")
|
||||
|
||||
/obj/item/clothing/mask/cowmask/cursed
|
||||
name = "cow face"
|
||||
desc = "It looks like a cow mask, but closer inspection reveals it's melded onto this persons face!"
|
||||
flags_inv = HIDEFACIALHAIR
|
||||
clothing_flags = NONE
|
||||
item_flags = NODROP
|
||||
|
||||
/obj/item/clothing/mask/horsehead
|
||||
name = "horse head mask"
|
||||
@@ -161,12 +151,18 @@
|
||||
item_state = "horsehead"
|
||||
flags_inv = HIDEFACE|HIDEHAIR|HIDEFACIALHAIR|HIDEEYES|HIDEEARS
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/voicechange = 1
|
||||
clothing_flags = VOICEBOX_TOGGLABLE
|
||||
|
||||
/obj/item/clothing/mask/horsehead/speechModification(message)
|
||||
if(voicechange)
|
||||
message = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
|
||||
return message
|
||||
/obj/item/clothing/mask/horsehead/handle_speech(datum/source, list/speech_args)
|
||||
if(!CHECK_BITFIELD(clothing_flags, VOICEBOX_DISABLED))
|
||||
speech_args[SPEECH_MESSAGE] = pick("NEEIIGGGHHHH!", "NEEEIIIIGHH!", "NEIIIGGHH!", "HAAWWWWW!", "HAAAWWW!")
|
||||
|
||||
/obj/item/clothing/mask/horsehead/cursed
|
||||
name = "horse face"
|
||||
desc = "It initially looks like a mask, but it's melded into the poor person's face."
|
||||
clothing_flags = NONE
|
||||
flags_inv = HIDEFACIALHAIR
|
||||
item_flags = NODROP
|
||||
|
||||
/obj/item/clothing/mask/rat
|
||||
name = "rat mask"
|
||||
@@ -285,16 +281,18 @@
|
||||
item_state = "gondola"
|
||||
flags_inv = HIDEFACE|HIDEHAIR|HIDEFACIALHAIR
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/clothing/mask/gondola/speechModification(M)
|
||||
if(copytext(M, 1, 2) != "*")
|
||||
M = " [M]"
|
||||
/obj/item/clothing/mask/gondola/handle_speech(datum/source, list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message[1] != "*")
|
||||
message = " [message]"
|
||||
var/list/spurdo_words = strings("spurdo_replacement.json", "spurdo")
|
||||
for(var/key in spurdo_words)
|
||||
var/value = spurdo_words[key]
|
||||
if(islist(value))
|
||||
value = pick(value)
|
||||
M = replacetextEx(M,regex(uppertext(key),"g"), "[uppertext(value)]")
|
||||
M = replacetextEx(M,regex(capitalize(key),"g"), "[capitalize(value)]")
|
||||
M = replacetextEx(M,regex(key,"g"), "[value]")
|
||||
return trim(M)
|
||||
message = replacetextEx(message,regex(uppertext(key),"g"), "[uppertext(value)]")
|
||||
message = replacetextEx(message,regex(capitalize(key),"g"), "[capitalize(value)]")
|
||||
message = replacetextEx(message,regex(key,"g"), "[value]")
|
||||
speech_args[SPEECH_MESSAGE] = trim(message)
|
||||
|
||||
@@ -689,7 +689,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
chosen = capitalize(pick(speak_messages))
|
||||
chosen = replacetext(chosen, "%TARGETNAME%", target_name)
|
||||
var/image/speech_overlay = image('icons/mob/talk.dmi', person, "default0", layer = ABOVE_MOB_LAYER)
|
||||
var/message = target.compose_message(person,understood_language,chosen,null,person.get_spans(),face_name = TRUE)
|
||||
var/message = target.compose_message(person,understood_language,chosen,null,list(person.speech_span),face_name = TRUE)
|
||||
feedback_details += "Type: Talk, Source: [person.real_name], Message: [message]"
|
||||
to_chat(target, message)
|
||||
if(target.client)
|
||||
@@ -705,7 +705,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
||||
humans += H
|
||||
person = pick(humans)
|
||||
var/message = target.compose_message(person,understood_language,chosen,"[FREQ_COMMON]",person.get_spans(),face_name = TRUE)
|
||||
var/message = target.compose_message(person,understood_language,chosen,"[FREQ_COMMON]",list(person.speech_span),face_name = TRUE)
|
||||
feedback_details += "Type: Radio, Source: [person.real_name], Message: [message]"
|
||||
to_chat(target, message)
|
||||
qdel(src)
|
||||
|
||||
@@ -112,7 +112,7 @@ GLOBAL_LIST(labor_sheet_values)
|
||||
else
|
||||
if(!(obj_flags & EMAGGED))
|
||||
Radio.set_frequency(FREQ_SECURITY)
|
||||
Radio.talk_into(src, "[inserted_id.registered_name] has returned to the station. Minerals and Prisoner ID card ready for retrieval.", FREQ_SECURITY, get_spans(), get_default_language())
|
||||
Radio.talk_into(src, "[inserted_id.registered_name] has returned to the station. Minerals and Prisoner ID card ready for retrieval.", FREQ_SECURITY)
|
||||
to_chat(usr, "<span class='notice'>Shuttle received message and will be sent shortly.</span>")
|
||||
|
||||
/obj/machinery/mineral/labor_claim_console/proc/check_auth()
|
||||
@@ -149,7 +149,7 @@ GLOBAL_LIST(labor_sheet_values)
|
||||
var/obj/item/stack/sheet/inp = I
|
||||
points += inp.point_value * inp.amount
|
||||
return ..()
|
||||
|
||||
|
||||
/**********************Point Lookup Console**************************/
|
||||
/obj/machinery/mineral/labor_points_checker
|
||||
name = "points checking console"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
var/datum/dna/stored/stored_dna // dna var for brain. Used to store dna, brain dna is not considered like actual dna, brain.has_dna() returns FALSE.
|
||||
stat = DEAD //we start dead by default
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
speech_span = SPAN_ROBOT
|
||||
|
||||
/mob/living/brain/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -10,14 +10,11 @@
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/brain/get_spans()
|
||||
return ..() | SPAN_ROBOT
|
||||
|
||||
/mob/living/brain/radio(message, message_mode, list/spans, language)
|
||||
if(message_mode == MODE_HEADSET && istype(container, /obj/item/mmi))
|
||||
var/obj/item/mmi/R = container
|
||||
if(R.radio)
|
||||
R.radio.talk_into(src, message, , get_spans(), language)
|
||||
R.radio.talk_into(src, message, language = language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
if(!message)
|
||||
return
|
||||
|
||||
var/message_a = say_quote(message, get_spans())
|
||||
var/message_a = say_quote(message)
|
||||
var/rendered = "<i><span class='alien'>Hivemind, <span class='name'>[shown_name]</span> <span class='message'>[message_a]</span></span></i>"
|
||||
for(var/mob/S in GLOB.player_list)
|
||||
if(!S.stat && S.hivecheck())
|
||||
|
||||
@@ -10,29 +10,6 @@
|
||||
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
|
||||
|
||||
@@ -1158,13 +1158,6 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
return 1
|
||||
return FALSE
|
||||
|
||||
/datum/species/proc/handle_speech(message, mob/living/carbon/human/H)
|
||||
return message
|
||||
|
||||
//return a list of spans or an empty list
|
||||
/datum/species/proc/get_spans()
|
||||
return list()
|
||||
|
||||
/datum/species/proc/check_weakness(obj/item, mob/living/attacker)
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -68,17 +68,17 @@
|
||||
|
||||
/obj/item/organ/tongue/dullahan
|
||||
zone = "abstract"
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/organ/tongue/dullahan/TongueSpeech(var/message)
|
||||
/obj/item/organ/tongue/dullahan/handle_speech(datum/source, list/speech_args)
|
||||
if(ishuman(owner))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(H.dna.species.id == "dullahan")
|
||||
var/datum/species/dullahan/D = H.dna.species
|
||||
if(isobj(D.myhead.loc))
|
||||
var/obj/O = D.myhead.loc
|
||||
O.say(message)
|
||||
message = ""
|
||||
return message
|
||||
O.say(speech_args[SPEECH_MESSAGE])
|
||||
speech_args[SPEECH_MESSAGE] = ""
|
||||
|
||||
/obj/item/organ/ears/dullahan
|
||||
zone = "abstract"
|
||||
|
||||
@@ -519,6 +519,11 @@
|
||||
..()
|
||||
last_banana = world.time
|
||||
last_honk = world.time
|
||||
RegisterSignal(C, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/species/golem/bananium/on_species_loss(mob/living/carbon/C)
|
||||
. = ..()
|
||||
UnregisterSignal(C, COMSIG_MOB_SAY)
|
||||
|
||||
/datum/species/golem/bananium/random_name(gender,unique,lastname)
|
||||
var/clown_name = pick(GLOB.clown_names)
|
||||
@@ -567,9 +572,8 @@
|
||||
/datum/species/golem/bananium/spec_death(gibbed, mob/living/carbon/human/H)
|
||||
playsound(get_turf(H), 'sound/misc/sadtrombone.ogg', 70, 0)
|
||||
|
||||
/datum/species/golem/bananium/get_spans()
|
||||
return list(SPAN_CLOWN)
|
||||
|
||||
/datum/species/golem/bananium/proc/handle_speech(datum/source, list/speech_args)
|
||||
speech_args[SPEECH_SPANS] |= SPAN_CLOWN
|
||||
|
||||
/datum/species/golem/runic
|
||||
name = "Runic Golem"
|
||||
@@ -646,14 +650,16 @@
|
||||
/datum/species/golem/clockwork/on_species_gain(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
H.faction |= "ratvar"
|
||||
RegisterSignal(H, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/species/golem/clockwork/on_species_loss(mob/living/carbon/human/H)
|
||||
if(!is_servant_of_ratvar(H))
|
||||
H.faction -= "ratvar"
|
||||
UnregisterSignal(H, COMSIG_MOB_SAY)
|
||||
. = ..()
|
||||
|
||||
/datum/species/golem/clockwork/get_spans()
|
||||
return SPAN_ROBOT //beep
|
||||
/datum/species/golem/clockwork/proc/handle_speech(datum/source, list/speech_args)
|
||||
speech_args[SPEECH_SPANS] |= SPAN_ROBOT //beep
|
||||
|
||||
/datum/species/golem/clockwork/spec_death(gibbed, mob/living/carbon/human/H)
|
||||
gibbed = !has_corpse ? FALSE : gibbed
|
||||
@@ -951,7 +957,7 @@
|
||||
sexes = FALSE
|
||||
fixed_mut_color = "ffffff"
|
||||
attack_verb = "rattl"
|
||||
species_traits = list(NOBLOOD,NO_UNDERWEAR,NOGENITALS,NOAROUSAL,MUTCOLORS)
|
||||
species_traits = list(NOBLOOD,NO_UNDERWEAR,NOGENITALS,NOAROUSAL,MUTCOLORS)
|
||||
inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_NOFIRE,TRAIT_NOGUNS,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER,TRAIT_FAKEDEATH,TRAIT_CALCIUM_HEALER)
|
||||
info_text = "As a <span class='danger'>Bone Golem</span>, You have a powerful spell that lets you chill your enemies with fear, and milk heals you! Just make sure to watch our for bone-hurting juice."
|
||||
var/datum/action/innate/bonechill/bonechill
|
||||
|
||||
@@ -28,6 +28,11 @@
|
||||
/datum/species/synth/on_species_gain(mob/living/carbon/human/H, datum/species/old_species)
|
||||
..()
|
||||
assume_disguise(old_species, H)
|
||||
RegisterSignal(H, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/species/synth/on_species_loss(mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
UnregisterSignal(H, COMSIG_MOB_SAY)
|
||||
|
||||
/datum/species/synth/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
|
||||
if(chem.id == "synthflesh")
|
||||
@@ -110,18 +115,12 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/species/synth/get_spans()
|
||||
if(fake_species)
|
||||
return fake_species.get_spans()
|
||||
return list()
|
||||
|
||||
|
||||
/datum/species/synth/handle_speech(message, mob/living/carbon/human/H)
|
||||
if(H.health > disguise_fail_health)
|
||||
if(fake_species)
|
||||
return fake_species.handle_speech(message,H)
|
||||
else
|
||||
return ..()
|
||||
else
|
||||
return ..()
|
||||
/datum/species/synth/proc/handle_speech(datum/source, list/speech_args)
|
||||
if (isliving(source)) // yeah it's gonna be living but just to be clean
|
||||
var/mob/living/L = source
|
||||
if(fake_species && L.health > disguise_fail_health)
|
||||
switch (fake_species.type)
|
||||
if (/datum/species/golem/bananium)
|
||||
speech_args[SPEECH_SPANS] |= SPAN_CLOWN
|
||||
if (/datum/species/golem/clockwork)
|
||||
speech_args[SPEECH_SPANS] |= SPAN_ROBOT
|
||||
@@ -1,37 +1,17 @@
|
||||
/mob/living/carbon/treat_message(message)
|
||||
for(var/datum/brain_trauma/trauma in get_traumas())
|
||||
message = trauma.on_say(message)
|
||||
message = ..(message)
|
||||
var/obj/item/organ/tongue/T = getorganslot(ORGAN_SLOT_TONGUE)
|
||||
if(!T) //hoooooouaah!
|
||||
var/regex/tongueless_lower = new("\[gdntke]+", "g")
|
||||
var/regex/tongueless_upper = new("\[GDNTKE]+", "g")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
message = tongueless_lower.Replace(message, pick("aa","oo","'"))
|
||||
message = tongueless_upper.Replace(message, pick("AA","OO","'"))
|
||||
else
|
||||
message = T.TongueSpeech(message)
|
||||
if(wear_mask)
|
||||
message = wear_mask.speechModification(message)
|
||||
if(head)
|
||||
message = head.speechModification(message)
|
||||
return message
|
||||
/mob/living/carbon/proc/handle_tongueless_speech(mob/living/carbon/speaker, list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
var/static/regex/tongueless_lower = new("\[gdntke]+", "g")
|
||||
var/static/regex/tongueless_upper = new("\[GDNTKE]+", "g")
|
||||
if(message[1] != "*")
|
||||
message = tongueless_lower.Replace(message, pick("aa","oo","'"))
|
||||
message = tongueless_upper.Replace(message, pick("AA","OO","'"))
|
||||
speech_args[SPEECH_MESSAGE] = message
|
||||
|
||||
/mob/living/carbon/can_speak_vocal(message)
|
||||
if(silent)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/get_spans()
|
||||
. = ..()
|
||||
var/obj/item/organ/tongue/T = getorganslot(ORGAN_SLOT_TONGUE)
|
||||
if(T)
|
||||
. |= T.get_spans()
|
||||
|
||||
var/obj/item/I = get_active_held_item()
|
||||
if(I)
|
||||
. |= I.get_held_item_speechspans(src)
|
||||
|
||||
/mob/living/carbon/could_speak_in_language(datum/language/dt)
|
||||
var/obj/item/organ/tongue/T = getorganslot(ORGAN_SLOT_TONGUE)
|
||||
if(T)
|
||||
|
||||
@@ -175,13 +175,16 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
else
|
||||
src.log_talk(message, LOG_SAY, forced_by=forced)
|
||||
|
||||
message = treat_message(message)
|
||||
message = treat_message(message) // unfortunately we still need this
|
||||
var/sigreturn = SEND_SIGNAL(src, COMSIG_MOB_SAY, args)
|
||||
if (sigreturn & COMPONENT_UPPERCASE_SPEECH)
|
||||
message = uppertext(message)
|
||||
if(!message)
|
||||
return
|
||||
|
||||
last_words = message
|
||||
|
||||
spans |= get_spans()
|
||||
spans |= speech_span
|
||||
|
||||
if(language)
|
||||
var/datum/language/L = GLOB.language_datum_instances[language]
|
||||
@@ -332,6 +335,10 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
return null
|
||||
|
||||
/mob/living/proc/treat_message(message)
|
||||
|
||||
if(HAS_TRAIT(src, TRAIT_UNINTELLIGIBLE_SPEECH))
|
||||
message = unintelligize(message)
|
||||
|
||||
if(derpspeech)
|
||||
message = derpspeech(message, stuttering)
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
else
|
||||
padloc = "(UNKNOWN)"
|
||||
src.log_talk(message, LOG_SAY, tag="HOLOPAD in [padloc]")
|
||||
send_speech(message, 7, T, "robot", get_spans(), language)
|
||||
send_speech(message, 7, T, "robot", language = language)
|
||||
to_chat(src, "<i><span class='game say'>Holopad transmitted, <span class='name'>[real_name]</span> <span class='message robot'>\"[message]\"</span></span></i>")
|
||||
else
|
||||
to_chat(src, "No holopad connected.")
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
|
||||
/mob/living/silicon/get_spans()
|
||||
return ..() | SPAN_ROBOT
|
||||
|
||||
/mob/living/proc/robot_talk(message)
|
||||
log_talk(message, LOG_SAY)
|
||||
var/desig = "Default Cyborg" //ezmode for taters
|
||||
if(issilicon(src))
|
||||
var/mob/living/silicon/S = src
|
||||
desig = trim_left(S.designation + " " + S.job)
|
||||
var/message_a = say_quote(message, get_spans())
|
||||
var/message_a = say_quote(message)
|
||||
var/rendered = "Robotic Talk, <span class='name'>[name]</span> <span class='message'>[message_a]</span>"
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.binarycheck())
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
possible_a_intents = list(INTENT_HELP, INTENT_HARM)
|
||||
mob_biotypes = list(MOB_ROBOTIC)
|
||||
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
|
||||
speech_span = SPAN_ROBOT
|
||||
|
||||
var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS
|
||||
var/last_lawchange_announce = 0
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
verb_yell = "alarms"
|
||||
initial_language_holder = /datum/language_holder/synthetic
|
||||
bubble_icon = "machine"
|
||||
speech_span = SPAN_ROBOT
|
||||
|
||||
faction = list("neutral", "silicon" , "turret")
|
||||
|
||||
@@ -348,13 +349,10 @@
|
||||
if((!on) || (!message))
|
||||
return
|
||||
if(channel && Radio.channels[channel])// Use radio if we have channel key
|
||||
Radio.talk_into(src, message, channel, get_spans(), get_default_language())
|
||||
Radio.talk_into(src, message, channel)
|
||||
else
|
||||
say(message)
|
||||
|
||||
/mob/living/simple_animal/bot/get_spans()
|
||||
return ..() | SPAN_ROBOT
|
||||
|
||||
/mob/living/simple_animal/bot/radio(message, message_mode, list/spans, language)
|
||||
. = ..()
|
||||
if(. != 0)
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
gender = NEUTER
|
||||
mob_biotypes = list(MOB_ROBOTIC)
|
||||
speak_emote = list("chirps")
|
||||
speech_span = SPAN_ROBOT
|
||||
bubble_icon = "machine"
|
||||
initial_language_holder = /datum/language_holder/drone
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
|
||||
@@ -1,13 +1,3 @@
|
||||
/////////////
|
||||
//DRONE SAY//
|
||||
/////////////
|
||||
//Drone speach
|
||||
|
||||
/mob/living/simple_animal/drone/get_spans()
|
||||
return ..() | SPAN_ROBOT
|
||||
|
||||
|
||||
|
||||
//Base proc for anything to call
|
||||
/proc/_alert_drones(msg, dead_can_hear = 0, atom/source, mob/living/faction_checked_mob, exact_faction_match)
|
||||
if (dead_can_hear && source)
|
||||
@@ -31,7 +21,7 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/proc/drone_chat(msg)
|
||||
alert_drones("<i>Drone Chat: <span class='name'>[name]</span> <span class='message'>[say_quote(msg, get_spans())]</span></i>", TRUE)
|
||||
alert_drones("<i>Drone Chat: <span class='name'>[name]</span> <span class='message'>[say_quote(msg)]</span></i>", TRUE)
|
||||
|
||||
/mob/living/simple_animal/drone/binarycheck()
|
||||
return TRUE
|
||||
|
||||
@@ -69,16 +69,11 @@
|
||||
if(name != real_name)
|
||||
alt_name = " (died as [real_name])"
|
||||
|
||||
var/K
|
||||
|
||||
if(key)
|
||||
K = src.key
|
||||
|
||||
var/spanned = src.say_quote(message, get_spans())
|
||||
var/spanned = say_quote(message)
|
||||
message = emoji_parse(message)
|
||||
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>[name]</span>[alt_name] <span class='message'>[emoji_parse(spanned)]</span></span>"
|
||||
log_talk(message, LOG_SAY, tag="DEAD")
|
||||
deadchat_broadcast(rendered, follow_target = src, speaker_key = K)
|
||||
deadchat_broadcast(rendered, follow_target = src, speaker_key = key)
|
||||
|
||||
/mob/proc/check_emote(message)
|
||||
if(copytext(message, 1, 2) == "*")
|
||||
|
||||
@@ -78,10 +78,6 @@ global procs
|
||||
say_quote(input, spans, message_mode)
|
||||
Adds a verb and quotes to a message. Also attaches span classes to a message. Verbs are determined by verb_say/verb_ask/verb_yell variables. Called on the speaker.
|
||||
|
||||
get_spans(input, spans)
|
||||
Returns the list of spans that are always applied to messages of this atom.
|
||||
Always return ..() | + youroutput when overriding this proc!
|
||||
|
||||
/mob
|
||||
say_dead(message)
|
||||
Sends a message to all dead people. Does not use Hear().
|
||||
|
||||
@@ -17,16 +17,19 @@ Contents:
|
||||
item_state = "s-ninja_mask"
|
||||
strip_delay = 120
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/clothing/mask/gas/space_ninja/speechModification(message)
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
/obj/item/clothing/mask/gas/space_ninja/handle_speech(datum/source, list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message[1] != "*")
|
||||
var/list/temp_message = text2list(message, " ")
|
||||
var/list/pick_list = list()
|
||||
for(var/i = 1, i <= temp_message.len, i++)
|
||||
for(var/i in 1 to temp_message.len)
|
||||
pick_list += i
|
||||
for(var/i=1, i <= abs(temp_message.len/3), i++)
|
||||
for(var/i in 1 to abs(temp_message.len/3))
|
||||
var/H = pick(pick_list)
|
||||
if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue
|
||||
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, " ")
|
||||
@@ -56,5 +59,4 @@ Contents:
|
||||
message = replacetext(message, "than", "sen")
|
||||
message = replacetext(message, ".", "")
|
||||
message = lowertext(message)
|
||||
|
||||
return message
|
||||
speech_args[SPEECH_MESSAGE] = message
|
||||
|
||||
@@ -184,9 +184,6 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
to_chat(H, "<span class='danger'>You get headaches just from looking at it.</span>")
|
||||
return
|
||||
|
||||
/obj/machinery/power/supermatter_crystal/get_spans()
|
||||
return list(SPAN_ROBOT)
|
||||
|
||||
#define CRITICAL_TEMPERATURE 10000
|
||||
|
||||
/obj/machinery/power/supermatter_crystal/proc/get_status()
|
||||
@@ -244,10 +241,10 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
add_overlay(causality_field, TRUE)
|
||||
|
||||
var/speaking = "[emergency_alert] The supermatter has reached critical integrity failure. Emergency causality destabilization field has been activated."
|
||||
radio.talk_into(src, speaking, common_channel, get_spans(), get_default_language())
|
||||
radio.talk_into(src, speaking, common_channel, language = get_default_language())
|
||||
for(var/i in SUPERMATTER_COUNTDOWN_TIME to 0 step -10)
|
||||
if(damage < explosion_point) // Cutting it a bit close there engineers
|
||||
radio.talk_into(src, "[safe_alert] Failsafe has been disengaged.", common_channel, get_spans(), get_default_language())
|
||||
radio.talk_into(src, "[safe_alert] Failsafe has been disengaged.", common_channel)
|
||||
cut_overlay(causality_field, TRUE)
|
||||
final_countdown = FALSE
|
||||
return
|
||||
@@ -258,7 +255,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
speaking = "[DisplayTimeText(i, TRUE)] remain before causality stabilization."
|
||||
else
|
||||
speaking = "[i*0.1]..."
|
||||
radio.talk_into(src, speaking, common_channel, get_spans(), get_default_language())
|
||||
radio.talk_into(src, speaking, common_channel)
|
||||
sleep(10)
|
||||
|
||||
explode()
|
||||
@@ -459,27 +456,27 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
alarm()
|
||||
|
||||
if(damage > emergency_point)
|
||||
radio.talk_into(src, "[emergency_alert] Integrity: [get_integrity()]%", common_channel, get_spans(), get_default_language())
|
||||
radio.talk_into(src, "[emergency_alert] Integrity: [get_integrity()]%", common_channel)
|
||||
lastwarning = REALTIMEOFDAY
|
||||
if(!has_reached_emergency)
|
||||
investigate_log("has reached the emergency point for the first time.", INVESTIGATE_SUPERMATTER)
|
||||
message_admins("[src] has reached the emergency point [ADMIN_JMP(src)].")
|
||||
has_reached_emergency = TRUE
|
||||
else if(damage >= damage_archived) // The damage is still going up
|
||||
radio.talk_into(src, "[warning_alert] Integrity: [get_integrity()]%", engineering_channel, get_spans(), get_default_language())
|
||||
radio.talk_into(src, "[warning_alert] Integrity: [get_integrity()]%", engineering_channel)
|
||||
lastwarning = REALTIMEOFDAY - (WARNING_DELAY * 5)
|
||||
|
||||
else // Phew, we're safe
|
||||
radio.talk_into(src, "[safe_alert] Integrity: [get_integrity()]%", engineering_channel, get_spans(), get_default_language())
|
||||
radio.talk_into(src, "[safe_alert] Integrity: [get_integrity()]%", engineering_channel)
|
||||
lastwarning = REALTIMEOFDAY
|
||||
|
||||
if(power > POWER_PENALTY_THRESHOLD)
|
||||
radio.talk_into(src, "Warning: Hyperstructure has reached dangerous power level.", engineering_channel, get_spans(), get_default_language())
|
||||
radio.talk_into(src, "Warning: Hyperstructure has reached dangerous power level.", engineering_channel)
|
||||
if(powerloss_inhibitor < 0.5)
|
||||
radio.talk_into(src, "DANGER: CHARGE INERTIA CHAIN REACTION IN PROGRESS.", engineering_channel, get_spans(), get_default_language())
|
||||
radio.talk_into(src, "DANGER: CHARGE INERTIA CHAIN REACTION IN PROGRESS.", engineering_channel)
|
||||
|
||||
if(combined_gas > MOLE_PENALTY_THRESHOLD)
|
||||
radio.talk_into(src, "Warning: Critical coolant mass reached.", engineering_channel, get_spans(), get_default_language())
|
||||
radio.talk_into(src, "Warning: Critical coolant mass reached.", engineering_channel)
|
||||
|
||||
if(damage > explosion_point)
|
||||
countdown()
|
||||
|
||||
@@ -37,14 +37,13 @@
|
||||
"<span class='danger'>Your face starts burning up, but the flames are repulsed by your anti-magic protection!</span>")
|
||||
return
|
||||
|
||||
var/list/masks = list(/obj/item/clothing/mask/spig, /obj/item/clothing/mask/cowmask, /obj/item/clothing/mask/horsehead)
|
||||
var/list/masks = list(/obj/item/clothing/mask/pig/cursed, /obj/item/clothing/mask/cowmask/cursed, /obj/item/clothing/mask/horsehead/cursed)
|
||||
var/list/mSounds = list('sound/magic/pighead_curse.ogg', 'sound/magic/cowhead_curse.ogg', 'sound/magic/horsehead_curse.ogg')
|
||||
var/randM = rand(1,3)
|
||||
|
||||
|
||||
var/choice = masks[randM]
|
||||
var/obj/item/clothing/mask/magichead = new choice
|
||||
magichead.item_flags |= NODROP
|
||||
magichead.flags_inv = null
|
||||
target.visible_message("<span class='danger'>[target]'s face bursts into flames, and a barnyard animal's head takes its place!</span>", \
|
||||
"<span class='danger'>Your face burns up, and shortly after the fire you realise you have the face of a barnyard animal!</span>")
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
var/list/languages_possible
|
||||
var/say_mod = null
|
||||
var/taste_sensitivity = 15 // lower is more sensitive.
|
||||
var/modifies_speech = FALSE
|
||||
var/static/list/languages_possible_base = typecacheof(list(
|
||||
/datum/language/common,
|
||||
/datum/language/draconic,
|
||||
@@ -24,24 +25,25 @@
|
||||
. = ..()
|
||||
languages_possible = languages_possible_base
|
||||
|
||||
/obj/item/organ/tongue/get_spans()
|
||||
return list()
|
||||
|
||||
/obj/item/organ/tongue/proc/TongueSpeech(var/message)
|
||||
return message
|
||||
/obj/item/organ/tongue/proc/handle_speech(datum/source, list/speech_args)
|
||||
|
||||
/obj/item/organ/tongue/Insert(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
if(say_mod && M.dna && M.dna.species)
|
||||
M.dna.species.say_mod = say_mod
|
||||
if (modifies_speech)
|
||||
RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
M.UnregisterSignal(M, COMSIG_MOB_SAY)
|
||||
|
||||
/obj/item/organ/tongue/Remove(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
if(say_mod && M.dna && M.dna.species)
|
||||
M.dna.species.say_mod = initial(M.dna.species.say_mod)
|
||||
UnregisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
M.RegisterSignal(M, COMSIG_MOB_SAY, /mob/living/carbon/.proc/handle_tongueless_speech)
|
||||
|
||||
/obj/item/organ/tongue/could_speak_in_language(datum/language/dt)
|
||||
. = is_type_in_typecache(dt, languages_possible)
|
||||
return is_type_in_typecache(dt, languages_possible)
|
||||
|
||||
/obj/item/organ/tongue/lizard
|
||||
name = "forked tongue"
|
||||
@@ -49,14 +51,16 @@
|
||||
icon_state = "tonguelizard"
|
||||
say_mod = "hisses"
|
||||
taste_sensitivity = 10 // combined nose + tongue, extra sensitive
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/organ/tongue/lizard/TongueSpeech(var/message)
|
||||
var/regex/lizard_hiss = new("s+", "g")
|
||||
var/regex/lizard_hiSS = new("S+", "g")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
/obj/item/organ/tongue/lizard/handle_speech(datum/source, list/speech_args)
|
||||
var/static/regex/lizard_hiss = new("s+", "g")
|
||||
var/static/regex/lizard_hiSS = new("S+", "g")
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message[1] != "*")
|
||||
message = lizard_hiss.Replace(message, "sss")
|
||||
message = lizard_hiSS.Replace(message, "SSS")
|
||||
return message
|
||||
speech_args[SPEECH_MESSAGE] = message
|
||||
|
||||
/obj/item/organ/tongue/fly
|
||||
name = "proboscis"
|
||||
@@ -64,14 +68,16 @@
|
||||
icon_state = "tonguefly"
|
||||
say_mod = "buzzes"
|
||||
taste_sensitivity = 25 // you eat vomit, this is a mercy
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/organ/tongue/fly/TongueSpeech(var/message)
|
||||
var/regex/fly_buzz = new("z+", "g")
|
||||
var/regex/fly_buZZ = new("Z+", "g")
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
/obj/item/organ/tongue/fly/handle_speech(datum/source, list/speech_args)
|
||||
var/static/regex/fly_buzz = new("z+", "g")
|
||||
var/static/regex/fly_buZZ = new("Z+", "g")
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message[1] != "*")
|
||||
message = fly_buzz.Replace(message, "zzz")
|
||||
message = fly_buZZ.Replace(message, "ZZZ")
|
||||
return message
|
||||
speech_args[SPEECH_MESSAGE] = message
|
||||
|
||||
/obj/item/organ/tongue/abductor
|
||||
name = "superlingual matrix"
|
||||
@@ -79,9 +85,11 @@
|
||||
icon_state = "tongueayylmao"
|
||||
say_mod = "gibbers"
|
||||
taste_sensitivity = 101 // ayys cannot taste anything.
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/organ/tongue/abductor/TongueSpeech(var/message)
|
||||
/obj/item/organ/tongue/abductor/handle_speech(datum/source, list/speech_args)
|
||||
//Hacks
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
var/mob/living/carbon/human/user = usr
|
||||
var/rendered = "<span class='abductor'><b>[user.name]:</b> [message]</span>"
|
||||
user.log_talk(message, LOG_SAY, tag="abductor")
|
||||
@@ -97,7 +105,7 @@
|
||||
for(var/mob/M in GLOB.dead_mob_list)
|
||||
var/link = FOLLOW_LINK(M, user)
|
||||
to_chat(M, "[link] [rendered]")
|
||||
return ""
|
||||
speech_args[SPEECH_MESSAGE] = ""
|
||||
|
||||
/obj/item/organ/tongue/zombie
|
||||
name = "rotting tongue"
|
||||
@@ -105,9 +113,10 @@
|
||||
icon_state = "tonguezombie"
|
||||
say_mod = "moans"
|
||||
taste_sensitivity = 32
|
||||
modifies_speech = TRUE
|
||||
|
||||
/obj/item/organ/tongue/zombie/TongueSpeech(var/message)
|
||||
var/list/message_list = splittext(message, " ")
|
||||
/obj/item/organ/tongue/zombie/handle_speech(datum/source, list/speech_args)
|
||||
var/list/message_list = splittext(speech_args[SPEECH_MESSAGE], " ")
|
||||
var/maxchanges = max(round(message_list.len / 1.5), 2)
|
||||
|
||||
for(var/i = rand(maxchanges / 2, maxchanges), i > 0, i--)
|
||||
@@ -120,7 +129,7 @@
|
||||
if(prob(20) && message_list.len > 3)
|
||||
message_list.Insert(insertpos, "[pick("BRAINS", "Brains", "Braaaiinnnsss", "BRAAAIIINNSSS")]...")
|
||||
|
||||
return jointext(message_list, " ")
|
||||
speech_args[SPEECH_MESSAGE] = jointext(message_list, " ")
|
||||
|
||||
/obj/item/organ/tongue/alien
|
||||
name = "alien tongue"
|
||||
@@ -128,6 +137,7 @@
|
||||
icon_state = "tonguexeno"
|
||||
say_mod = "hisses"
|
||||
taste_sensitivity = 10 // LIZARDS ARE ALIENS CONFIRMED
|
||||
modifies_speech = TRUE // not really, they just hiss
|
||||
var/static/list/languages_possible_alien = typecacheof(list(
|
||||
/datum/language/xenocommon,
|
||||
/datum/language/common,
|
||||
@@ -139,9 +149,8 @@
|
||||
. = ..()
|
||||
languages_possible = languages_possible_alien
|
||||
|
||||
/obj/item/organ/tongue/alien/TongueSpeech(var/message)
|
||||
/obj/item/organ/tongue/alien/handle_speech(datum/source, list/speech_args)
|
||||
playsound(owner, "hiss", 25, 1, 1)
|
||||
return message
|
||||
|
||||
/obj/item/organ/tongue/bone
|
||||
name = "bone \"tongue\""
|
||||
@@ -150,7 +159,7 @@
|
||||
say_mod = "rattles"
|
||||
attack_verb = list("bitten", "chattered", "chomped", "enamelled", "boned")
|
||||
taste_sensitivity = 101 // skeletons cannot taste anything
|
||||
|
||||
modifies_speech = TRUE
|
||||
var/chattering = FALSE
|
||||
var/phomeme_type = "sans"
|
||||
var/list/phomeme_types = list("sans", "papyrus")
|
||||
@@ -159,29 +168,20 @@
|
||||
. = ..()
|
||||
phomeme_type = pick(phomeme_types)
|
||||
|
||||
/obj/item/organ/tongue/bone/TongueSpeech(var/message)
|
||||
. = message
|
||||
|
||||
if(chattering)
|
||||
//Annoy everyone nearby with your chattering.
|
||||
chatter(message, phomeme_type, usr)
|
||||
|
||||
/obj/item/organ/tongue/bone/get_spans()
|
||||
. = ..()
|
||||
// Feature, if the tongue talks directly, it will speak with its span
|
||||
/obj/item/organ/tongue/bone/handle_speech(datum/source, list/speech_args)
|
||||
if (chattering)
|
||||
chatter(speech_args[SPEECH_MESSAGE], phomeme_type, source)
|
||||
switch(phomeme_type)
|
||||
if("sans")
|
||||
. |= SPAN_SANS
|
||||
speech_args[SPEECH_SPANS] |= SPAN_SANS
|
||||
if("papyrus")
|
||||
. |= SPAN_PAPYRUS
|
||||
speech_args[SPEECH_SPANS] |= SPAN_PAPYRUS
|
||||
|
||||
/obj/item/organ/tongue/bone/plasmaman
|
||||
name = "plasma bone \"tongue\""
|
||||
desc = "Like animated skeletons, Plasmamen vibrate their teeth in order to produce speech."
|
||||
icon_state = "tongueplasma"
|
||||
|
||||
/obj/item/organ/tongue/bone/plasmaman/get_spans()
|
||||
return
|
||||
modifies_speech = FALSE
|
||||
|
||||
/obj/item/organ/tongue/robot
|
||||
name = "robotic voicebox"
|
||||
@@ -190,10 +190,18 @@
|
||||
icon_state = "tonguerobot"
|
||||
say_mod = "states"
|
||||
attack_verb = list("beeped", "booped")
|
||||
modifies_speech = TRUE
|
||||
taste_sensitivity = 25 // not as good as an organic tongue
|
||||
var/electronics_magic = TRUE
|
||||
|
||||
/obj/item/organ/tongue/robot/can_speak_in_language(datum/language/dt)
|
||||
. = TRUE // THE MAGIC OF ELECTRONICS
|
||||
return ..() || electronics_magic
|
||||
|
||||
/obj/item/organ/tongue/robot/get_spans()
|
||||
return ..() | SPAN_ROBOT
|
||||
/obj/item/organ/tongue/robot/handle_speech(datum/source, list/speech_args)
|
||||
speech_args[SPEECH_SPANS] |= SPAN_ROBOT
|
||||
|
||||
/obj/item/organ/tongue/robot/ipc
|
||||
name = "positronic voicebox"
|
||||
say_mod = "beeps"
|
||||
desc = "A voice synthesizer used by IPCs to smoothly interface with organic lifeforms."
|
||||
electronics_magic = FALSE
|
||||
@@ -11,6 +11,7 @@
|
||||
mutant_bodyparts = list("ipc_screen", "ipc_antenna")
|
||||
default_features = list("ipc_screen" = "Blank", "ipc_antenna" = "None")
|
||||
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/ipc
|
||||
mutanttongue = /obj/item/organ/tongue/robot/ipc
|
||||
|
||||
exotic_blood = "oil"
|
||||
|
||||
@@ -27,9 +28,6 @@
|
||||
screen.Remove(C)
|
||||
..()
|
||||
|
||||
/datum/species/ipc/get_spans()
|
||||
return SPAN_ROBOT
|
||||
|
||||
/datum/action/innate/monitor_change
|
||||
name = "Screen Change"
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
|
||||
Reference in New Issue
Block a user