diff --git a/code/datums/components/combat_mode.dm b/code/datums/components/combat_mode.dm index b9952e9133..6e6f6c0ff8 100644 --- a/code/datums/components/combat_mode.dm +++ b/code/datums/components/combat_mode.dm @@ -87,7 +87,8 @@ else to_chat(source, self_message) if(playsound) - source.playsound_local(source, 'sound/misc/ui_toggle.ogg', 50, FALSE, pressure_affected = FALSE) //Sound from interbay! + playsound(source, 'sound/machines/chime.ogg', 10) //sandstorm stuff - combat mode indicator + flick_emote_popup_on_mob(source, "combat", 10) //sandstorm stuff - combat mode indicator RegisterSignal(source, COMSIG_MOB_CLIENT_MOUSEMOVE, .proc/onMouseMove) RegisterSignal(source, COMSIG_MOVABLE_MOVED, .proc/on_move) RegisterSignal(source, COMSIG_MOB_CLIENT_MOVE, .proc/on_client_move) @@ -95,6 +96,8 @@ hud_icon.combat_on = TRUE hud_icon.update_icon() + source.set_combat_indicator(TRUE) //sandstorm stuff - combat mode indicator + /// Disables combat mode. Please use 'safe_disable_combat_mode' instead, if you wish to also disable the toggle flag. /datum/component/combat_mode/proc/disable_combat_mode(mob/living/source, silent = TRUE, forced = TRUE, visible = FALSE, locked = FALSE, playsound = FALSE) if(locked) @@ -122,6 +125,8 @@ source.stop_active_blocking() source.end_parry_sequence() + source.set_combat_indicator(FALSE) //sandstorm stuff - combat mode indicator + ///Changes the user direction to (try) keep match the pointer. /datum/component/combat_mode/proc/on_move(atom/movable/source, dir, atom/oldloc, forced) var/mob/living/L = source diff --git a/sandcode/code/modules/mob/living/combat_indicator.dm b/sandcode/code/modules/mob/living/combat_indicator.dm new file mode 100644 index 0000000000..cb07db9ed3 --- /dev/null +++ b/sandcode/code/modules/mob/living/combat_indicator.dm @@ -0,0 +1,11 @@ +var/static/mutable_appearance/combat_indicator + +/mob/living/proc/set_combat_indicator(var/state) + if(!combat_indicator) + combat_indicator = mutable_appearance('sandcode/icons/mob/combat_indicator.dmi', "combat", FLY_LAYER) + combat_indicator.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA | KEEP_APART + + if(state && stat != DEAD) + add_overlay(combat_indicator) + else + cut_overlay(combat_indicator) diff --git a/sandcode/icons/mob/combat_indicator.dmi b/sandcode/icons/mob/combat_indicator.dmi new file mode 100644 index 0000000000..0fa001c864 Binary files /dev/null and b/sandcode/icons/mob/combat_indicator.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 161389927b..7fd57696c8 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3524,6 +3524,7 @@ #include "sandcode\code\modules\mob\emote.dm" #include "sandcode\code\modules\mob\say.dm" #include "sandcode\code\modules\mob\dead\observer\observer.dm" +#include "sandcode\code\modules\mob\living\combat_indicator.dm" #include "sandcode\code\modules\mob\living\emote.dm" #include "sandcode\code\modules\mob\living\give.dm" #include "sandcode\code\modules\mob\living\say.dm"