Skip to content

Commit e3f795c

Browse files
authored
Server message to apply player's vetoes (#201)
1 parent eae00ef commit e3f795c

4 files changed

Lines changed: 14 additions & 1 deletion

File tree

api/src/main/java/com/faforever/commons/api/dto/MatchmakerQueue.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public class MatchmakerQueue extends AbstractEntity<MatchmakerQueue> {
1515
private String technicalName;
1616
@ToString.Include
1717
private String nameKey;
18+
@ToString.Include
19+
private Integer teamSize;
1820

1921
@Relationship("featuredMod")
2022
private FeaturedMod featuredMod;

lobby/src/main/kotlin/com/faforever/commons/lobby/ConnectionApi.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ data class NoticeInfo(
5454
val text: String?,
5555
) : ServerMessage
5656

57+
/**
58+
* A message from the server (automated) to update vetoes of the user.
59+
*/
60+
data class VetoesChangedInfo(
61+
val forced: Boolean,
62+
val vetoes: List <VetoData>
63+
) : ServerMessage
64+
5765
/**
5866
* Error response from server when joining a game.
5967
*/

lobby/src/main/kotlin/com/faforever/commons/lobby/FafLobbyApi.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ interface ClientMessage : LobbyProtocolMessage
6767
JsonSubTypes.Type(value = SocialInfo::class, name = "social"),
6868
JsonSubTypes.Type(value = LoginFailedResponse::class, name = "authentication_failed"),
6969
JsonSubTypes.Type(value = NoticeInfo::class, name = "notice"),
70+
JsonSubTypes.Type(value = VetoesChangedInfo::class, name = "vetoes_info"),
7071
JsonSubTypes.Type(value = GameJoinFailed::class, name = "game_join_failed"),
7172
JsonSubTypes.Type(value = IceServerListResponse::class, name = "ice_servers"),
7273
JsonSubTypes.Type(value = AvatarListInfo::class, name = "avatar"),

lobby/src/main/kotlin/com/faforever/commons/lobby/MatchmakerApi.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ data class VetoData(
4646
@JsonProperty("map_pool_map_version_id")
4747
val mapPoolMapVersionId: Int,
4848
@JsonProperty("veto_tokens_applied")
49-
val vetoTokensApplied: Int
49+
val vetoTokensApplied: Int,
50+
@JsonProperty("matchmaker_queue_map_pool_id")
51+
val matchmakerQueueMapPoolId: Int
5052
)
5153

5254

0 commit comments

Comments
 (0)