vocal barks - Fully customizable noises for talking!
This commit is contained in:
@@ -297,8 +297,9 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
AM.Hear(rendered, src, message_language, message, null, spans, message_mode, source)
|
||||
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_LIVING_SAY_SPECIAL, src, message)
|
||||
|
||||
if(client && !eavesdrop_range && say_test(message) == "2") // Yell hook
|
||||
process_yelling(listening, rendered, src, message_language, message, spans, message_mode, source)
|
||||
var/is_yell = (say_test(message) == "2")
|
||||
if(client && !eavesdrop_range && is_yell) // Yell hook
|
||||
listening |= process_yelling(listening, rendered, src, message_language, message, spans, message_mode, source)
|
||||
|
||||
//speech bubble
|
||||
var/list/speech_bubble_recipients = list()
|
||||
@@ -309,6 +310,20 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
I.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA
|
||||
INVOKE_ASYNC(GLOBAL_PROC, /.proc/flick_overlay, I, speech_bubble_recipients, 30)
|
||||
|
||||
//Listening gets trimmed here if a vocal bark's present. If anyone ever makes this proc return listening, make sure to instead initialize a copy of listening in here to avoid wonkiness
|
||||
if(vocal_bark || vocal_bark_id)
|
||||
for(var/mob/M in listening)
|
||||
if(!M.client)
|
||||
continue
|
||||
if(!(M.client.prefs.toggles & SOUND_BARK))
|
||||
listening -= M
|
||||
var/barks = round((LAZYLEN(message) / vocal_speed)) + 1
|
||||
var/total_delay
|
||||
for(var/i in 1 to barks)
|
||||
addtimer(CALLBACK(src, /atom/movable/proc/bark, listening, (message_range * (is_yell ? 4 : 1)), (vocal_volume * (is_yell ? 1.5 : 1)), rand(vocal_pitch * 100, ((vocal_pitch*100) + (vocal_pitch_range*100))) / 100), total_delay)
|
||||
total_delay += rand(DS2TICKS((vocal_speed/4) * (is_yell ? 0.5 : 1)), DS2TICKS(vocal_speed/4) + DS2TICKS((vocal_speed/4) * (is_yell ? 0.5 : 1))) TICKS
|
||||
|
||||
|
||||
/atom/movable/proc/process_yelling(list/already_heard, rendered, atom/movable/speaker, datum/language/message_language, message, list/spans, message_mode, obj/source)
|
||||
if(last_yell > (world.time - 10))
|
||||
to_chat(src, "<span class='warning'>Your voice doesn't project as far as you try to yell in such quick succession.") // yeah no, no spamming an expensive floodfill.
|
||||
@@ -333,6 +348,8 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
var/atom/movable/AM = _AM
|
||||
AM.Hear(rendered, speaker, message_language, message, null, spans, message_mode, source)
|
||||
|
||||
return overhearing
|
||||
|
||||
/mob/proc/binarycheck()
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
footstep_type = FOOTSTEP_MOB_CLAW
|
||||
|
||||
vocal_bark_id = "bullet"
|
||||
vocal_speed = 6
|
||||
|
||||
/mob/living/simple_animal/pet/dog/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/wuv, "yaps happily!", EMOTE_AUDIBLE, /datum/mood_event/pet_animal, "growls!", EMOTE_AUDIBLE)
|
||||
@@ -639,6 +642,8 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
|
||||
mob_size = MOB_SIZE_SMALL
|
||||
collar_type = "puppy"
|
||||
|
||||
vocal_pitch = 1.6
|
||||
|
||||
//puppies cannot wear anything.
|
||||
/mob/living/simple_animal/pet/dog/corgi/puppy/Topic(href, href_list)
|
||||
if(href_list["remove_inv"] || href_list["add_inv"])
|
||||
@@ -660,6 +665,8 @@ GLOBAL_LIST_INIT(strippable_corgi_items, create_strippable_list(list(
|
||||
maxbodytemp = T0C + 40
|
||||
held_icon = "void_puppy"
|
||||
|
||||
vocal_pitch = 0.6
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/puppy/void/Process_Spacemove(movement_dir = 0)
|
||||
return 1 //Void puppies can navigate space.
|
||||
|
||||
|
||||
@@ -23,6 +23,11 @@
|
||||
gold_core_spawnable = FRIENDLY_SPAWN
|
||||
footstep_type = FOOTSTEP_MOB_CLAW
|
||||
|
||||
vocal_bark_id = "bullet"
|
||||
vocal_speed = 2
|
||||
vocal_pitch = 1.6
|
||||
vocal_pitch_range = 0.4
|
||||
|
||||
/mob/living/simple_animal/pet/fox/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/mob_holder, "fox")
|
||||
|
||||
Reference in New Issue
Block a user