yelling
This commit is contained in:
@@ -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]); \
|
||||
|
||||
@@ -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)
|
||||
. = ..()
|
||||
|
||||
@@ -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()
|
||||
. = ..()
|
||||
|
||||
@@ -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
|
||||
|
||||
+11
-4
@@ -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 :
|
||||
|
||||
@@ -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, "<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.
|
||||
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)]")
|
||||
|
||||
Reference in New Issue
Block a user