From e84f7ae4ac3510b943feb02f61023ef8f3abc6db Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 13 Jun 2021 01:16:44 -0700 Subject: [PATCH] fix --- code/__HELPERS/yelling.dm | 14 ++++++++------ code/modules/keybindings/keybind/mob.dm | 4 ++-- code/modules/mob/living/say.dm | 1 + 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/code/__HELPERS/yelling.dm b/code/__HELPERS/yelling.dm index 7fec64c276..3134e866be 100644 --- a/code/__HELPERS/yelling.dm +++ b/code/__HELPERS/yelling.dm @@ -4,14 +4,13 @@ /datum/yelling_wavefill/Destroy(force, ...) stop = TRUE + collected = null // don't cut it, something else is probably using it now! return ..() /datum/yelling_wavefill/proc/run_wavefill(atom/source, dist = 50) collected = list() do_run(source, dist) - // gc - if(QDELETED(src)) - collected = null + // to_chat(world, "DEBUG: collected [english_list(collected)]") // blatantly copied from wave explosion code // check explosion2.dm for what this does and how it works. @@ -29,7 +28,7 @@ var/dir var/returned #define RUN_YELL(_T, _P, _D) \ - returned = max(_P - max(_T.get_yelling_resistance(_P), 0) - 1, 0); + returned = max(_P - max(_T.get_yelling_resistance(_P), 0) - 1, 0); // \ // _T.maptext = "[returned]"; var/list/turf/edges_next @@ -117,7 +116,9 @@ power = diagonal_powers[T] dir = diagonals[T] RUN_YELL(T, power, dir) - if(returned < 1) + if(returned >= 1) + collected |= typecache_filter_list(T.contents, GLOB.typecache_living) + else continue CARDINAL_MARK(NORTH, NORTH, dir) CARDINAL_MARK(SOUTH, SOUTH, dir) @@ -145,4 +146,5 @@ /proc/yelling_wavefill(atom/source, dist = 50) var/datum/yelling_wavefill/Y = new Y.run_wavefill(source, dist) - return Y.collected || list() + . = Y.collected + qdel(Y) diff --git a/code/modules/keybindings/keybind/mob.dm b/code/modules/keybindings/keybind/mob.dm index 85862ee14f..15911d831e 100644 --- a/code/modules/keybindings/keybind/mob.dm +++ b/code/modules/keybindings/keybind/mob.dm @@ -85,6 +85,6 @@ description = "Immediately examine anything you're hovering your mouse over." /datum/keybinding/mob/examine_immediate/down(client/user) - var/atom/A = user.mosueObject + var/atom/A = user.mouseObject if(A) - A.attempt_examinate(user.mob)) + A.attempt_examinate(user.mob) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 9f39fe492b..6e24f9f1e4 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -314,6 +314,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list( overhearing = yelling_wavefill(src, yell_power) // overhearing = get_hearers_in_view(35, src) | get_hearers_in_range(5, src) overhearing -= already_heard + // to_chat(world, "DEBUG: overhearing [english_list(overhearing)]") for(var/_AM in overhearing) var/atom/movable/AM = _AM AM.Hear(rendered, speaker, message_language, message, null, spans, message_mode, source)