Merge pull request #15684 from deathride58/barkfollowup
Bark followup - audio balance pass, bark intercepts, yelling nerf, falloff fix, and more!
This commit is contained in:
@@ -244,6 +244,8 @@
|
||||
// #define HEARING_SPANS 6
|
||||
#define HEARING_MESSAGE_MODE 7
|
||||
// #define HEARING_SOURCE 8
|
||||
#define COMSIG_MOVABLE_BARK "movable_bark" //from base of atom/movable/proc/bark(): (list/hearers, distance, volume, pitch)
|
||||
#define COMSIG_MOVABLE_QUEUE_BARK "movable_queue_bark" //from base of atom/movable/proc/send_speech(): (list/hearers, message, range, atom/movable/source, bubble_type, list/spans, datum/language/message_language, message_mode)
|
||||
#define COMSIG_MOVABLE_DISPOSING "movable_disposing" //called when the movable is added to a disposal holder object for disposal movement: (obj/structure/disposalholder/holder, obj/machinery/disposal/source)
|
||||
#define COMSIG_MOVABLE_TELEPORTED "movable_teleported" //from base of do_teleport(): (channel, turf/origin, turf/destination)
|
||||
#define COMSIG_MOVABLE_CHASM_DROP "movable_chasm_drop" //from base of /datum/component/chasm/drop() (/datum/component/chasm)
|
||||
|
||||
@@ -115,6 +115,8 @@
|
||||
|
||||
#define BARK_DO_VARY(pitch, variance) (rand(((pitch * 100) - (variance*50)), ((pitch*100) + (variance*50))) / 100)
|
||||
|
||||
#define BARK_SOUND_FALLOFF_EXPONENT(distance) (distance/7) //At lower ranges, we want the exponent to be below 1 so that whispers don't sound too awkward. At higher ranges, we want the exponent fairly high to make yelling less obnoxious
|
||||
|
||||
// Is something in the IC chat filter? This is config dependent.
|
||||
#define CHAT_FILTER_CHECK(T) (config.ic_filter_regex && findtext(T, config.ic_filter_regex))
|
||||
|
||||
|
||||
+13
-2
@@ -72,8 +72,8 @@
|
||||
/datum/bark/chitter
|
||||
name = "Chittery"
|
||||
id = "chitter"
|
||||
minspeed = 6 //This is a pretty long sound
|
||||
soundpath = 'sound/items/Ratchet.ogg'
|
||||
minspeed = 4 //Even with the sound being replaced with a unique, shorter sound, this is still a little too long for higher speeds
|
||||
soundpath = 'sound/voice/barks/chitter.ogg'
|
||||
|
||||
/datum/bark/synthetic_grunt
|
||||
name = "Synthetic (Grunt)"
|
||||
@@ -91,6 +91,11 @@
|
||||
maxpitch = 1.6 //This works well with higher pitches!
|
||||
soundpath = 'sound/weapons/bulletflyby.ogg' //This works... Surprisingly well as a bark? It's neat!
|
||||
|
||||
/datum/bark/coggers
|
||||
name = "Brassy"
|
||||
id = "coggers"
|
||||
soundpath = 'sound/machines/clockcult/integration_cog_install.ogg' //Yet another unexpectedly good bark sound
|
||||
|
||||
|
||||
// Genetics-only/admin-only sounds. These either clash hard with the audio design of the above sounds, or have some other form of audio design issue, but aren't *too* awful as a sometimes thing.
|
||||
// Rule of fun very much applies to this section. Audio design is extremely important for the above section, but down here? No gods, no masters, pure anarchy.
|
||||
@@ -137,3 +142,9 @@
|
||||
id = "weh"
|
||||
soundpath = 'modular_citadel/sound/voice/weh.ogg'
|
||||
ignore = TRUE
|
||||
|
||||
/datum/bark/honk
|
||||
name = "Annoying Honk"
|
||||
id = "honk"
|
||||
soundpath = 'sound/creatures/goose1.ogg'
|
||||
ignore = TRUE
|
||||
|
||||
+7
-7
@@ -138,9 +138,9 @@
|
||||
L[DNA_SKIN_TONE_BLOCK] = construct_block(GLOB.skin_tones.Find(H.skin_tone), GLOB.skin_tones.len)
|
||||
L[DNA_LEFT_EYE_COLOR_BLOCK] = sanitize_hexcolor(H.left_eye_color)
|
||||
L[DNA_RIGHT_EYE_COLOR_BLOCK] = sanitize_hexcolor(H.right_eye_color)
|
||||
L[DNA_COLOR_ONE_BLOCK] = sanitize_hexcolor(features["mcolor"], 6)
|
||||
L[DNA_COLOR_TWO_BLOCK] = sanitize_hexcolor(features["mcolor2"], 6)
|
||||
L[DNA_COLOR_THREE_BLOCK] = sanitize_hexcolor(features["mcolor3"], 6)
|
||||
L[DNA_COLOR_ONE_BLOCK] = sanitize_hexcolor(features["mcolor"])
|
||||
L[DNA_COLOR_TWO_BLOCK] = sanitize_hexcolor(features["mcolor2"])
|
||||
L[DNA_COLOR_THREE_BLOCK] = sanitize_hexcolor(features["mcolor3"])
|
||||
if(!GLOB.mam_tails_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/mam_tails, GLOB.mam_tails_list)
|
||||
L[DNA_MUTANTTAIL_BLOCK] = construct_block(GLOB.mam_tails_list.Find(features["mam_tail"]), GLOB.mam_tails_list.len)
|
||||
@@ -252,11 +252,11 @@
|
||||
if(DNA_HAIR_STYLE_BLOCK)
|
||||
setblock(uni_identity, blocknumber, construct_block(GLOB.hair_styles_list.Find(H.hair_style), GLOB.hair_styles_list.len))
|
||||
if(DNA_COLOR_ONE_BLOCK)
|
||||
setblock(uni_identity, blocknumber, sanitize_hexcolor(features["mcolor"], 6))
|
||||
setblock(uni_identity, blocknumber, sanitize_hexcolor(features["mcolor"]))
|
||||
if(DNA_COLOR_TWO_BLOCK)
|
||||
setblock(uni_identity, blocknumber, sanitize_hexcolor(features["mcolor2"], 6))
|
||||
setblock(uni_identity, blocknumber, sanitize_hexcolor(features["mcolor2"]))
|
||||
if(DNA_COLOR_THREE_BLOCK)
|
||||
setblock(uni_identity, blocknumber, sanitize_hexcolor(features["mcolor3"], 6))
|
||||
setblock(uni_identity, blocknumber, sanitize_hexcolor(features["mcolor3"]))
|
||||
if(DNA_MUTANTTAIL_BLOCK)
|
||||
setblock(uni_identity, blocknumber, construct_block(GLOB.mam_tails_list.Find(features["mam_tail"]), GLOB.mam_tails_list.len))
|
||||
if(DNA_MUTANTEAR_BLOCK)
|
||||
@@ -504,7 +504,7 @@
|
||||
if(mutations_overlay_update)
|
||||
update_mutations_overlay()
|
||||
set_bark(GLOB.bark_list[deconstruct_block(getblock(structure, DNA_BARK_SOUND_BLOCK), GLOB.bark_list.len)])
|
||||
vocal_speed = (deconstruct_block(getblock(structure, DNA_BARK_PITCH_BLOCK), 16) / 4)
|
||||
vocal_speed = (deconstruct_block(getblock(structure, DNA_BARK_SPEED_BLOCK), 16) / 4)
|
||||
vocal_pitch = (deconstruct_block(getblock(structure, DNA_BARK_PITCH_BLOCK), 48) / 30)
|
||||
vocal_pitch_range = (deconstruct_block(getblock(structure, DNA_BARK_VARIANCE_BLOCK), 48) / 48)
|
||||
|
||||
|
||||
@@ -72,6 +72,8 @@
|
||||
var/vocal_volume = 70 //Baseline. This gets modified by yelling and other factors
|
||||
var/vocal_speed = 4 //Lower values are faster, higher values are slower
|
||||
|
||||
var/vocal_current_bark //When barks are queued, this gets passed to the bark proc. If vocal_current_bark doesn't match the args passed to the bark proc (if passed at all), then the bark simply doesn't play. Basic curtailing of spam~
|
||||
|
||||
/atom/movable/Initialize(mapload)
|
||||
. = ..()
|
||||
switch(blocks_emissive)
|
||||
@@ -225,6 +227,10 @@
|
||||
if(NAMEOF(src, glide_size))
|
||||
set_glide_size(var_value)
|
||||
. = TRUE
|
||||
if(NAMEOF(src, vocal_bark))
|
||||
if(isfile(var_value))
|
||||
vocal_bark = sound(var_value) //bark() expects vocal_bark to already be a sound datum, for performance reasons. adminbus QoL!
|
||||
. = TRUE
|
||||
|
||||
if(!isnull(.))
|
||||
datum_flags |= DF_VAR_EDITED
|
||||
|
||||
@@ -106,6 +106,7 @@ Class Procs:
|
||||
|
||||
vocal_bark_id = "synth"
|
||||
vocal_pitch = 0.6
|
||||
vocal_volume = 40
|
||||
|
||||
var/stat = 0
|
||||
var/use_power = IDLE_POWER_USE
|
||||
|
||||
+9
-4
@@ -31,14 +31,18 @@ GLOBAL_LIST_INIT(freqtospan, list(
|
||||
/atom/movable/proc/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode, atom/movable/source)
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_HEAR, args)
|
||||
|
||||
/atom/movable/proc/bark(list/hearers, distance, volume, pitch)
|
||||
/atom/movable/proc/bark(list/hearers, distance, volume, pitch, queue_time)
|
||||
if(queue_time && vocal_current_bark != queue_time)
|
||||
return
|
||||
if(SEND_SIGNAL(src, COMSIG_MOVABLE_BARK, hearers, distance, volume, pitch))
|
||||
return //bark interception. this probably counts as some flavor of BDSM
|
||||
if(!vocal_bark)
|
||||
if(!vocal_bark_id || !set_bark(vocal_bark_id)) //just-in-time bark generation
|
||||
return
|
||||
volume = min(volume, 100)
|
||||
var/turf/T = get_turf(src)
|
||||
for(var/mob/M in hearers)
|
||||
M.playsound_local(T, vol = volume, vary = TRUE, frequency = pitch, max_distance = distance, falloff_distance = distance * 0.75, S = vocal_bark, distance_multiplier = 1)
|
||||
M.playsound_local(T, vol = volume, vary = TRUE, frequency = pitch, max_distance = distance, falloff_distance = 0, falloff_exponent = BARK_SOUND_FALLOFF_EXPONENT(distance), S = vocal_bark, distance_multiplier = 1)
|
||||
|
||||
/atom/movable/proc/can_speak()
|
||||
return 1
|
||||
@@ -49,7 +53,7 @@ GLOBAL_LIST_INIT(freqtospan, list(
|
||||
for(var/_AM in hearers)
|
||||
var/atom/movable/AM = _AM
|
||||
AM.Hear(rendered, src, message_language, message, , spans, message_mode, source)
|
||||
if(vocal_bark || vocal_bark_id)
|
||||
if(SEND_SIGNAL(src, COMSIG_MOVABLE_QUEUE_BARK, hearers, args) || vocal_bark || vocal_bark_id)
|
||||
for(var/mob/M in hearers)
|
||||
if(!M.client)
|
||||
continue
|
||||
@@ -57,10 +61,11 @@ GLOBAL_LIST_INIT(freqtospan, list(
|
||||
hearers -= M
|
||||
var/barks = min(round((LAZYLEN(message) / vocal_speed)) + 1, BARK_MAX_BARKS)
|
||||
var/total_delay
|
||||
vocal_current_bark = world.time //this is juuuuust random enough to reliably be unique every time send_speech() is called, in most scenarios
|
||||
for(var/i in 1 to barks)
|
||||
if(total_delay > BARK_MAX_TIME)
|
||||
break
|
||||
addtimer(CALLBACK(src, .proc/bark, hearers, range, vocal_volume, BARK_DO_VARY(vocal_pitch, vocal_pitch_range)), total_delay)
|
||||
addtimer(CALLBACK(src, .proc/bark, hearers, range, vocal_volume, BARK_DO_VARY(vocal_pitch, vocal_pitch_range), vocal_current_bark), total_delay)
|
||||
total_delay += rand(DS2TICKS(vocal_speed / BARK_SPEED_BASELINE), DS2TICKS(vocal_speed / BARK_SPEED_BASELINE) + DS2TICKS(vocal_speed / BARK_SPEED_BASELINE)) TICKS
|
||||
|
||||
/atom/movable/proc/compose_message(atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode, face_name = FALSE, atom/movable/source)
|
||||
|
||||
@@ -311,7 +311,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
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)
|
||||
if(SEND_SIGNAL(src, COMSIG_MOVABLE_QUEUE_BARK, listening, args) || vocal_bark || vocal_bark_id)
|
||||
for(var/mob/M in listening)
|
||||
if(!M.client)
|
||||
continue
|
||||
@@ -319,11 +319,12 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
listening -= M
|
||||
var/barks = min(round((LAZYLEN(message) / vocal_speed)) + 1, BARK_MAX_BARKS)
|
||||
var/total_delay
|
||||
vocal_current_bark = world.time
|
||||
for(var/i in 1 to barks)
|
||||
if(total_delay > BARK_MAX_TIME)
|
||||
break
|
||||
addtimer(CALLBACK(src, /atom/movable/proc/bark, listening, (message_range * (is_yell ? 4 : 1)), (vocal_volume * (is_yell ? 1.5 : 1)), BARK_DO_VARY(vocal_pitch, vocal_pitch_range)), total_delay)
|
||||
total_delay += rand(DS2TICKS((vocal_speed / BARK_SPEED_BASELINE) * (is_yell ? 0.5 : 1)), DS2TICKS(vocal_speed / BARK_SPEED_BASELINE) + DS2TICKS((vocal_speed / BARK_SPEED_BASELINE) * (is_yell ? 0.5 : 1))) TICKS
|
||||
addtimer(CALLBACK(src, /atom/movable/proc/bark, listening, (message_range * (is_yell ? 4 : 1)), (vocal_volume * (is_yell ? 1.5 : 1)), BARK_DO_VARY(vocal_pitch, vocal_pitch_range), vocal_current_bark), total_delay)
|
||||
total_delay += rand(DS2TICKS(vocal_speed / BARK_SPEED_BASELINE), DS2TICKS(vocal_speed / BARK_SPEED_BASELINE) + DS2TICKS((vocal_speed / BARK_SPEED_BASELINE) * (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)
|
||||
|
||||
@@ -44,6 +44,10 @@
|
||||
emote_hear = list("squawks.","bawks!")
|
||||
emote_see = list("flutters its wings.")
|
||||
|
||||
vocal_bark_id = "banjoc4"
|
||||
vocal_pitch = 1.4
|
||||
vocal_pitch_range = 0.4
|
||||
|
||||
speak_chance = 1 //1% (1 in 100) chance every tick; So about once per 150 seconds, assuming an average tick is 1.5s
|
||||
turns_per_move = 5
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/cracker/ = 1)
|
||||
|
||||
Reference in New Issue
Block a user