mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 21:56:50 -04:00
Expand configurable period timings and adjust game sounds timing accordingly.
This commit is contained in:
@@ -5,35 +5,41 @@
|
||||
|
||||
package model
|
||||
|
||||
import "github.com/Team254/cheesy-arena/game"
|
||||
|
||||
type EventSettings struct {
|
||||
Id int
|
||||
Name string
|
||||
NumElimAlliances int
|
||||
DurationAuto int
|
||||
DurationTeleop int
|
||||
SelectionRound2Order string
|
||||
SelectionRound3Order string
|
||||
TBADownloadEnabled bool
|
||||
TbaPublishingEnabled bool
|
||||
TbaEventCode string
|
||||
TbaSecretId string
|
||||
TbaSecret string
|
||||
NetworkSecurityEnabled bool
|
||||
ApAddress string
|
||||
ApUsername string
|
||||
ApPassword string
|
||||
ApTeamChannel int
|
||||
ApAdminChannel int
|
||||
ApAdminWpaKey string
|
||||
Ap2Address string
|
||||
Ap2Username string
|
||||
Ap2Password string
|
||||
Ap2TeamChannel int
|
||||
SwitchAddress string
|
||||
SwitchPassword string
|
||||
PlcAddress string
|
||||
AdminPassword string
|
||||
HabDockingThreshold int
|
||||
Id int
|
||||
Name string
|
||||
NumElimAlliances int
|
||||
SelectionRound2Order string
|
||||
SelectionRound3Order string
|
||||
TBADownloadEnabled bool
|
||||
TbaPublishingEnabled bool
|
||||
TbaEventCode string
|
||||
TbaSecretId string
|
||||
TbaSecret string
|
||||
NetworkSecurityEnabled bool
|
||||
ApAddress string
|
||||
ApUsername string
|
||||
ApPassword string
|
||||
ApTeamChannel int
|
||||
ApAdminChannel int
|
||||
ApAdminWpaKey string
|
||||
Ap2Address string
|
||||
Ap2Username string
|
||||
Ap2Password string
|
||||
Ap2TeamChannel int
|
||||
SwitchAddress string
|
||||
SwitchPassword string
|
||||
PlcAddress string
|
||||
AdminPassword string
|
||||
WarmupDurationSec int
|
||||
AutoDurationSec int
|
||||
PauseDurationSec int
|
||||
TeleopDurationSec int
|
||||
Warning1RemainingDurationSec int
|
||||
Warning2RemainingDurationSec int
|
||||
HabDockingThreshold int
|
||||
}
|
||||
|
||||
const eventSettingsId = 0
|
||||
@@ -45,8 +51,6 @@ func (database *Database) GetEventSettings() (*EventSettings, error) {
|
||||
// Database record doesn't exist yet; create it now.
|
||||
eventSettings.Name = "Untitled Event"
|
||||
eventSettings.NumElimAlliances = 8
|
||||
eventSettings.DurationAuto = 15
|
||||
eventSettings.DurationTeleop = 135
|
||||
eventSettings.SelectionRound2Order = "L"
|
||||
eventSettings.SelectionRound3Order = ""
|
||||
eventSettings.TBADownloadEnabled = true
|
||||
@@ -54,6 +58,12 @@ func (database *Database) GetEventSettings() (*EventSettings, error) {
|
||||
eventSettings.ApAdminChannel = 0
|
||||
eventSettings.ApAdminWpaKey = "1234Five"
|
||||
eventSettings.Ap2TeamChannel = 0
|
||||
eventSettings.WarmupDurationSec = game.MatchTiming.WarmupDurationSec
|
||||
eventSettings.AutoDurationSec = game.MatchTiming.AutoDurationSec
|
||||
eventSettings.PauseDurationSec = game.MatchTiming.PauseDurationSec
|
||||
eventSettings.TeleopDurationSec = game.MatchTiming.TeleopDurationSec
|
||||
eventSettings.Warning1RemainingDurationSec = game.MatchTiming.Warning1RemainingDurationSec
|
||||
eventSettings.Warning2RemainingDurationSec = game.MatchTiming.Warning2RemainingDurationSec
|
||||
eventSettings.HabDockingThreshold = 15
|
||||
|
||||
err = database.eventSettingsMap.Insert(eventSettings)
|
||||
|
||||
Reference in New Issue
Block a user