From 138b7a0aa01dea9ece55b0d15c9e3a6fe1dc1f6a Mon Sep 17 00:00:00 2001 From: Dip Date: Wed, 28 Oct 2020 16:29:53 -0300 Subject: [PATCH] this dullahan bullshit is going to make me kill myself --- code/__DEFINES/components.dm | 2 -- .../mob/living/carbon/human/species_types/dullahan.dm | 8 ++++---- code/modules/mob/mob.dm | 7 ++----- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 676733b6..bb2c8454 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -104,8 +104,6 @@ #define ELEMENT_BESPOKE (1 << 1) #define COMSIG_MOVABLE_UPDATE_GLIDE_SIZE "movable_glide_size" //Called when the movable's glide size is updated: (new_glide_size) -#define COMPONENT_ALLOW_EXAMINE 1 - #define COMSIG_LIVING_FULLY_HEAL "living_fully_healed" //from base of /mob/living/fully_heal(): (admin_revive) #define COMSIG_LIVING_REGENERATE_LIMBS "living_regenerate_limbs" //from base of /mob/living/regenerate_limbs(): (noheal, excluded_limbs) diff --git a/code/modules/mob/living/carbon/human/species_types/dullahan.dm b/code/modules/mob/living/carbon/human/species_types/dullahan.dm index 2c7272e2..5b2ad6e5 100644 --- a/code/modules/mob/living/carbon/human/species_types/dullahan.dm +++ b/code/modules/mob/living/carbon/human/species_types/dullahan.dm @@ -132,14 +132,14 @@ return INITIALIZE_HINT_QDEL owner = new_owner START_PROCESSING(SSobj, src) - RegisterSignal(owner, COMSIG_MOB_EXAMINATE, .proc/examinate_check) + RegisterSignal(owner, COMSIG_CLICK_SHIFT, .proc/examinate_check) RegisterSignal(src, COMSIG_ATOM_HEARER_IN_VIEW, .proc/include_owner) RegisterSignal(owner, COMSIG_LIVING_REGENERATE_LIMBS, .proc/unlist_head) RegisterSignal(owner, COMSIG_LIVING_FULLY_HEAL, .proc/retrieve_head) -/obj/item/dullahan_relay/proc/examinate_check(mob/source, atom/A) - if(source.client.eye == src && ((A in view(source.client.view, src)) || (isturf(A) && source.sight & SEE_TURFS) || (ismob(A) && source.sight & SEE_MOBS) || (isobj(A) && source.sight & SEE_OBJS))) - return COMPONENT_ALLOW_EXAMINE +/obj/item/dullahan_relay/proc/examinate_check(atom/source, mob/user) + if(user.client.eye == src) + return COMPONENT_ALLOW_EXAMINATE /obj/item/dullahan_relay/proc/include_owner(datum/source, list/processing_list, list/hearers) if(!QDELETED(owner)) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 62ba672c..c7ce6577 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -309,11 +309,8 @@ set name = "Examine" set category = "IC" - if(!client) - return - - if(!(SEND_SIGNAL(src, COMSIG_MOB_EXAMINATE, A) & COMPONENT_ALLOW_EXAMINE) && ((client.eye != src && client.eye != loc) || (isturf(A) && !(sight & SEE_TURFS) && !(A in view(client ? client.view : world.view, src))))) - //cameras & co don't allow users to examine far away things, also shift-click catcher may issue examinate() calls for out-of-sight turfs + if(isturf(A) && !(sight & SEE_TURFS) && !(A in view(client ? client.view : world.view, src))) + // shift-click catcher may issue examinate() calls for out-of-sight turfs return if(is_blind(src))