Skip to content

Commit

Permalink
Flash the game window on important events
Browse files Browse the repository at this point in the history
  • Loading branch information
NotMyWing committed Dec 7, 2020
1 parent 8ebbcd9 commit 8261eb3
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/gamemodes/amongus/gamemode/cl_net.moon
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,17 @@ net.Receive "NMW AU Flow", -> switch net.ReadUInt GAMEMODE.FlowSize
if imposter
GAMEMODE\HUD_InitializeImposterMap!

system.FlashWindow!

--
-- Display a countdown.
--
when GAMEMODE.FlowTypes.GameCountdown
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
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
--
Expand Down

0 comments on commit 8261eb3

Please sign in to comment.