Skip to content

Commit

Permalink
feature: window flash from tegustation
Browse files Browse the repository at this point in the history
Taken from vlggms/tegustation-bay12/pull/412

Thank you, EgorDinamit
  • Loading branch information
SidVeld committed Aug 30, 2023
1 parent 89cf7a2 commit 46f5705
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3239,6 +3239,7 @@
#include "interface\skin.dmf"
#include "maps\_maps.dm"
#include "proxima\code\_helpers\colors.dm"
#include "proxima\code\_helpers\window_flash.dm"
#include "proxima\code\_helpers\_onclick\hud\_defines_ai.dm"
#include "proxima\code\_helpers\_onclick\hud\ai_hud.dm"
#include "proxima\code\_helpers\_onclick\hud\ai_screen_object.dm"
Expand Down
2 changes: 2 additions & 0 deletions code/modules/admin/verbs/adminhelp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ var/global/list/adminhelp_ignored_words = list("unknown","the","a","an","of","mo
T = emoji_parse(msg, X)

to_chat(X, T)

window_flash(X) // PRX
original_msg = emoji_parse(original_msg, src)
//show it to the person adminhelping too
to_chat(src, "<span class=\"staff_pm\">PM to-<b>Staff</b> (<a href='?src=\ref[usr];close_ticket=\ref[ticket]'>CLOSE</a>): [original_msg]</span>")
Expand Down
1 change: 1 addition & 0 deletions code/modules/admin/verbs/adminpm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
receiver_message += ": <span class='message linkify'>[msg_r]</span>"
receiver_message += "</span></span>"
to_chat(C, receiver_message)
window_flash(C) // PRX

//play the receiving admin the adminhelp sound (if they have them enabled)
//non-admins shouldn't be able to disable this
Expand Down
6 changes: 6 additions & 0 deletions proxima/code/_helpers/window_flash.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Taken from vlggms/tegustation-bay12/pull/412

/proc/window_flash(client_or_user)
if (!client_or_user)
return
winset(client_or_user, "mainwindow", "flash=5")

0 comments on commit 46f5705

Please sign in to comment.