mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Make attack anims a preference
This commit is contained in:
@@ -111,6 +111,12 @@ var/list/_client_preferences_by_type
|
||||
enabled_description = "Show"
|
||||
disabled_description = "Hide"
|
||||
|
||||
/datum/client_preference/attack_icons
|
||||
description ="Attack icons"
|
||||
key = "ATTACK_ICONS"
|
||||
enabled_description = "Show"
|
||||
disabled_description = "Hide"
|
||||
|
||||
/datum/client_preference/show_typing_indicator
|
||||
description ="Typing indicator"
|
||||
key = "SHOW_TYPING"
|
||||
|
||||
@@ -196,7 +196,14 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
I = image(attack_icon, A, attack_icon_state, A.layer + 1)
|
||||
I.dir = dir
|
||||
|
||||
flick_overlay_view(I, A, 5, TRUE) // 5 ticks/half a second
|
||||
//Check for clients with pref enabled
|
||||
var/list/viewing = list()
|
||||
for(var/m in viewers(A))
|
||||
var/mob/M = m
|
||||
var/client/C = M.client
|
||||
if(C && C.is_preference_enabled(/datum/client_preference/attack_icons))
|
||||
viewing += M.client
|
||||
flick_overlay(I, viewing, 5, TRUE) // 5 ticks/half a second
|
||||
|
||||
// Set the direction of the icon animation.
|
||||
var/direction = get_dir(src, A)
|
||||
|
||||
Reference in New Issue
Block a user