From 8261eb3acc05e7d4119ef81d7b7e4faa6714b8bf Mon Sep 17 00:00:00 2001 From: NotMyWing Date: Mon, 7 Dec 2020 16:48:05 +1100 Subject: [PATCH] Flash the game window on important events --- src/gamemodes/amongus/gamemode/cl_net.moon | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/gamemodes/amongus/gamemode/cl_net.moon b/src/gamemodes/amongus/gamemode/cl_net.moon index df0398b..f9b7bb2 100644 --- a/src/gamemodes/amongus/gamemode/cl_net.moon +++ b/src/gamemodes/amongus/gamemode/cl_net.moon @@ -125,6 +125,8 @@ net.Receive "NMW AU Flow", -> switch net.ReadUInt GAMEMODE.FlowSize if imposter GAMEMODE\HUD_InitializeImposterMap! + system.FlashWindow! + -- -- Display a countdown. -- @@ -132,6 +134,8 @@ net.Receive "NMW AU Flow", -> switch net.ReadUInt GAMEMODE.FlowSize if IsValid GAMEMODE.Hud GAMEMODE\HUD_Countdown net.ReadDouble! + system.FlashWindow! + -- -- Read dead people. This gets sent before the meeting. -- I'm honestly not sure why this isn't a part of the @@ -223,6 +227,8 @@ net.Receive "NMW AU Flow", -> switch net.ReadUInt GAMEMODE.FlowSize GAMEMODE\HUD_DisplayMeeting caller, bodyColor GAMEMODE\HUD_HideTaskList true + system.FlashWindow! + -- -- Meeting 2/4. -- Unlocks voting. @@ -233,6 +239,8 @@ net.Receive "NMW AU Flow", -> switch net.ReadUInt GAMEMODE.FlowSize time = net.ReadDouble! GAMEMODE.Hud.Meeting\OpenDiscuss caller, time + system.FlashWindow! + -- -- Meeting 2/4. -- Makes an "I Voted" icon pop up above the voter. @@ -243,6 +251,8 @@ net.Receive "NMW AU Flow", -> switch net.ReadUInt GAMEMODE.FlowSize remaining = net.ReadUInt 8 GAMEMODE.Hud.Meeting\ApplyVote voter, remaining + system.FlashWindow! + -- -- Meeting 3/4. -- Disables voting. @@ -268,6 +278,8 @@ net.Receive "NMW AU Flow", -> switch net.ReadUInt GAMEMODE.FlowSize GAMEMODE.Hud.Meeting\End results, time + system.FlashWindow! + -- -- Meeting 4/4. -- Eject animation. @@ -296,6 +308,8 @@ net.Receive "NMW AU Flow", -> switch net.ReadUInt GAMEMODE.FlowSize GAMEMODE\HUD_DisplayEject reason, ply, confirm, imposter, remaining, total GAMEMODE\HUD_HideTaskList false + system.FlashWindow! + -- -- React to game states. -- I honestly don't like this. @@ -327,6 +341,8 @@ net.Receive "NMW AU Flow", -> switch net.ReadUInt GAMEMODE.FlowSize GAMEMODE\HUD_DisplayGameOver reason + system.FlashWindow! + -- -- Update the task data. -- Show the message if the task is complete. @@ -392,6 +408,8 @@ net.Receive "NMW AU Flow", -> switch net.ReadUInt GAMEMODE.FlowSize GAMEMODE\HUD_PlayKill killerPlayerTable, localPlayerTable GAMEMODE.GameData.DeadPlayers[localPlayerTable] = true + system.FlashWindow! + -- -- The server has paused our kill cooldown. --