diff --git a/code/__HELPERS/yelling.dm b/code/__HELPERS/yelling.dm index 3134e866be..94ebfb7726 100644 --- a/code/__HELPERS/yelling.dm +++ b/code/__HELPERS/yelling.dm @@ -44,15 +44,15 @@ #define CARDINAL_MARK(ndir, cdir, edir) \ if(edir & cdir) { \ expanding = get_step(T,ndir); \ - if(expanding && isnull(processed_last[expanding]) && isnull(edges[expanding])) { \ + if(expanding && (isnull(processed_last[expanding]) || (processed_last[expanding] < (power - 5))) && (isnull(edges[expanding]) || (edges[expanding] < (power - 5)))) { \ powers_next[expanding] = max(powers_next[expanding], returned); \ - edges_next[expanding] = (cdir | edges_next[expanding]); \ + edges_next[expanding] = cdir; \ }; \ }; #define DIAGONAL_SUBSTEP(ndir, cdir, edir) \ expanding = get_step(T,ndir); \ - if(expanding && isnull(processed_last[expanding]) && isnull(edges[expanding])) { \ + if(expanding && (isnull(processed_last[expanding])) && (isnull(edges[expanding]))) { \ if(!edges_next[expanding]) { \ diagonal_powers_max[expanding] = max(diagonal_powers_max[expanding], returned, powers[T]); \ diagonal_powers[expanding] = CALCULATE_DIAGONAL_POWER(diagonal_powers[expanding], returned, diagonal_powers_max[expanding]); \ diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index bcae3059e0..155a462295 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -58,8 +58,9 @@ /// Should we use tooltips, if the thing does not have the code implemented `get_tooltip_data()`, it will default to examine(src) var/tooltips = FALSE /// How loudly we yell - var/yell_power = 35 - + var/yell_power = 50 + /// last time we yelled + var/last_yell = 0 /atom/movable/Initialize(mapload) . = ..() diff --git a/code/game/turfs/closed.dm b/code/game/turfs/closed.dm index 7af6c6780e..3b2762c0c4 100644 --- a/code/game/turfs/closed.dm +++ b/code/game/turfs/closed.dm @@ -9,9 +9,9 @@ wave_explosion_block = 10 wave_explosion_multiply = 0.75 /// How much we block yelling - var/yelling_resistance = 15 + var/yelling_resistance = 5 /// how much of inbound yelling to dampen - var/yelling_dampen = 0.5 + var/yelling_dampen = 0.75 /turf/closed/Initialize() . = ..() diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index b1a4efc97e..b566b7efbf 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -274,6 +274,8 @@ destination_y = dest_y destination_z = dest_z +/turf/open/space/get_yelling_resistance(power) + return INFINITY // no sound through space for crying out loud /turf/open/space/transparent baseturfs = /turf/open/space/transparent/openspace diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index f8e2a2e18f..1bc2050685 100755 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -616,10 +616,17 @@ GLOBAL_LIST_EMPTY(station_turfs) /turf/proc/get_yelling_resistance(power) . = 0 // don't bother checking fulltile, we don't need accuracy - var/obj/structure/window/W = locate() in src - if(W) - . += 7 + var/obj/window = locate(/obj/structure/window) in src + if(!window) + window = locate(/obj/machinery/door/window) in src + if(window) + . += 5 // windows are minimally resistant + // if there's more than one someone fucked up as that shouldn't happen + var/obj/machinery/door/D = locate() in src + if(D?.density) + . += D.opacity? 30 : 20 // glass doors are slightly more resistant to screaming for(var/obj/machinery/door/D in src) if(!D.density) continue - . += D.opacity? 7 : 15 + break + . += D.opacity? 30 : diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 6e24f9f1e4..84c2bf9e66 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -310,8 +310,13 @@ GLOBAL_LIST_INIT(department_radio_keys, list( INVOKE_ASYNC(GLOBAL_PROC, /.proc/flick_overlay, I, speech_bubble_recipients, 30) /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, "Your voice doesn't project as far as you try to yell in such quick succession.") // yeah no, no spamming an expensive floodfill. + return + last_yell = world.time var/list/overhearing = list() overhearing = yelling_wavefill(src, yell_power) + log_say("YELL: [ismob(src)? key_name(src) : src] yelled [message] with overhearing mobs [overhearing]") // overhearing = get_hearers_in_view(35, src) | get_hearers_in_range(5, src) overhearing -= already_heard // to_chat(world, "DEBUG: overhearing [english_list(overhearing)]")