diff --git a/code/__DEFINES/~RUtgmc_defines/dsc/signals.dm b/code/__DEFINES/~RUtgmc_defines/dsc/signals.dm index ad346840d947b..d5cff294980a0 100644 --- a/code/__DEFINES/~RUtgmc_defines/dsc/signals.dm +++ b/code/__DEFINES/~RUtgmc_defines/dsc/signals.dm @@ -47,5 +47,8 @@ #define COMSIG_XENOABILITY_CHIMERA_BODYSWAP "xenoability_chimera_bodyswap" #define COMSIG_XENOABILITY_CHIMERA_CRIPPLING_STRIKE "xenoability_chimera_crippling_strike" + +#define COMSIG_XENOABILITY_CRESTTOSS_BEHIND "xenoability_cresttoss_behind" + ///mob/living signals #define COMSIG_HUMAN_DEATH_STAGE_CHANGE "human_death_stage_change" diff --git a/modular_RUtgmc/code/datums/keybinding/xeno.dm b/modular_RUtgmc/code/datums/keybinding/xeno.dm index f53cda7a96ae8..7358ad0b4dd29 100644 --- a/modular_RUtgmc/code/datums/keybinding/xeno.dm +++ b/modular_RUtgmc/code/datums/keybinding/xeno.dm @@ -122,3 +122,15 @@ description = "Leap at your target and knock them down, if you jump close you will hug the target." keybind_signal = COMSING_XENOABILITY_HUGGER_POUNCE hotkey_keys = list("E") + +/datum/keybinding/xeno/cresttoss + name = "cresttoss_away" + full_name = "Crusher: Crest Toss Away" + description = "Fling an adjacent target away from you." + +/datum/keybinding/xeno/cresttoss_behind + name = "cresttoss_behind" + full_name = "Crusher: Crest Toss Behind" + description = "Fling an adjacent target behind you." + keybind_signal = COMSIG_XENOABILITY_CRESTTOSS_BEHIND + hotkey_keys = list("R") diff --git a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/castes/crusher/abilities_crusher.dm b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/castes/crusher/abilities_crusher.dm index 496d04e29048f..780713c59e9be 100644 --- a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/castes/crusher/abilities_crusher.dm +++ b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/castes/crusher/abilities_crusher.dm @@ -38,25 +38,11 @@ return succeed_activate() /datum/action/ability/activable/xeno/cresttoss + name = "Crest Toss Away" action_icon_state = "cresttoss_away" - desc = "Fling an adjacent target either over and behind you, or away from you by toggling the ability. Also works over barricades." + desc = "Fling an adjacent target away from you. Shares the cooldown with the Crest Toss Behind!" var/tossing_away = TRUE - -/datum/action/ability/activable/xeno/cresttoss/action_activate(atom/movable/A) - var/mob/living/carbon/xenomorph/xeno_owner = owner - if(xeno_owner.selected_ability == src) - if(!tossing_away) - tossing_away = TRUE - xeno_owner.balloon_alert(xeno_owner, "Tossing away!") - else - tossing_away = FALSE - xeno_owner.balloon_alert(xeno_owner, "Tossing behind you!") - update_button_icon() - return ..() - -/datum/action/ability/activable/xeno/cresttoss/update_button_icon() - action_icon_state = tossing_away ? "cresttoss_away" : "cresttoss_behind" - return ..() + var/ability_for_cooldown = /datum/action/ability/activable/xeno/cresttoss/behind /datum/action/ability/activable/xeno/cresttoss/use_ability(atom/movable/A) var/mob/living/carbon/xenomorph/X = owner @@ -113,3 +99,17 @@ add_cooldown() addtimer(CALLBACK(X, TYPE_PROC_REF(/mob, update_icons)), 3) + + var/datum/action/ability/xeno_action/toss = X.actions_by_path[ability_for_cooldown] + if(toss) + toss.add_cooldown() + +/datum/action/ability/activable/xeno/cresttoss/behind + name = "Crest Toss Behind" + action_icon_state = "cresttoss_behind" + desc = "Fling an adjacent target behind you. Also works over barricades. Shares the cooldown with the Crest Toss Away!" + keybinding_signals = list( + KEYBINDING_NORMAL = COMSIG_XENOABILITY_CRESTTOSS_BEHIND, + ) + tossing_away = FALSE + ability_for_cooldown = /datum/action/ability/activable/xeno/cresttoss diff --git a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/castes/crusher/castedatum_crusher.dm b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/castes/crusher/castedatum_crusher.dm index d4d50b861b6ae..d3b8467620dc3 100644 --- a/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/castes/crusher/castedatum_crusher.dm +++ b/modular_RUtgmc/code/modules/mob/living/carbon/xenomorph/castes/crusher/castedatum_crusher.dm @@ -10,6 +10,7 @@ /datum/action/ability/activable/xeno/stomp, /datum/action/ability/xeno_action/ready_charge, /datum/action/ability/activable/xeno/cresttoss, + /datum/action/ability/activable/xeno/cresttoss/behind, /datum/action/ability/xeno_action/regenerate_skin/crusher, ) @@ -22,6 +23,7 @@ /datum/action/ability/activable/xeno/stomp, /datum/action/ability/xeno_action/ready_charge, /datum/action/ability/activable/xeno/cresttoss, + /datum/action/ability/activable/xeno/cresttoss/behind, /datum/action/ability/activable/xeno/advance, /datum/action/ability/xeno_action/regenerate_skin/crusher, )