diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_abilities.dm index 0c9358119def..2facee1edc9d 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/lurker/lurker_abilities.dm @@ -30,20 +30,20 @@ if (istype(lurker_invis)) lurker_invis.invisibility_off() -/datum/action/xeno_action/activable/pounce/lurker/additional_effects(mob/living/L) - var/mob/living/carbon/xenomorph/X = owner - if (!istype(X)) +/datum/action/xeno_action/activable/pounce/lurker/additional_effects(mob/living/living_mob) + var/mob/living/carbon/xenomorph/xeno = owner + if (!istype(xeno)) return - if (X.mutation_type == LURKER_NORMAL) - RegisterSignal(X, COMSIG_XENO_SLASH_ADDITIONAL_EFFECTS_SELF, PROC_REF(remove_freeze), TRUE) // Suppresses runtime ever we pounce again before slashing + if (xeno.mutation_type == LURKER_NORMAL) + RegisterSignal(xeno, COMSIG_XENO_SLASH_ADDITIONAL_EFFECTS_SELF, PROC_REF(remove_freeze), TRUE) // Suppresses runtime ever we pounce again before slashing -/datum/action/xeno_action/activable/pounce/lurker/proc/remove_freeze(mob/living/carbon/xenomorph/X) +/datum/action/xeno_action/activable/pounce/lurker/proc/remove_freeze(mob/living/carbon/xenomorph/xeno) SIGNAL_HANDLER - var/datum/behavior_delegate/lurker_base/BD = X.behavior_delegate - if (istype(BD)) - UnregisterSignal(X, COMSIG_XENO_SLASH_ADDITIONAL_EFFECTS_SELF) + var/datum/behavior_delegate/lurker_base/behaviour_del = xeno.behavior_delegate + if (istype(behaviour_del)) + UnregisterSignal(xeno, COMSIG_XENO_SLASH_ADDITIONAL_EFFECTS_SELF) end_pounce_freeze() /datum/action/xeno_action/onclick/lurker_invisibility diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm b/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm index 315f8abf023a..1c7ba8503d4d 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm @@ -84,7 +84,7 @@ target_carbon.set_effect(get_xeno_stun_duration(target_carbon, 3), SUPERSLOW) next_slash_buffed = FALSE var/datum/action/xeno_action/onclick/lurker_assassinate/ability = get_xeno_action_by_type(bound_xeno, /datum/action/xeno_action/onclick/lurker_assassinate) - if (ability && istype(ability)) + if (ability) ability.button.icon_state = "template" return original_damage @@ -110,22 +110,22 @@ /datum/behavior_delegate/lurker_base/melee_attack_additional_effects_self() ..() - var/datum/action/xeno_action/onclick/lurker_invisibility/LIA = get_xeno_action_by_type(bound_xeno, /datum/action/xeno_action/onclick/lurker_invisibility) - if (LIA && istype(LIA)) - LIA.invisibility_off() + var/datum/action/xeno_action/onclick/lurker_invisibility/lurker_invis_action = get_xeno_action_by_type(bound_xeno, /datum/action/xeno_action/onclick/lurker_invisibility) + if (lurker_invis_action) + lurker_invis_action.invisibility_off() /datum/behavior_delegate/lurker_base/proc/decloak_handler(mob/source) SIGNAL_HANDLER - var/datum/action/xeno_action/onclick/lurker_invisibility/LIA = get_xeno_action_by_type(bound_xeno, /datum/action/xeno_action/onclick/lurker_invisibility) - if(istype(LIA)) - LIA.invisibility_off() + var/datum/action/xeno_action/onclick/lurker_invisibility/lurker_invis_action = get_xeno_action_by_type(bound_xeno, /datum/action/xeno_action/onclick/lurker_invisibility) + if(istype(lurker_invis_action)) + lurker_invis_action.invisibility_off() // What to do when we go invisible /datum/behavior_delegate/lurker_base/proc/on_invisibility() - var/datum/action/xeno_action/activable/pounce/lurker/LPA = get_xeno_action_by_type(bound_xeno, /datum/action/xeno_action/activable/pounce/lurker) - if (LPA && istype(LPA)) - LPA.knockdown = TRUE // pounce knocks down - LPA.freeze_self = TRUE + var/datum/action/xeno_action/activable/pounce/lurker/lurker_pounce_action = get_xeno_action_by_type(bound_xeno, /datum/action/xeno_action/activable/pounce/lurker) + if (lurker_pounce_action) + lurker_pounce_action.knockdown = TRUE // pounce knocks down + lurker_pounce_action.freeze_self = TRUE ADD_TRAIT(bound_xeno, TRAIT_CLOAKED, TRAIT_SOURCE_ABILITY("cloak")) RegisterSignal(bound_xeno, COMSIG_MOB_EFFECT_CLOAK_CANCEL, PROC_REF(decloak_handler)) bound_xeno.stealth = TRUE @@ -133,10 +133,10 @@ invis_start_time = world.time /datum/behavior_delegate/lurker_base/proc/on_invisibility_off() - var/datum/action/xeno_action/activable/pounce/lurker/LPA = get_xeno_action_by_type(bound_xeno, /datum/action/xeno_action/activable/pounce/lurker) - if (LPA && istype(LPA)) - LPA.knockdown = FALSE // pounce no longer knocks down - LPA.freeze_self = FALSE + var/datum/action/xeno_action/activable/pounce/lurker/lurker_pounce_action = get_xeno_action_by_type(bound_xeno, /datum/action/xeno_action/activable/pounce/lurker) + if (lurker_pounce_action) + lurker_pounce_action.knockdown = FALSE // pounce no longer knocks down + lurker_pounce_action.freeze_self = FALSE bound_xeno.stealth = FALSE REMOVE_TRAIT(bound_xeno, TRAIT_CLOAKED, TRAIT_SOURCE_ABILITY("cloak")) UnregisterSignal(bound_xeno, COMSIG_MOB_EFFECT_CLOAK_CANCEL) @@ -153,9 +153,9 @@ can_go_invisible = TRUE if(bound_xeno) - var/datum/action/xeno_action/onclick/lurker_invisibility/LIA = get_xeno_action_by_type(bound_xeno, /datum/action/xeno_action/onclick/lurker_invisibility) - if(LIA && istype(LIA)) - LIA.end_cooldown() + var/datum/action/xeno_action/onclick/lurker_invisibility/lurker_invisibility_action = get_xeno_action_by_type(bound_xeno, /datum/action/xeno_action/onclick/lurker_invisibility) + if(lurker_invisibility_action) + lurker_invisibility_action.end_cooldown() /datum/behavior_delegate/lurker_base/append_to_stat() . = list()