diff --git a/field/arena.go b/field/arena.go
index a4226dd4..051dc4ed 100644
--- a/field/arena.go
+++ b/field/arena.go
@@ -77,6 +77,7 @@ type Arena struct {
SavedRankings game.Rankings
AllianceStationDisplayMode string
AllianceSelectionAlliances []model.Alliance
+ AllianceSelectionRankedTeams []model.AllianceSelectionRankedTeam
AllianceSelectionShowTimer bool
AllianceSelectionTimeRemainingSec int
PlayoffTournament *playoff.PlayoffTournament
diff --git a/field/arena_notifiers.go b/field/arena_notifiers.go
index 0c32979c..17f6119d 100644
--- a/field/arena_notifiers.go
+++ b/field/arena_notifiers.go
@@ -69,10 +69,12 @@ func (arena *Arena) generateAllianceSelectionMessage() any {
Alliances []model.Alliance
ShowTimer bool
TimeRemainingSec int
+ RankedTeams []model.AllianceSelectionRankedTeam
}{
arena.AllianceSelectionAlliances,
arena.AllianceSelectionShowTimer,
arena.AllianceSelectionTimeRemainingSec,
+ arena.AllianceSelectionRankedTeams,
}
}
diff --git a/model/alliance.go b/model/alliance.go
index b627e5c9..de733db4 100644
--- a/model/alliance.go
+++ b/model/alliance.go
@@ -13,6 +13,12 @@ type Alliance struct {
Lineup [3]int
}
+type AllianceSelectionRankedTeam struct {
+ Rank int
+ TeamId int
+ Picked bool
+}
+
func (database *Database) CreateAlliance(alliance *Alliance) error {
return database.allianceTable.create(alliance)
}
diff --git a/model/event_settings.go b/model/event_settings.go
index a34aa042..fd87c1ca 100644
--- a/model/event_settings.go
+++ b/model/event_settings.go
@@ -21,6 +21,7 @@ type EventSettings struct {
NumPlayoffAlliances int
SelectionRound2Order string
SelectionRound3Order string
+ SelectionShowUnpickedTeams bool
TbaDownloadEnabled bool
TbaPublishingEnabled bool
TbaEventCode string
@@ -70,6 +71,7 @@ func (database *Database) GetEventSettings() (*EventSettings, error) {
NumPlayoffAlliances: 8,
SelectionRound2Order: "L",
SelectionRound3Order: "",
+ SelectionShowUnpickedTeams: false,
TbaDownloadEnabled: true,
ApChannel: 36,
WarmupDurationSec: game.MatchTiming.WarmupDurationSec,
diff --git a/static/css/audience_display.css b/static/css/audience_display.css
index f463f0d5..a1c02d2e 100644
--- a/static/css/audience_display.css
+++ b/static/css/audience_display.css
@@ -553,6 +553,37 @@ html {
max-width: 800px;
max-height: 400px;
}
+#allianceRankingsCentering {
+ position: absolute;
+ height: 100%;
+ left: 3em;
+ top: 3em;
+}
+#allianceRankings {
+ max-width: 11em;
+ max-height: 92%;
+ display: flex;
+ flex-flow: column wrap;
+ overflow: hidden;
+ background-color: #fff;
+ border: 2px solid #222;
+ font-size: 2em;
+ font-family: "FuturaLT";
+}
+.unpicked {
+ width: 5.5em;
+ display: flex;
+ justify-content: start;
+}
+.unpicked-rank {
+ width: 1.8em;
+ text-align: right;
+ color: #999;
+}
+.unpicked-team {
+ margin-left: 0.3em;
+ color: #222;
+}
#allianceSelectionCentering {
position: absolute;
height: 100%;
diff --git a/static/js/audience_display.js b/static/js/audience_display.js
index cf4bbb4c..688732ed 100644
--- a/static/js/audience_display.js
+++ b/static/js/audience_display.js
@@ -328,6 +328,7 @@ const handlePlaySound = function(sound) {
// Handles a websocket message to update the alliance selection screen.
const handleAllianceSelection = function(data) {
const alliances = data.Alliances;
+ const rankedTeams = data.RankedTeams;
if (alliances && alliances.length > 0) {
const numColumns = alliances[0].TeamIds.length + 1;
$.each(alliances, function(k, v) {
@@ -335,6 +336,16 @@ const handleAllianceSelection = function(data) {
});
$("#allianceSelection").html(allianceSelectionTemplate({alliances: alliances, numColumns: numColumns}));
}
+ if (rankedTeams) {
+ let text = "";
+ $.each(rankedTeams, function(i, v) {
+ if (!v.Picked) {
+ text += `
${v.Rank}.
` +
+ `
${v.TeamId}
`;
+ }
+ });
+ $("#allianceRankings").html(text);
+ }
if (data.ShowTimer) {
$("#allianceSelectionTimer").text(getCountdownString(data.TimeRemainingSec));
@@ -373,11 +384,14 @@ const handleLowerThird = function(data) {
const transitionAllianceSelectionToBlank = function(callback) {
$('#allianceSelectionCentering').transition({queue: false, right: "-60em"}, 500, "ease", callback);
+ $('#allianceRankingsCentering.enabled').transition({queue:false, left: "-60em"}, 500, "ease");
};
const transitionBlankToAllianceSelection = function(callback) {
$('#allianceSelectionCentering').css("right","-60em").show();
$('#allianceSelectionCentering').transition({queue: false, right: "3em"}, 500, "ease", callback);
+ $('#allianceRankingsCentering.enabled').css("left", "-60em").show();
+ $('#allianceRankingsCentering.enabled').transition({queue: false, left: "3em"}, 500, "ease");
};
const transitionBlankToBracket = function(callback) {
diff --git a/templates/audience_display.html b/templates/audience_display.html
index c7aa2cf7..f8688649 100644
--- a/templates/audience_display.html
+++ b/templates/audience_display.html
@@ -242,6 +242,9 @@
+
diff --git a/templates/setup_settings.html b/templates/setup_settings.html
index cf6df401..68314713 100644
--- a/templates/setup_settings.html
+++ b/templates/setup_settings.html
@@ -97,6 +97,15 @@
+
+
+
+
+
+