From 19d036d2c246fa5634c34b03b3801c639992c6d1 Mon Sep 17 00:00:00 2001 From: ChocoTaco1 Date: Thu, 4 Mar 2021 14:49:10 -0500 Subject: [PATCH] Alt IFF Color --- Classic/scripts/autoexec/VoteMenu.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Classic/scripts/autoexec/VoteMenu.cs b/Classic/scripts/autoexec/VoteMenu.cs index 2ac11ba..a3b449c 100644 --- a/Classic/scripts/autoexec/VoteMenu.cs +++ b/Classic/scripts/autoexec/VoteMenu.cs @@ -171,6 +171,11 @@ function DefaultGame::sendGameVoteMenu(%game, %client, %key) messageClient(%client, 'MsgVoteItem', "", %key, 'TogglePUGpassword', 'Disable PUG Password', 'Disable PUG Password'); else messageClient(%client, 'MsgVoteItem', "", %key, 'TogglePUGpassword', 'Enable PUG Password', 'Enable PUG Password'); + + if(!$IFFColors) + messageClient(%client, 'MsgVoteItem', "", %key, 'ToggleIFFColors', 'Enable Alt IFF Colors', 'Enable Alt IFF Colors'); + else + messageClient(%client, 'MsgVoteItem', "", %key, 'ToggleIFFColors', 'Disable Alt IFF Colors', 'Disable Alt IFF Colors'); } // if(%multipleTeams) // { @@ -543,6 +548,25 @@ function serverCmdStartNewVote(%client, %typeName, %arg1, %arg2, %arg3, %arg4, % } } return; + case "ToggleIFFColors": + if (%client.isAdmin && $Host::TournamentMode) + { + if(!$IFFColors) + { + // Red Green Blue Alpha - may need some fine tuning + setSensorGroupColor(0, 1 << 1, "0 0 255 255"); + setSensorGroupColor(0, 1 << 2, "255 0 0 255"); + $IFFColors = 1; + } + else + { + // Red Green Blue Alpha - may need some fine tuning + setSensorGroupColor(0, 1 << 1, "0 255 0 255"); + setSensorGroupColor(0, 1 << 2, "255 0 0 255"); + $IFFColors = 0; + } + } + case "ForceVote": if (%client.isAdmin && $Host::AllowAdminVotes) {