From 40d9dee654d9529fc4a13cfd563b22c4ebcb7fae Mon Sep 17 00:00:00 2001 From: deathride58 Date: Thu, 14 Feb 2019 00:01:12 -0500 Subject: [PATCH] gives combat mode examine text and a message on activation (#7995) --- code/modules/mob/living/carbon/examine.dm | 3 +++ modular_citadel/code/modules/mob/living/carbon/carbon.dm | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index 36d26f0faa..c42bd82797 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -88,6 +88,9 @@ if(digitalcamo) msg += "[t_He] [t_is] moving [t_his] body in an unnatural and blatantly unsimian manner.\n" + + if(combatmode) + msg += "[t_He] [t_is] visibly tense[resting ? "." : ", and [t_is] standing in combative stance."]\n" GET_COMPONENT_FROM(mood, /datum/component/mood, src) if(mood) diff --git a/modular_citadel/code/modules/mob/living/carbon/carbon.dm b/modular_citadel/code/modules/mob/living/carbon/carbon.dm index cf5ce03bc7..8d6b4576c9 100644 --- a/modular_citadel/code/modules/mob/living/carbon/carbon.dm +++ b/modular_citadel/code/modules/mob/living/carbon/carbon.dm @@ -3,6 +3,7 @@ var/lastmousedir var/wrongdirmovedelay var/lastdirchange + var/combatmessagecooldown /mob/living/carbon/CanPass(atom/movable/mover, turf/target) . = ..() @@ -27,6 +28,9 @@ if(hud_used && hud_used.static_inventory) for(var/obj/screen/combattoggle/selector in hud_used.static_inventory) selector.rebasetointerbay(src) + if(world.time >= combatmessagecooldown && combatmode) + visible_message("[src] [resting ? "tenses up" : "drops into a combative stance"].") + combatmessagecooldown = 10 SECONDS + world.time //This is set 100% of the time to make sure squeezing regen out of process cycles doesn't result in the combat mode message getting spammed SEND_SIGNAL(src, COMSIG_COMBAT_TOGGLED, src, combatmode) return TRUE