mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 13:46:44 -04:00
Add sound when match result is shown (closes #120).
This commit is contained in:
@@ -283,22 +283,20 @@ func (web *Web) matchPlayWebsocketHandler(w http.ResponseWriter, r *http.Request
|
||||
}
|
||||
continue // Skip sending the status update, as the client is about to terminate and reload.
|
||||
case "setAudienceDisplay":
|
||||
screen, ok := data.(string)
|
||||
mode, ok := data.(string)
|
||||
if !ok {
|
||||
ws.WriteError(fmt.Sprintf("Failed to parse '%s' message.", messageType))
|
||||
continue
|
||||
}
|
||||
web.arena.AudienceDisplayMode = screen
|
||||
web.arena.AudienceDisplayModeNotifier.Notify()
|
||||
web.arena.SetAudienceDisplayMode(mode)
|
||||
continue
|
||||
case "setAllianceStationDisplay":
|
||||
screen, ok := data.(string)
|
||||
mode, ok := data.(string)
|
||||
if !ok {
|
||||
ws.WriteError(fmt.Sprintf("Failed to parse '%s' message.", messageType))
|
||||
continue
|
||||
}
|
||||
web.arena.AllianceStationDisplayMode = screen
|
||||
web.arena.AllianceStationDisplayModeNotifier.Notify()
|
||||
web.arena.SetAllianceStationDisplayMode(mode)
|
||||
continue
|
||||
case "startTimeout":
|
||||
durationSec, ok := data.(float64)
|
||||
|
||||
Reference in New Issue
Block a user