From aaa3fa277e394b473d0c09e9092ea5d471161013 Mon Sep 17 00:00:00 2001 From: keronshb Date: Thu, 14 Oct 2021 23:46:43 -0400 Subject: [PATCH] Adds hear_1, cells work. --- code/__DEFINES/important_recursive_contents.dm | 4 ---- code/game/atoms_movable.dm | 11 ----------- code/modules/antagonists/gang/cellphone.dm | 2 +- 3 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 code/__DEFINES/important_recursive_contents.dm diff --git a/code/__DEFINES/important_recursive_contents.dm b/code/__DEFINES/important_recursive_contents.dm deleted file mode 100644 index f1dc0bd3ea..0000000000 --- a/code/__DEFINES/important_recursive_contents.dm +++ /dev/null @@ -1,4 +0,0 @@ -///the area channel of the important_recursive_contents list, everything in here will be sent a signal when their last holding object changes areas -#define RECURSIVE_CONTENTS_AREA_SENSITIVE "recursive_contents_area_sensitive" -///the hearing channel of the important_recursive_contents list, everything in here will count as a hearing atom -#define RECURSIVE_CONTENTS_HEARING_SENSITIVE "recursive_contents_hearing_sensitive" diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 0475a4fae5..391d3b467d 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -770,14 +770,3 @@ animate(I, alpha = 175, pixel_x = to_x, pixel_y = to_y, time = 3, transform = M, easing = CUBIC_EASING) sleep(1) animate(I, alpha = 0, transform = matrix(), time = 1) - -///allows this movable to hear and adds itself to the important_recursive_contents list of itself and every movable loc its in -/atom/movable/proc/become_hearing_sensitive(trait_source = TRAIT_GENERIC) - if(!HAS_TRAIT(src, TRAIT_HEARING_SENSITIVE)) - RegisterSignal(src, SIGNAL_TRAIT(TRAIT_HEARING_SENSITIVE), .proc/on_hearing_sensitive_trait_loss) - ADD_TRAIT(src, TRAIT_HEARING_SENSITIVE, trait_source) - -/atom/movable/proc/on_hearing_sensitive_trait_loss() - SIGNAL_HANDLER - UnregisterSignal(src, SIGNAL_TRAIT(TRAIT_HEARING_SENSITIVE)) - REMOVE_TRAIT(src, TRAIT_HEARING_SENSITIVE, src) diff --git a/code/modules/antagonists/gang/cellphone.dm b/code/modules/antagonists/gang/cellphone.dm index 7ba3a76d95..f7971300f9 100644 --- a/code/modules/antagonists/gang/cellphone.dm +++ b/code/modules/antagonists/gang/cellphone.dm @@ -12,7 +12,7 @@ GLOBAL_LIST_EMPTY(gangster_cell_phones) /obj/item/gangster_cellphone/Initialize() . = ..() GLOB.gangster_cell_phones += src - become_hearing_sensitive() + flags_1 |= HEAR_1 /obj/item/gangster_cellphone/Destroy() GLOB.gangster_cell_phones -= src