mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-29 00:15:42 +00:00
Remove battle progress early return (#7469)
This commit is contained in:
+16
-15
@@ -547,26 +547,27 @@ case class HumanPlayerClientConnectionState(
|
||||
def sendBattleProgress(
|
||||
updatedBattles: Vector[ShardokBattleViewScala],
|
||||
gatedRound: Int
|
||||
): HumanPlayerClientConnectionState = {
|
||||
if updatedBattles.isEmpty then return this
|
||||
send(
|
||||
UpdateStreamResponse(
|
||||
responseDetails = UpdateStreamResponse.ResponseDetails.GameUpdate(
|
||||
GameUpdate(
|
||||
gameId = eagleGameId,
|
||||
startingState = None,
|
||||
gameUpdateDetails = GameUpdateDetails.BattleProgressResponse(
|
||||
BattleProgressResponse(
|
||||
updatedBattles = updatedBattles.map(ShardokBattleViewConverter.toProto),
|
||||
currentDay = gatedRound
|
||||
): HumanPlayerClientConnectionState =
|
||||
if updatedBattles.isEmpty then this
|
||||
else {
|
||||
send(
|
||||
UpdateStreamResponse(
|
||||
responseDetails = UpdateStreamResponse.ResponseDetails.GameUpdate(
|
||||
GameUpdate(
|
||||
gameId = eagleGameId,
|
||||
startingState = None,
|
||||
gameUpdateDetails = GameUpdateDetails.BattleProgressResponse(
|
||||
BattleProgressResponse(
|
||||
updatedBattles = updatedBattles.map(ShardokBattleViewConverter.toProto),
|
||||
currentDay = gatedRound
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
this
|
||||
}
|
||||
this
|
||||
}
|
||||
|
||||
def sendBattleReset(
|
||||
shardokGameId: ShardokGameId
|
||||
|
||||
Reference in New Issue
Block a user