From 11568ad904e4f0e959c8bb5b819f578da3adff28 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 18 Aug 2023 02:14:15 +0200 Subject: [PATCH] [MIRROR] Fixes Xeno Sentinel's Sneak Action Icon + Additional Sneak QoL [MDB IGNORE] (#23169) * Fixes Xeno Sentinel's Sneak Action Icon + Additional Sneak QoL (#77543) ## About The Pull Request This PR fixes the xenomorph sentinel's Sneak ability having an error icon as opposed to the intended appearance. This PR also adds a smooth alpha transition to Sneak as opposed to setting the alpha immediately. Having your alpha drop to its sneak value takes 0.5 seconds, which is fast enough that it really shouldn't matter. This PR also changes sneak's chat message alert to a balloon alert. ## Why It's Good For The Game The icon thing is a bugfix, which is always good. The alpha transitioning instead of being immediately set looks much better in my opinion, I think most would agree on that front. Balloon alerts are our preferred option as opposed to chat alerts now, so its also a good thing to change. ## Changelog :cl: qol: Xenomorph Sentinel and Ambusher Spider's sneak ability now has a transition to a lower alpha as opposed to being immediate. qol: The sneak ability now uses balloon alerts as opposed to chat alerts. fix: Fixed the Xenomorph Sentinel's Sneak ability icon being an error. /:cl: --------- Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com> * Fixes Xeno Sentinel's Sneak Action Icon + Additional Sneak QoL --------- Co-authored-by: IndieanaJones <47086570+IndieanaJones@users.noreply.github.com> Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com> --- code/datums/actions/mobs/sneak.dm | 21 ++++++++++++------- .../spider/giant_spider/giant_spiders.dm | 2 +- .../spider/spider_abilities/web_sneak.dm | 4 ++-- .../young_spider/young_spider_subtypes.dm | 2 +- .../living/carbon/alien/adult/alien_powers.dm | 5 +++-- .../carbon/alien/adult/caste/sentinel.dm | 2 +- 6 files changed, 21 insertions(+), 15 deletions(-) diff --git a/code/datums/actions/mobs/sneak.dm b/code/datums/actions/mobs/sneak.dm index 13ae5a784b8..3fed4f4d500 100644 --- a/code/datums/actions/mobs/sneak.dm +++ b/code/datums/actions/mobs/sneak.dm @@ -1,32 +1,37 @@ -/datum/action/cooldown/sneak +/datum/action/cooldown/mob_cooldown/sneak name = "Sneak" - desc = "Sneak into the enviorment." + desc = "Blend into the environment." button_icon = 'icons/mob/actions/actions_animal.dmi' button_icon_state = "sniper_zoom" background_icon_state = "bg_alien" overlay_icon_state = "bg_alien_border" check_flags = AB_CHECK_CONSCIOUS | AB_CHECK_INCAPACITATED | AB_CHECK_INCAPACITATED + cooldown_time = 0.5 SECONDS + melee_cooldown_time = 0 SECONDS + click_to_activate = FALSE /// The alpha we go to when sneaking. var/sneak_alpha = 75 + /// How long it takes to become transparent + var/animation_time = 0.5 SECONDS -/datum/action/cooldown/sneak/Remove(mob/living/remove_from) +/datum/action/cooldown/mob_cooldown/sneak/Remove(mob/living/remove_from) if(HAS_TRAIT(remove_from, TRAIT_SNEAK)) remove_from.alpha = initial(remove_from.alpha) REMOVE_TRAIT(remove_from, TRAIT_SNEAK, name) return ..() -/datum/action/cooldown/sneak/Activate(atom/target) +/datum/action/cooldown/mob_cooldown/sneak/Activate(atom/target) if(HAS_TRAIT(owner, TRAIT_SNEAK)) // It's safest to go to the initial alpha of the mob. // Otherwise we get permanent invisbility exploits. - owner.alpha = initial(owner.alpha) - to_chat(owner, span_noticealien("You reveal yourself!")) + animate(owner, alpha = initial(owner.alpha), time = animation_time) + owner.balloon_alert(owner, "you reveal yourself") REMOVE_TRAIT(owner, TRAIT_SNEAK, name) else - owner.alpha = sneak_alpha - to_chat(owner, span_noticealien("You blend into the enviorment...")) + animate(owner, alpha = sneak_alpha, time = animation_time) + owner.balloon_alert(owner, "you blend into the environment") ADD_TRAIT(owner, TRAIT_SNEAK, name) return TRUE diff --git a/code/modules/mob/living/basic/space_fauna/spider/giant_spider/giant_spiders.dm b/code/modules/mob/living/basic/space_fauna/spider/giant_spider/giant_spiders.dm index 38294dcf277..6df2eb427f4 100644 --- a/code/modules/mob/living/basic/space_fauna/spider/giant_spider/giant_spiders.dm +++ b/code/modules/mob/living/basic/space_fauna/spider/giant_spider/giant_spiders.dm @@ -49,7 +49,7 @@ AddElement(/datum/element/web_walker, /datum/movespeed_modifier/slow_web) - var/datum/action/cooldown/sneak/spider/sneak_web = new(src) + var/datum/action/cooldown/mob_cooldown/sneak/spider/sneak_web = new(src) sneak_web.Grant(src) /** diff --git a/code/modules/mob/living/basic/space_fauna/spider/spider_abilities/web_sneak.dm b/code/modules/mob/living/basic/space_fauna/spider/spider_abilities/web_sneak.dm index adee0bb0ca0..a70a2c2c5d8 100644 --- a/code/modules/mob/living/basic/space_fauna/spider/spider_abilities/web_sneak.dm +++ b/code/modules/mob/living/basic/space_fauna/spider/spider_abilities/web_sneak.dm @@ -1,5 +1,5 @@ -/datum/action/cooldown/sneak/spider - name = "Sneak" +/datum/action/cooldown/mob_cooldown/sneak/spider + name = "Ambush Spider Sneak" desc = "Blend into the webs to stalk your prey." button_icon = 'icons/mob/actions/actions_animal.dmi' button_icon_state = "web_sneak" diff --git a/code/modules/mob/living/basic/space_fauna/spider/young_spider/young_spider_subtypes.dm b/code/modules/mob/living/basic/space_fauna/spider/young_spider/young_spider_subtypes.dm index 4e100fc0af4..f5d128e41b7 100644 --- a/code/modules/mob/living/basic/space_fauna/spider/young_spider/young_spider_subtypes.dm +++ b/code/modules/mob/living/basic/space_fauna/spider/young_spider/young_spider_subtypes.dm @@ -27,7 +27,7 @@ /mob/living/basic/spider/growing/young/ambush/Initialize(mapload) . = ..() - var/datum/action/cooldown/sneak/spider/sneak_web = new(src) + var/datum/action/cooldown/mob_cooldown/sneak/spider/sneak_web = new(src) sneak_web.Grant(src) /// Will differentiate into the "scout" giant spider. diff --git a/code/modules/mob/living/carbon/alien/adult/alien_powers.dm b/code/modules/mob/living/carbon/alien/adult/alien_powers.dm index 133f9c394f8..e686c920b58 100644 --- a/code/modules/mob/living/carbon/alien/adult/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/adult/alien_powers.dm @@ -343,10 +343,11 @@ Doesn't work on other aliens/AI.*/ new choice_path(owner.loc) return TRUE -/datum/action/cooldown/sneak/alien - name = "Sneak" +/datum/action/cooldown/mob_cooldown/sneak/alien + name = "Alien Sentinel Sneak" panel = "Alien" desc = "Blend into the shadows to stalk your prey." + button_icon = 'icons/mob/actions/actions_xeno.dmi' button_icon_state = "alien_sneak" background_icon_state = "bg_alien" overlay_icon_state = "bg_alien_border" diff --git a/code/modules/mob/living/carbon/alien/adult/caste/sentinel.dm b/code/modules/mob/living/carbon/alien/adult/caste/sentinel.dm index 6b6f370388a..7fffdf35522 100644 --- a/code/modules/mob/living/carbon/alien/adult/caste/sentinel.dm +++ b/code/modules/mob/living/carbon/alien/adult/caste/sentinel.dm @@ -7,7 +7,7 @@ alien_speed = 0.2 /mob/living/carbon/alien/adult/sentinel/Initialize(mapload) - var/datum/action/cooldown/sneak/alien/sneaky_beaky = new(src) + var/datum/action/cooldown/mob_cooldown/sneak/alien/sneaky_beaky = new(src) sneaky_beaky.Grant(src) return ..()