Wire BoardTemplateId through lobby rule DTOs and handlers
CustomRulesOverride and CustomRulesDto both lacked a BoardTemplateId field, so the client's template selection was never received or stored. lobby.BoardTemplateIdOverride always remained null, boardTemplateJson was never built, and the auto-shape generator ran instead of the template. - CustomRulesOverride: add Guid? BoardTemplateId - CustomRulesDto: add Guid? BoardTemplateId (default null for compat) - GameCreateCustomLobbyHandler: save BoardTemplateIdOverride on create; thread boardTemplateId through ToDto() - GameUpdateLobbyRulesHandler: save BoardTemplateIdOverride on update - GameGetLobbyHandler, GameJoinCustomLobbyHandler, GameListCustomLobbiesHandler, GameListActiveLobbiesHandler: include BoardTemplateId in outgoing DTOs Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -125,7 +125,12 @@ public sealed record CustomRulesOverride(
|
||||
/// Board shape. Null or "Default" = auto-select by player count via BoardShapeGenerator.AutoShape.
|
||||
/// Explicit values: "Rectangle" | "Cross" | "Triangular" | "RadialStar" | "HexRing".
|
||||
/// </summary>
|
||||
string? BoardShape = null);
|
||||
string? BoardShape = null,
|
||||
/// <summary>
|
||||
/// When set, use this board template instead of generating a board from BoardShape.
|
||||
/// Null or absent = no template (use shape generator).
|
||||
/// </summary>
|
||||
Guid? BoardTemplateId = null);
|
||||
|
||||
/// <summary>Join an open custom lobby with the specified deck.</summary>
|
||||
public sealed record JoinCustomLobbyRequest(Guid LobbyId, Guid DeckId, string? Password = null);
|
||||
@@ -712,7 +717,8 @@ public sealed record CustomRulesDto(
|
||||
int StartingRandomTilePct,
|
||||
/// <summary>"Default" = auto by player count; otherwise explicit shape name.</summary>
|
||||
string BoardShape,
|
||||
bool HasPassword);
|
||||
bool HasPassword,
|
||||
Guid? BoardTemplateId = null);
|
||||
|
||||
/// <summary>Client-facing lobby preset summary.</summary>
|
||||
public sealed record LobbyPresetDto(
|
||||
|
||||
Reference in New Issue
Block a user