Adds hear_1, cells work.
This commit is contained in:
@@ -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"
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user