diff --git a/code/__DEFINES/dcs/signals/signals_keybindings.dm b/code/__DEFINES/dcs/signals/signals_keybindings.dm index e7e7986c6dc63..f45136e852d18 100644 --- a/code/__DEFINES/dcs/signals/signals_keybindings.dm +++ b/code/__DEFINES/dcs/signals/signals_keybindings.dm @@ -315,6 +315,7 @@ #define COMSIG_XENOABILITY_BEHEMOTH_ROLL "xenoability_behemoth_roll" #define COMSIG_XENOABILITY_LANDSLIDE "xenoability_landslide" +#define COMSIG_XENOABILITY_CANCEL_LANDSLIDE "xenoability_cancel_landslide" #define COMSIG_XENOABILITY_EARTH_RISER "xenoability_earth_riser" #define COMSIG_XENOABILITY_EARTH_RISER_ALTERNATE "xenoability_earth_riser_alternate" #define COMSIG_XENOABILITY_EARTH_PILLAR_THROW "xenoability_earth_pillar_throw" diff --git a/code/datums/keybinding/xeno.dm b/code/datums/keybinding/xeno.dm index 0d3b5a9d1259b..2c5070dc8573c 100644 --- a/code/datums/keybinding/xeno.dm +++ b/code/datums/keybinding/xeno.dm @@ -1115,6 +1115,12 @@ description = "Rush forward in the selected direction, damaging enemies caught in a wide path." keybind_signal = COMSIG_XENOABILITY_LANDSLIDE +/datum/keybinding/xeno/cancel_landslide + name = "Cancel Landslide" + full_name = "Behemoth: Cancel Landslide" + description = "Cancels landslide without having to select the ability" + keybind_signal = COMSIG_XENOABILITY_CANCEL_LANDSLIDE + /datum/keybinding/xeno/earth_riser name = "Earth Riser" full_name = "Behemoth: Earth Riser" diff --git a/code/modules/mob/living/carbon/xenomorph/castes/behemoth/abilities_behemoth.dm b/code/modules/mob/living/carbon/xenomorph/castes/behemoth/abilities_behemoth.dm index da29cb15fe9d5..ff552f5a3e357 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/behemoth/abilities_behemoth.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/behemoth/abilities_behemoth.dm @@ -236,6 +236,7 @@ target_flags = ABILITY_TURF_TARGET keybinding_signals = list( KEYBINDING_NORMAL = COMSIG_XENOABILITY_LANDSLIDE, + KEYBINDING_ALTERNATE = COMSIG_XENOABILITY_CANCEL_LANDSLIDE, ) /// Whether this ability is currently active or not. var/ability_active = FALSE @@ -244,6 +245,10 @@ /// The maximum amount of charges we can have. var/maximum_charges = 1 +/datum/action/ability/activable/xeno/landslide/alternate_action_activate() + if(can_use_ability(null, FALSE, ABILITY_IGNORE_SELECTED_ABILITY)) + INVOKE_ASYNC(src, PROC_REF(use_ability)) + /datum/action/ability/activable/xeno/landslide/give_action(mob/living/L) . = ..() var/mutable_appearance/counter_maptext = mutable_appearance(icon = null, icon_state = null, layer = ACTION_LAYER_MAPTEXT)