diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm b/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm index 9bfc98a7091d..0990df678f61 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/ability_helper_procs.dm @@ -195,6 +195,10 @@ client.pixel_x = -viewoffset client.pixel_y = 0 + for (var/datum/action/xeno_action/onclick/toggle_long_range/action in actions) + action.on_zoom_in() + return + /mob/living/carbon/xenomorph/proc/zoom_out() if(!client) return diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/facehugger/facehugger_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/facehugger/facehugger_abilities.dm index ee1fed3094a7..d60d292cba25 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/facehugger/facehugger_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/facehugger/facehugger_abilities.dm @@ -17,3 +17,8 @@ freeze_time = 5 freeze_play_sound = FALSE can_be_shield_blocked = TRUE + +/datum/action/xeno_action/onclick/toggle_long_range/facehugger + handles_movement = FALSE + should_delay = FALSE + ability_primacy = XENO_PRIMARY_ACTION_3 diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/facehugger/facehugger_powers.dm b/code/modules/mob/living/carbon/xenomorph/abilities/facehugger/facehugger_powers.dm index 054762b3c7d4..6eef21c6d5af 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/facehugger/facehugger_powers.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/facehugger/facehugger_powers.dm @@ -25,4 +25,22 @@ if(current_airlock.density) //if its CLOSED YOU'RE SCUTTLING AND CANNOT POUNCE!!! to_chat(owner, SPAN_WARNING("We cannot do that while squeezing and scuttling!")) return FALSE + + if(HAS_TRAIT(owner, TRAIT_IMMOBILIZED)) + to_chat(owner, SPAN_WARNING("We cannot do that while immobilized!")) + return FALSE + return ..() + +/datum/action/xeno_action/onclick/toggle_long_range/facehugger/on_zoom_out() + . = ..() + + var/mob/living/carbon/xenomorph/facehugger/facehugger = owner + REMOVE_TRAIT(facehugger, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Long-Range Sight")) + +/datum/action/xeno_action/onclick/toggle_long_range/facehugger/on_zoom_in() + . = ..() + + var/mob/living/carbon/xenomorph/facehugger/facehugger = owner + ADD_TRAIT(facehugger, TRAIT_IMMOBILIZED, TRAIT_SOURCE_ABILITY("Long-Range Sight")) + diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm index f36e23394eef..39b05b964648 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm @@ -329,6 +329,9 @@ xeno.recalculate_speed() button.icon_state = "template" +/datum/action/xeno_action/onclick/toggle_long_range/proc/on_zoom_in() + return + /datum/action/xeno_action/onclick/toggle_long_range/proc/handle_mob_move_or_look(mob/living/carbon/xenomorph/xeno, actually_moving, direction, specific_direction) SIGNAL_HANDLER movement_buffer-- diff --git a/code/modules/mob/living/carbon/xenomorph/strains/castes/facehugger/watcher.dm b/code/modules/mob/living/carbon/xenomorph/strains/castes/facehugger/watcher.dm index 7fba30b6f352..c5e1cff29c63 100644 --- a/code/modules/mob/living/carbon/xenomorph/strains/castes/facehugger/watcher.dm +++ b/code/modules/mob/living/carbon/xenomorph/strains/castes/facehugger/watcher.dm @@ -1,13 +1,13 @@ /datum/xeno_strain/watcher name = FACEHUGGER_WATCHER - description = "You lose your ability to hide in exchange to see further and the ability to no longer take damage outside of weeds. This enables you to stalk your host from a distance and wait for the perfect oppertunity to strike." + description = "You lose your ability to hide in exchange to see further. This enables you to stalk your host from a distance and wait for the perfect oppertunity to strike." flavor_description = "No need to hide when you can see the danger." actions_to_remove = list( /datum/action/xeno_action/onclick/xenohide, ) actions_to_add = list( - /datum/action/xeno_action/onclick/toggle_long_range/runner, + /datum/action/xeno_action/onclick/toggle_long_range/facehugger, ) behavior_delegate_type = /datum/behavior_delegate/facehugger_watcher @@ -19,3 +19,13 @@ // This has no special effects, it's just here to skip `/datum/behavior_delegate/facehugger_base/on_life()`. /datum/behavior_delegate/facehugger_watcher name = "Watcher Facehugger Behavior Delegate" + +/datum/behavior_delegate/facehugger_watcher/on_life() + // Sap health if we're standing, not on weeds, and not zoomed out + if(bound_xeno.body_position != STANDING_UP) + return + if(bound_xeno.is_zoomed) + return + if(locate(/obj/effect/alien/weeds) in get_turf(bound_xeno)) + return + bound_xeno.adjustBruteLoss(1)