From 2d89c7d4d369f6e95a817435724932d973f672fb Mon Sep 17 00:00:00 2001 From: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Date: Mon, 26 Sep 2022 17:37:35 -0700 Subject: [PATCH] Fixes weather sounds (#69944) * Fixes weather sounds Timber changed the args to this signal in cbc6f35f54558c438b92c7557ef450dc426c3b7c, and didn't update my code. Damn you timber. Thanks to that bro in coderbus who told me about this --- code/datums/components/area_sound_manager.dm | 4 ++-- code/datums/elements/weather_listener.dm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/datums/components/area_sound_manager.dm b/code/datums/components/area_sound_manager.dm index 43b5980ebb0..5ce3129ed67 100644 --- a/code/datums/components/area_sound_manager.dm +++ b/code/datums/components/area_sound_manager.dm @@ -32,9 +32,9 @@ return change_the_track(TRUE) -/datum/component/area_sound_manager/proc/react_to_z_move(datum/source, old_z, new_z) +/datum/component/area_sound_manager/proc/react_to_z_move(datum/source, turf/old_turf, turf/new_turf) SIGNAL_HANDLER - if(!length(accepted_zs) || (new_z in accepted_zs)) + if(!length(accepted_zs) || (new_turf.z in accepted_zs)) return qdel(src) diff --git a/code/datums/elements/weather_listener.dm b/code/datums/elements/weather_listener.dm index bad601d080d..129965ca11b 100644 --- a/code/datums/elements/weather_listener.dm +++ b/code/datums/elements/weather_listener.dm @@ -31,10 +31,10 @@ . = ..() UnregisterSignal(source, list(COMSIG_MOVABLE_Z_CHANGED, COMSIG_MOB_LOGOUT)) -/datum/element/weather_listener/proc/handle_z_level_change(datum/source, old_z, new_z) +/datum/element/weather_listener/proc/handle_z_level_change(datum/source, turf/old_loc, turf/new_loc) SIGNAL_HANDLER var/list/fitting_z_levels = SSmapping.levels_by_trait(weather_trait) - if(!(new_z in fitting_z_levels)) + if(!(new_loc.z in fitting_z_levels)) return var/datum/component/our_comp = source.AddComponent(/datum/component/area_sound_manager, playlist, list(), COMSIG_MOB_LOGOUT, fitting_z_levels) our_comp.RegisterSignal(SSdcs, sound_change_signals, /datum/component/area_sound_manager/proc/handle_change)