Skip to content

Commit 8ecccc2

Browse files
committed
Fix test failures related to recent protobuf update
1 parent 831a6ab commit 8ecccc2

File tree

5 files changed

+4
-9
lines changed

5 files changed

+4
-9
lines changed

internal/app/api/server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ func NewServerConnection(gcEngine *engine.Engine, conn *websocket.Conn) (s *Serv
4343
s.conn = conn
4444
s.gcEngine = gcEngine
4545
s.lastProtocolId = -1
46+
s.marshaler.EmitDefaults = true
4647
return
4748
}
4849

internal/app/state/state.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ func NewState() (s *State) {
2727
s.TeamState[Team_BLUE.String()] = newTeamInfo()
2828
*s.TeamState[Team_BLUE.String()].OnPositiveHalf = !*s.TeamState[Team_YELLOW.String()].OnPositiveHalf
2929

30-
s.GameEvents = []*GameEvent{}
31-
s.ProposedGameEvents = []*ProposedGameEvent{}
32-
3330
*s.Division = State_DIV_A
3431
*s.FirstKickoffTeam = Team_YELLOW
3532
*s.AutoContinue = true

internal/app/state/teaminfo.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ func newTeamInfo() (t *TeamInfo) {
1111
t.Name = new(string)
1212
t.Goals = new(int32)
1313
t.Goalkeeper = new(int32)
14-
t.YellowCards = []*YellowCard{}
15-
t.RedCards = []*RedCard{}
1614
t.TimeoutsLeft = new(int32)
1715
t.TimeoutTimeLeft = new(duration.Duration)
1816
t.OnPositiveHalf = new(bool)
19-
t.Fouls = []*Foul{}
2017
t.BallPlacementFailures = new(int32)
2118
t.BallPlacementFailuresReached = new(bool)
2219
t.CanPlaceBall = new(bool)

internal/app/statemachine/change_command.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ func (s *StateMachine) processChangeNewCommand(newState *state.State, newCommand
3636
}
3737

3838
// reset game events and proposals
39-
newState.ProposedGameEvents = []*state.ProposedGameEvent{}
40-
newState.GameEvents = []*state.GameEvent{}
39+
newState.ProposedGameEvents = nil
40+
newState.GameEvents = nil
4141

4242
// reset ball placement pos and follow ups
4343
newState.PlacementPos = nil

src/components/control/ControlFlowBar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
}
9191
},
9292
continueButtonClass() {
93-
if (!this.$store.state.gcState.hasOwnProperty('readyToContinue')) {
93+
if (this.$store.state.gcState.readyToContinue === null) {
9494
return '';
9595
}
9696
if (this.$store.state.gcState.readyToContinue) {

0 commit comments

Comments
 (0)