mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 13:46:44 -04:00
Give scorekeeper ability to signal field reset and volunteers.
This commit is contained in:
@@ -7,6 +7,7 @@ package web
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/Team254/cheesy-arena-lite/field"
|
||||
"github.com/Team254/cheesy-arena-lite/game"
|
||||
"github.com/Team254/cheesy-arena-lite/model"
|
||||
"github.com/Team254/cheesy-arena-lite/tournament"
|
||||
@@ -243,6 +244,22 @@ func (web *Web) matchPlayWebsocketHandler(w http.ResponseWriter, r *http.Request
|
||||
ws.WriteError(err.Error())
|
||||
continue
|
||||
}
|
||||
case "signalVolunteers":
|
||||
if web.arena.MatchState != field.PostMatch {
|
||||
// Don't allow clearing the field until the match is over.
|
||||
continue
|
||||
}
|
||||
web.arena.FieldVolunteers = true
|
||||
continue // Don't reload.
|
||||
case "signalReset":
|
||||
if web.arena.MatchState != field.PostMatch {
|
||||
// Don't allow clearing the field until the match is over.
|
||||
continue
|
||||
}
|
||||
web.arena.FieldReset = true
|
||||
web.arena.AllianceStationDisplayMode = "fieldReset"
|
||||
web.arena.AllianceStationDisplayModeNotifier.Notify()
|
||||
continue // Don't reload.
|
||||
case "commitResults":
|
||||
err = web.commitCurrentMatchScore()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user