From 22073991ee71dab5683f4cce93268d4bdbab3944 Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Mon, 22 Aug 2016 09:48:58 -0700 Subject: [PATCH] Client windows will now flash in the task bar on incoming adminhelp/adminpm --- code/__HELPERS/game.dm | 5 +++++ code/modules/admin/verbs/adminhelp.dm | 1 + code/modules/admin/verbs/adminpm.dm | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index d31c7dd746b..56cf125ad71 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -470,3 +470,8 @@ new_character.key = G_found.key return new_character + +/proc/window_flash(var/client_or_usr) + if (!client_or_usr) + return + winset(client_or_usr, "mainwindow", "flash=5") diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index af2f21907d6..b36a94aa2a9 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -116,6 +116,7 @@ for(var/client/X in admins) if(X.prefs.toggles & SOUND_ADMINHELP) X << 'sound/effects/adminhelp.ogg' + window_flash(X) X << msg diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index eaa5871adca..0b55145c846 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -176,6 +176,7 @@ for(var/client/X in admins) X << "PM: [key_name(src, X, 0)]->IRC: \blue [keywordparsedmsg]" //inform X else + window_flash(C) log_admin("PM: [key_name(src)]->[key_name(C)]: [rawmsg]") //we don't use message_admins here because the sender/receiver might get it too for(var/client/X in admins) @@ -209,7 +210,7 @@ C << "-- Administrator private message --" C << "Admin PM from-[adminname]: [msg]" C << "Click on the administrator's name to reply." - + window_flash(C) //always play non-admin recipients the adminhelp sound C << 'sound/effects/adminhelp.ogg'