combat indicator

This commit is contained in:
Enric Gabriel
2020-07-11 19:47:48 -03:00
parent 232c39d1e4
commit bf39a91205
4 changed files with 18 additions and 1 deletions
+6 -1
View File
@@ -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
@@ -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)
Binary file not shown.

After

Width:  |  Height:  |  Size: 880 B

+1
View File
@@ -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"