Merge branch 'master' into master
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
var/taste_sensitivity = 15 // lower is more sensitive.
|
||||
var/maxHealth = TONGUE_MAX_HEALTH
|
||||
var/damage = 0
|
||||
var/modifies_speech = FALSE
|
||||
var/static/list/languages_possible_base = typecacheof(list(
|
||||
/datum/language/common,
|
||||
/datum/language/draconic,
|
||||
@@ -28,11 +29,7 @@
|
||||
. = ..()
|
||||
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/proc/adjustTongueLoss(mob/living/carbon/M, damage_mod)
|
||||
if (maxHealth == "alien")
|
||||
@@ -61,14 +58,19 @@
|
||||
..()
|
||||
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"
|
||||
@@ -77,14 +79,16 @@
|
||||
say_mod = "hisses"
|
||||
taste_sensitivity = 10 // combined nose + tongue, extra sensitive
|
||||
maxHealth = 40 //extra sensitivity means tongue is more susceptible to damage
|
||||
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"
|
||||
@@ -93,14 +97,16 @@
|
||||
say_mod = "buzzes"
|
||||
taste_sensitivity = 25 // you eat vomit, this is a mercy
|
||||
maxHealth = 80 //years of eatting trash has made your tongue strong
|
||||
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"
|
||||
@@ -109,9 +115,11 @@
|
||||
say_mod = "gibbers"
|
||||
taste_sensitivity = 101 // ayys cannot taste anything.
|
||||
maxHealth = 120 //Ayys probe a lot
|
||||
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")
|
||||
@@ -127,7 +135,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"
|
||||
@@ -136,9 +144,10 @@
|
||||
say_mod = "moans"
|
||||
taste_sensitivity = 32
|
||||
maxHealth = 65 //Stop! It's already dead...!
|
||||
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--)
|
||||
@@ -151,7 +160,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"
|
||||
@@ -160,6 +169,7 @@
|
||||
say_mod = "hisses"
|
||||
taste_sensitivity = 10 // LIZARDS ARE ALIENS CONFIRMED
|
||||
maxHealth = "alien" //Their blood is acid, so, no, though a tongueless xeno might be funny
|
||||
modifies_speech = TRUE // not really, they just hiss
|
||||
var/static/list/languages_possible_alien = typecacheof(list(
|
||||
/datum/language/xenocommon,
|
||||
/datum/language/common,
|
||||
@@ -171,9 +181,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\""
|
||||
@@ -183,7 +192,7 @@
|
||||
attack_verb = list("bitten", "chattered", "chomped", "enamelled", "boned")
|
||||
taste_sensitivity = 101 // skeletons cannot taste anything
|
||||
maxHealth = "bone" //Take brute damage instead
|
||||
|
||||
modifies_speech = TRUE
|
||||
var/chattering = FALSE
|
||||
var/phomeme_type = "sans"
|
||||
var/list/phomeme_types = list("sans", "papyrus")
|
||||
@@ -192,30 +201,21 @@
|
||||
. = ..()
|
||||
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"
|
||||
maxHealth = "alien"
|
||||
|
||||
/obj/item/organ/tongue/bone/plasmaman/get_spans()
|
||||
return
|
||||
modifies_speech = FALSE
|
||||
|
||||
/obj/item/organ/tongue/robot
|
||||
name = "robotic voicebox"
|
||||
@@ -224,16 +224,17 @@
|
||||
icon_state = "tonguerobot"
|
||||
say_mod = "states"
|
||||
attack_verb = list("beeped", "booped")
|
||||
modifies_speech = TRUE
|
||||
taste_sensitivity = 25 // not as good as an organic tongue
|
||||
maxHealth = 100 //RoboTongue!
|
||||
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
|
||||
|
||||
//FermiChem
|
||||
/obj/item/organ/tongue/fluffy
|
||||
name = "fluffy tongue"
|
||||
desc = "OwO what's this?"
|
||||
@@ -262,5 +263,11 @@
|
||||
taste_sensitivity = 10
|
||||
maxHealth = 60 //It's robotic!
|
||||
|
||||
/obj/item/organ/tongue/cybernetic/get_spans()
|
||||
return ..() | SPAN_ROBOT
|
||||
/obj/item/organ/tongue/cybernetic/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
|
||||
|
||||
Reference in New Issue
Block a user