Adds hear_1, cells work.

This commit is contained in:
keronshb
2021-10-14 23:46:43 -04:00
parent 1971e65be3
commit aaa3fa277e
3 changed files with 1 additions and 16 deletions
@@ -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"
-11
View File
@@ -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)
+1 -1
View File
@@ -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