Skip to content

Commit 5c27b42

Browse files
committed
[feature] Add a hint to the game event table when Halt sent
1 parent 1df758d commit 5c27b42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/app/controller/engine.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,16 @@ func (e *Engine) Continue() {
221221
Type: GameEventBotSubstitution,
222222
Details: GameEventDetails{
223223
BotSubstitution: &refproto.GameEvent_BotSubstitution{ByTeam: &teamProto}}})
224+
e.LogHint("botSubstitution", "game halted for bot substitution", substitutionIntend)
224225
e.SendCommand(CommandHalt, "")
225226
} else if e.State.NextCommand != CommandUnknown {
226227
e.SendCommand(e.State.NextCommand, e.State.NextCommandFor)
227228
} else {
228-
log.Println("No next command available to continue with. Halting game.")
229229
if e.State.Command != CommandStop {
230230
// halt the game, if not in STOP.
231231
// Rational: After ball placement and no next command, halt the game to indicate that manual action is required
232232
// If in STOP, that was most likely triggered manually already and a suddenly halted game might be confusing and not intended
233+
e.LogHint("missingFollowUp", "No next command available", TeamUnknown)
233234
e.SendCommand(CommandHalt, "")
234235
}
235236
}

0 commit comments

Comments
 (0)