Skip to content

Commit

Permalink
Reverts the color changes introduced by FAForever#3763 and FAForever#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Garanas authored Apr 17, 2022
1 parent dc44ddd commit 2c8118a
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 48 deletions.
89 changes: 44 additions & 45 deletions lua/GameColors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,57 +6,56 @@ GameColors = {

-- Default color order used for lobbies/TMM if not otherwise specified. Tightly coupled
-- with the ArmyColors and the PlayerColors tables.
DefaultColorOrder = {2, 11, 1, 8, 5, 12, 22, 15, 20, 10, 3, 14, 21, 7, 16, 13},
LobbyColorOrder = { 12, 1, 13, 2, 16, 3, 11, 6, 14, 15, 17, 5, 4, 10, 9, 8, 7, 18, 19 }, -- warm vs cold
TMMColorOrder = { 12, 1, 13, 2, 16, 3, 11, 6, 14, 15, 17, 5, 4, 10, 9, 8, 7, 18, 19 }, -- warm vs cold

-- If you end up working with this file, suggestion to install the Color Highlight extension:
-- - https://marketplace.visualstudio.com/items?itemName=naumovs.color-highlight
-- and temporarily pre-append a # to each color :)

-- Faction colours
ArmyColors = {
"FF2929e1", -- UEF blue
"ff436eee", -- new blue1
"ff1a9ba2", -- dark cyan
"ff6fa8dc", -- sky blue
"ff9161ff", -- purple
"FF5F01A7", -- dark purple
"ff920092", -- rich purple
"ff901427", -- dark red
"ffff88ff", -- pink
"ffff32ff", -- new fuschia
"FFe80a0a", -- Cybran red
"FFFF873E", -- Nomads orange
"ffb76518", -- new brown
"ffa79602", -- Sera golden
"fffafa00", -- new yellow
"ffffffff", -- white
"ff616d7e", -- grey
"FF2F4F4F", -- olive (dark green)
"ff2e8b57", -- new green
"ff40bf40", -- mid green
"ff9fd802", -- Order Green
"ff66ffcc", -- aqua
"e80a0a", -- Cybran red
"901427", -- dark red
"FF873E", -- Nomads orange
"b76518", -- new brown
"a79602", -- Sera golden
"fafa00", -- new yellow
"9fd802", -- Order Green
"40bf40", -- mid green
"2e8b57", -- new green
"2F4F4F", -- olive (dark green)
"66ffcc", -- aqua
"436eee", -- new blue1
"2929e1", -- UEF blue
"ff88ff", -- pink
"ff32ff", -- new fuschia
"9161ff", -- purple
"5F01A7", -- dark purple
"616d7e", -- grey
"ffffff", -- white
},

PlayerColors = {
"FF2929e1", -- UEF blue
"ff436eee", -- new blue1
"ff1a9ba2", -- dark cyan
"ff6fa8dc", -- sky blue
"ff9161ff", -- purple
"FF5F01A7", -- dark purple
"ff920092", -- rich purple
"ff901427", -- dark red
"ffff88ff", -- pink
"ffff32ff", -- new fuschia
"FFe80a0a", -- Cybran red
"FFFF873E", -- Nomads orange
"ffb76518", -- new brown
"ffa79602", -- Sera golden
"fffafa00", -- new yellow
"ffffffff", -- white
"ff616d7e", -- grey
"FF2F4F4F", -- olive (dark green)
"ff2e8b57", -- new green
"ff40bf40", -- mid green
"ff9fd802", -- Order Green
"ff66ffcc", -- aqua
"e80a0a", -- Cybran red
"901427", -- dark red
"FF873E", -- Nomads orange
"b76518", -- new brown
"a79602", -- Sera golden
"fafa00", -- new yellow
"9fd802", -- Order Green
"40bf40", -- mid green
"2e8b57", -- new green
"2F4F4F", -- olive (dark green)
"66ffcc", -- aqua
"436eee", -- new blue1
"2929e1", -- UEF blue
"ff88ff", -- pink
"ff32ff", -- new fuschia
"9161ff", -- purple
"5F01A7", -- dark purple
"616d7e", -- grey
"ffffff", -- white
},

TeamColorMode = {
Expand Down
2 changes: 1 addition & 1 deletion lua/ui/lobby/autolobby.lua
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ local function HostAddPlayer(senderId, playerInfo)

playerInfo.PlayerName = lobbyComm:MakeValidPlayerName(playerInfo.OwnerID,playerInfo.PlayerName)
-- TODO: Should colors be based on teams?
playerInfo.PlayerColor = gameColors.DefaultColorOrder[slot]
playerInfo.PlayerColor = gameColors.TMMColorOrder[slot]

gameInfo.PlayerOptions[slot] = playerInfo
end
Expand Down
4 changes: 2 additions & 2 deletions lua/ui/lobby/lobby.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2522,8 +2522,8 @@ end

function GetAvailableColor()
for i = 1, LobbyComm.maxPlayerSlots do
if IsColorFree(gameColors.DefaultColorOrder[i]) then
return gameColors.DefaultColorOrder[i]
if IsColorFree(gameColors.LobbyColorOrder[i]) then
return gameColors.LobbyColorOrder[i]
end
end
WARN('Error: No available colors found.')
Expand Down

0 comments on commit 2c8118a

Please sign in to comment.