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 ..()