Wire HexSides through custom lobby; fix boardTemplateIdOverride empty-string crash

Server:
- CustomRulesOverride: add HexSides (int?) field
- CustomLobby entity: add HexSidesOverride (int?) column
- GameUpdateLobbyRulesHandler: save HexSidesOverride, include HexSides in
  effective rules preview
- GameLobbyReadyHandler: set rules.HexSides from lobby.HexSidesOverride on
  game start
- GameSavePresetHandler: capture BoardShape + HexSides in saved presets
- Migration 20260401222603_AddCustomLobbyHexSides: adds HexSidesOverride to
  custom_lobbies; applied to pg-forge-01 via dotnet ef database update

Client:
- rules_editor_dialog: send null (not "") for boardTemplateIdOverride when no
  template selected — empty string crashed Guid? deserialisation on the server

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:
dingo
2026-04-01 18:28:08 -04:00
co-authored by Claude Happy
parent aa76ac9994
commit 97e7698000
9 changed files with 671 additions and 10 deletions
@@ -197,5 +197,9 @@ func _on_confirm() -> void:
if grid_type == "Hexagon": if grid_type == "Hexagon":
overrides["boardShape"] = "Hexagon" overrides["boardShape"] = "Hexagon"
# boardTemplateIdOverride: empty string is not a valid Guid — send null instead.
if overrides.get("boardTemplateIdOverride", null) == "":
overrides["boardTemplateIdOverride"] = null
confirmed.emit(overrides) confirmed.emit(overrides)
queue_free() queue_free()
@@ -89,6 +89,9 @@ public sealed class CustomLobby
/// <summary>When set, use this BoardTemplate instead of generating a board algorithmically.</summary> /// <summary>When set, use this BoardTemplate instead of generating a board algorithmically.</summary>
public Guid? BoardTemplateIdOverride { get; set; } public Guid? BoardTemplateIdOverride { get; set; }
/// <summary>Hex sides (N) when BoardShapeOverride is "Hexagon". Null = server default (5).</summary>
public int? HexSidesOverride { get; set; }
/// <summary>Percentage (0–100) of tiles that start with a random basic affinity. 0 = all void.</summary> /// <summary>Percentage (0–100) of tiles that start with a random basic affinity. 0 = all void.</summary>
public int? StartingRandomTilePctOverride { get; set; } public int? StartingRandomTilePctOverride { get; set; }
@@ -0,0 +1,538 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using SOR.Database.Contexts;
#nullable disable
namespace SOR.Database.Migrations.Game
{
[DbContext(typeof(GameDbContext))]
[Migration("20260401222603_AddCustomLobbyHexSides")]
partial class AddCustomLobbyHexSides
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasDefaultSchema("game")
.HasAnnotation("ProductVersion", "8.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("SOR.Database.Entities.Game.BoardTemplate", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("GridType")
.IsRequired()
.HasColumnType("text");
b.Property<int>("Height")
.HasColumnType("integer");
b.Property<int>("HexSides")
.HasColumnType("integer");
b.Property<bool>("IsAvailableForCustom")
.HasColumnType("boolean");
b.Property<bool>("IsAvailableForRanked")
.HasColumnType("boolean");
b.Property<bool>("IsEnabled")
.HasColumnType("boolean");
b.Property<int>("MaxPlayers")
.HasColumnType("integer");
b.Property<int>("MinPlayers")
.HasColumnType("integer");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<string>("StartingZonesJson")
.IsRequired()
.HasColumnType("jsonb");
b.Property<string>("TilesJson")
.IsRequired()
.HasColumnType("jsonb");
b.Property<DateTimeOffset>("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property<int>("Width")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("IsEnabled");
b.ToTable("board_templates", "game");
});
modelBuilder.Entity("SOR.Database.Entities.Game.CustomLobby", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("AdditionalPlayersJson")
.HasColumnType("text")
.HasColumnName("additional_players_json");
b.Property<int?>("BoardHeightOverride")
.HasColumnType("integer");
b.Property<string>("BoardShapeOverride")
.HasColumnType("text");
b.Property<Guid?>("BoardTemplateIdOverride")
.HasColumnType("uuid");
b.Property<int?>("BoardWidthOverride")
.HasColumnType("integer");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<bool?>("DiscardOnMaxHandOverride")
.HasColumnType("boolean");
b.Property<int?>("DrawPerTurnOverride")
.HasColumnType("integer");
b.Property<bool?>("FirstPlayerSkipsDrawOverride")
.HasColumnType("boolean");
b.Property<string>("GameMode")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("text")
.HasDefaultValue("FFA")
.HasColumnName("game_mode");
b.Property<Guid?>("GameSessionId")
.HasColumnType("uuid");
b.Property<Guid?>("GuestAccountId")
.HasColumnType("uuid");
b.Property<Guid?>("GuestDeckId")
.HasColumnType("uuid");
b.Property<string>("GuestFirstTurnPref")
.HasColumnType("text");
b.Property<bool>("GuestReady")
.HasColumnType("boolean");
b.Property<int?>("HandSizeCapOverride")
.HasColumnType("integer");
b.Property<int?>("HexSidesOverride")
.HasColumnType("integer");
b.Property<Guid>("HostAccountId")
.HasColumnType("uuid");
b.Property<Guid>("HostDeckId")
.HasColumnType("uuid");
b.Property<string>("HostFirstTurnPref")
.HasColumnType("text");
b.Property<bool>("HostReady")
.HasColumnType("boolean");
b.Property<int?>("MaxArchTier1Override")
.HasColumnType("integer");
b.Property<int?>("MaxDeckSizeOverride")
.HasColumnType("integer");
b.Property<int>("MaxPlayers")
.HasColumnType("integer");
b.Property<int?>("MinDeckSizeOverride")
.HasColumnType("integer");
b.Property<int?>("MpBuffOverride")
.HasColumnType("integer");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<int?>("OpeningHandSizeOverride")
.HasColumnType("integer");
b.Property<string>("Password")
.HasColumnType("text");
b.Property<int?>("SpAccumulationPerTurnOverride")
.HasColumnType("integer");
b.Property<int?>("SpCapOverride")
.HasColumnType("integer");
b.Property<bool?>("SpHasCapOverride")
.HasColumnType("boolean");
b.Property<int?>("StartingRandomTilePctOverride")
.HasColumnType("integer");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("text");
b.Property<string>("TeamAssignmentsJson")
.HasColumnType("text");
b.Property<int>("TeamCount")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(1)
.HasColumnName("team_count");
b.Property<int?>("TimeLimitMinutesOverride")
.HasColumnType("integer");
b.Property<int?>("TurnLimitOverride")
.HasColumnType("integer");
b.Property<int?>("TurnTimerSecondsOverride")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("HostAccountId");
b.HasIndex("Status", "CreatedAt");
b.ToTable("custom_lobbies", "game");
});
modelBuilder.Entity("SOR.Database.Entities.Game.GameActionLog", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("ActionType")
.IsRequired()
.HasColumnType("text");
b.Property<Guid>("ActorAccountId")
.HasColumnType("uuid");
b.Property<Guid>("GameSessionId")
.HasColumnType("uuid");
b.Property<DateTimeOffset>("OccurredAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("PayloadJson")
.HasColumnType("jsonb")
.HasColumnName("payload");
b.Property<string>("ResultJson")
.HasColumnType("jsonb")
.HasColumnName("result");
b.Property<int>("SequenceNumber")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("ActorAccountId");
b.HasIndex("GameSessionId", "SequenceNumber")
.IsUnique();
b.ToTable("action_logs", "game");
});
modelBuilder.Entity("SOR.Database.Entities.Game.GameRuleSet", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<int>("BoardHeight")
.HasColumnType("integer");
b.Property<Guid?>("BoardTemplateId")
.HasColumnType("uuid");
b.Property<int>("BoardWidth")
.HasColumnType("integer");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<bool>("DiscardOnMaxHand")
.HasColumnType("boolean");
b.Property<int>("DrawPerTurn")
.HasColumnType("integer");
b.Property<bool>("FirstPlayerSkipsDraw")
.HasColumnType("boolean");
b.Property<string>("GridType")
.IsRequired()
.HasColumnType("text");
b.Property<int>("HandSizeCap")
.HasColumnType("integer");
b.Property<int>("HexSides")
.HasColumnType("integer");
b.Property<bool>("IsCustomDefault")
.HasColumnType("boolean");
b.Property<bool>("IsRankedDefault")
.HasColumnType("boolean");
b.Property<int>("LoserOpReward")
.HasColumnType("integer");
b.Property<int>("MaxArchTier1")
.HasColumnType("integer");
b.Property<int>("MaxDeckSize")
.HasColumnType("integer");
b.Property<int>("MinDeckSize")
.HasColumnType("integer");
b.Property<int>("MpBuff")
.HasColumnType("integer");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<int>("OpeningHandSize")
.HasColumnType("integer");
b.Property<int>("RankDiffOpMultiplierPct")
.HasColumnType("integer");
b.Property<int>("SpAccumulationPerTurn")
.HasColumnType("integer");
b.Property<int>("SpCap")
.HasColumnType("integer");
b.Property<bool>("SpHasCap")
.HasColumnType("boolean");
b.Property<int>("StartingRandomTilePct")
.HasColumnType("integer");
b.Property<int>("TimeLimitMinutes")
.HasColumnType("integer");
b.Property<int>("TurnLimit")
.HasColumnType("integer");
b.Property<int>("TurnTimerSeconds")
.HasColumnType("integer");
b.Property<DateTimeOffset>("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.Property<int>("WinnerOpReward")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("IsCustomDefault");
b.HasIndex("IsRankedDefault");
b.ToTable("game_rule_sets", "game");
});
modelBuilder.Entity("SOR.Database.Entities.Game.GameSession", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("AdditionalPlayersJson")
.HasColumnType("text")
.HasColumnName("additional_players_json");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset?>("EndedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("GameMode")
.IsRequired()
.ValueGeneratedOnAdd()
.HasColumnType("text")
.HasDefaultValue("FFA")
.HasColumnName("game_mode");
b.Property<DateTimeOffset?>("LastActionAt")
.HasColumnType("timestamp with time zone");
b.Property<int>("PlayerCount")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasDefaultValue(2)
.HasColumnName("player_count");
b.Property<Guid>("PlayerOneAccountId")
.HasColumnType("uuid");
b.Property<Guid>("PlayerOneDeckId")
.HasColumnType("uuid");
b.Property<bool>("PlayerOneReady")
.HasColumnType("boolean");
b.Property<Guid>("PlayerTwoAccountId")
.HasColumnType("uuid");
b.Property<Guid>("PlayerTwoDeckId")
.HasColumnType("uuid");
b.Property<bool>("PlayerTwoReady")
.HasColumnType("boolean");
b.Property<string>("RuleSnapshotJson")
.HasColumnType("jsonb")
.HasColumnName("rule_snapshot");
b.Property<DateTimeOffset?>("StartedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("StateJson")
.HasColumnType("jsonb")
.HasColumnName("state");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("text");
b.Property<string>("WinCondition")
.HasColumnType("text");
b.Property<Guid?>("WinnerAccountId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("PlayerOneAccountId");
b.HasIndex("PlayerTwoAccountId");
b.HasIndex("Status", "CreatedAt");
b.ToTable("game_sessions", "game");
});
modelBuilder.Entity("SOR.Database.Entities.Game.LobbyPreset", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<Guid>("OwnerAccountId")
.HasColumnType("uuid");
b.Property<string>("RulesJson")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("OwnerAccountId");
b.ToTable("lobby_presets", "game");
});
modelBuilder.Entity("SOR.Database.Entities.Game.MatchmakingEntry", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<Guid>("AccountId")
.HasColumnType("uuid");
b.Property<Guid>("DeckId")
.HasColumnType("uuid");
b.Property<DateTimeOffset>("JoinedAt")
.HasColumnType("timestamp with time zone");
b.Property<Guid?>("MatchedGameSessionId")
.HasColumnType("uuid");
b.Property<int>("RankScore")
.HasColumnType("integer");
b.Property<DateTimeOffset?>("ResolvedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("AccountId", "Status");
b.HasIndex("Status", "RankScore");
b.ToTable("matchmaking_entries", "game");
});
modelBuilder.Entity("SOR.Database.Entities.Game.GameActionLog", b =>
{
b.HasOne("SOR.Database.Entities.Game.GameSession", "Session")
.WithMany("ActionLog")
.HasForeignKey("GameSessionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Session");
});
modelBuilder.Entity("SOR.Database.Entities.Game.GameSession", b =>
{
b.Navigation("ActionLog");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,110 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SOR.Database.Migrations.Game
{
/// <inheritdoc />
public partial class AddCustomLobbyHexSides : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "HexSides",
schema: "game",
table: "game_rule_sets",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValue: 0);
migrationBuilder.AlterColumn<string>(
name: "GridType",
schema: "game",
table: "game_rule_sets",
type: "text",
nullable: false,
oldClrType: typeof(string),
oldType: "text",
oldDefaultValue: "Square");
migrationBuilder.AddColumn<int>(
name: "HexSidesOverride",
schema: "game",
table: "custom_lobbies",
type: "integer",
nullable: true);
migrationBuilder.AlterColumn<int>(
name: "HexSides",
schema: "game",
table: "board_templates",
type: "integer",
nullable: false,
oldClrType: typeof(int),
oldType: "integer",
oldDefaultValue: 0);
migrationBuilder.AlterColumn<string>(
name: "GridType",
schema: "game",
table: "board_templates",
type: "text",
nullable: false,
oldClrType: typeof(string),
oldType: "text",
oldDefaultValue: "Square");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "HexSidesOverride",
schema: "game",
table: "custom_lobbies");
migrationBuilder.AlterColumn<int>(
name: "HexSides",
schema: "game",
table: "game_rule_sets",
type: "integer",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn<string>(
name: "GridType",
schema: "game",
table: "game_rule_sets",
type: "text",
nullable: false,
defaultValue: "Square",
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AlterColumn<int>(
name: "HexSides",
schema: "game",
table: "board_templates",
type: "integer",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "integer");
migrationBuilder.AlterColumn<string>(
name: "GridType",
schema: "game",
table: "board_templates",
type: "text",
nullable: false,
defaultValue: "Square",
oldClrType: typeof(string),
oldType: "text");
}
}
}
@@ -32,16 +32,14 @@ namespace SOR.Database.Migrations.Game
b.Property<DateTimeOffset>("CreatedAt") b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("timestamp with time zone"); .HasColumnType("timestamp with time zone");
b.Property<string>("GridType")
.IsRequired()
.HasColumnType("text");
b.Property<int>("Height") b.Property<int>("Height")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<string>("GridType")
.IsRequired()
.HasDefaultValue("Square")
.HasColumnType("text");
b.Property<int>("HexSides") b.Property<int>("HexSides")
.HasDefaultValue(0)
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<bool>("IsAvailableForCustom") b.Property<bool>("IsAvailableForCustom")
@@ -143,6 +141,9 @@ namespace SOR.Database.Migrations.Game
b.Property<int?>("HandSizeCapOverride") b.Property<int?>("HandSizeCapOverride")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<int?>("HexSidesOverride")
.HasColumnType("integer");
b.Property<Guid>("HostAccountId") b.Property<Guid>("HostAccountId")
.HasColumnType("uuid"); .HasColumnType("uuid");
@@ -292,14 +293,12 @@ namespace SOR.Database.Migrations.Game
b.Property<string>("GridType") b.Property<string>("GridType")
.IsRequired() .IsRequired()
.HasDefaultValue("Square")
.HasColumnType("text"); .HasColumnType("text");
b.Property<int>("HandSizeCap") b.Property<int>("HandSizeCap")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<int>("HexSides") b.Property<int>("HexSides")
.HasDefaultValue(0)
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<bool>("IsCustomDefault") b.Property<bool>("IsCustomDefault")
+3 -1
View File
@@ -130,7 +130,9 @@ public sealed record CustomRulesOverride(
/// When set, use this board template instead of generating a board from BoardShape. /// When set, use this board template instead of generating a board from BoardShape.
/// Null or absent = no template (use shape generator). /// Null or absent = no template (use shape generator).
/// </summary> /// </summary>
Guid? BoardTemplateIdOverride = null); Guid? BoardTemplateIdOverride = null,
/// <summary>Hex sides (N) when BoardShape is "Hexagon". 0 = server default (5).</summary>
int? HexSides = null);
/// <summary>Join an open custom lobby with the specified deck.</summary> /// <summary>Join an open custom lobby with the specified deck.</summary>
public sealed record JoinCustomLobbyRequest(Guid LobbyId, Guid DeckId, string? Password = null); public sealed record JoinCustomLobbyRequest(Guid LobbyId, Guid DeckId, string? Password = null);
@@ -279,6 +279,7 @@ internal sealed class GameLobbyReadyHandler : GameHandlerBase, IMessageHandler
MpBuff = lobby.MpBuffOverride ?? dbDefaults?.MpBuff ?? GameRules.Default.MpBuff, MpBuff = lobby.MpBuffOverride ?? dbDefaults?.MpBuff ?? GameRules.Default.MpBuff,
StartingRandomTilePct = lobby.StartingRandomTilePctOverride ?? dbDefaults?.StartingRandomTilePct ?? GameRules.Default.StartingRandomTilePct, StartingRandomTilePct = lobby.StartingRandomTilePctOverride ?? dbDefaults?.StartingRandomTilePct ?? GameRules.Default.StartingRandomTilePct,
BoardShape = boardShape, BoardShape = boardShape,
HexSides = lobby.HexSidesOverride ?? GameRules.Default.HexSides,
BoardTemplateJson = boardTemplateJson, BoardTemplateJson = boardTemplateJson,
PlayerCount = playerCount, PlayerCount = playerCount,
}; };
@@ -64,7 +64,9 @@ internal sealed class GameSavePresetHandler : GameHandlerBase, IMessageHandler
TurnTimerSeconds : lobby.TurnTimerSecondsOverride, TurnTimerSeconds : lobby.TurnTimerSecondsOverride,
TimeLimitMinutes : lobby.TimeLimitMinutesOverride, TimeLimitMinutes : lobby.TimeLimitMinutesOverride,
TurnLimit : lobby.TurnLimitOverride, TurnLimit : lobby.TurnLimitOverride,
MpBuff : lobby.MpBuffOverride); MpBuff : lobby.MpBuffOverride,
BoardShape : lobby.BoardShapeOverride,
HexSides : lobby.HexSidesOverride);
var preset = new LobbyPreset var preset = new LobbyPreset
{ {
@@ -73,6 +73,7 @@ internal sealed class GameUpdateLobbyRulesHandler : GameHandlerBase, IMessageHan
lobby.StartingRandomTilePctOverride = r.StartingRandomTilePct; lobby.StartingRandomTilePctOverride = r.StartingRandomTilePct;
lobby.BoardShapeOverride = r.BoardShape; lobby.BoardShapeOverride = r.BoardShape;
lobby.BoardTemplateIdOverride = r.BoardTemplateIdOverride; lobby.BoardTemplateIdOverride = r.BoardTemplateIdOverride;
lobby.HexSidesOverride = r.HexSides;
await _gameDb.SaveChangesAsync(ct); await _gameDb.SaveChangesAsync(ct);
@@ -96,6 +97,7 @@ internal sealed class GameUpdateLobbyRulesHandler : GameHandlerBase, IMessageHan
TurnLimit = r.TurnLimit ?? GameRules.Default.TurnLimit, TurnLimit = r.TurnLimit ?? GameRules.Default.TurnLimit,
MpBuff = r.MpBuff ?? GameRules.Default.MpBuff, MpBuff = r.MpBuff ?? GameRules.Default.MpBuff,
StartingRandomTilePct = r.StartingRandomTilePct ?? GameRules.Default.StartingRandomTilePct, StartingRandomTilePct = r.StartingRandomTilePct ?? GameRules.Default.StartingRandomTilePct,
HexSides = r.HexSides ?? GameRules.Default.HexSides,
}, lobby.Password != null, r.BoardShape, r.BoardTemplateIdOverride); }, lobby.Password != null, r.BoardShape, r.BoardTemplateIdOverride);
var updatedPush = ServerMessage.Push("game.custom.lobby_updated", var updatedPush = ServerMessage.Push("game.custom.lobby_updated",