Remove [RULES] diagnostic logging (issue confirmed fixed)
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:
@@ -1,7 +1,6 @@
|
||||
namespace SOR.Game.Handlers;
|
||||
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using SOR.Database.Contexts;
|
||||
using SOR.Database.Entities.Catalog;
|
||||
using SOR.Database.Entities.Collection;
|
||||
@@ -24,22 +23,19 @@ internal sealed class GameReadyHandler : GameHandlerBase, IMessageHandler
|
||||
private readonly CollectionDbContext _collectionDb;
|
||||
private readonly CatalogDbContext _catalogDb;
|
||||
private readonly IClientPush _clientPush;
|
||||
private readonly ILogger<GameReadyHandler> _logger;
|
||||
|
||||
public GameReadyHandler(
|
||||
IMessageSerializer serializer,
|
||||
GameDbContext gameDb,
|
||||
CollectionDbContext collectionDb,
|
||||
CatalogDbContext catalogDb,
|
||||
IClientPush clientPush,
|
||||
ILogger<GameReadyHandler> logger)
|
||||
IClientPush clientPush)
|
||||
{
|
||||
_serializer = serializer;
|
||||
_gameDb = gameDb;
|
||||
_collectionDb = collectionDb;
|
||||
_catalogDb = catalogDb;
|
||||
_clientPush = clientPush;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public string MessageType => "game.ready";
|
||||
@@ -102,21 +98,10 @@ internal sealed class GameReadyHandler : GameHandlerBase, IMessageHandler
|
||||
var p2ArchSpirit = await LoadDeckArchSpiritAsync(session.PlayerTwoDeckId, ct);
|
||||
|
||||
// Deserialize rule snapshot (falls back to default if none stored).
|
||||
_logger.LogInformation(
|
||||
"[RULES] Session {SessionId} RuleSnapshotJson: {Snippet}",
|
||||
session.Id,
|
||||
session.RuleSnapshotJson is null ? "<null>" : session.RuleSnapshotJson[..Math.Min(300, session.RuleSnapshotJson.Length)]);
|
||||
|
||||
var rules = session.RuleSnapshotJson is not null
|
||||
? GameEngine.DeserializeRules(session.RuleSnapshotJson)
|
||||
: null;
|
||||
|
||||
_logger.LogInformation(
|
||||
"[RULES] Deserialized StartingRandomTilePct={Pct} BoardWidth={W} BoardHeight={H}",
|
||||
rules?.StartingRandomTilePct ?? GameRules.Default.StartingRandomTilePct,
|
||||
rules?.BoardWidth ?? GameRules.Default.BoardWidth,
|
||||
rules?.BoardHeight ?? GameRules.Default.BoardHeight);
|
||||
|
||||
var state = GameEngine.Initialize(
|
||||
session.Id,
|
||||
session.PlayerOneAccountId, p1DeckCards, p1ArchSpirit,
|
||||
|
||||
@@ -110,11 +110,6 @@ internal sealed class MatchmakerService : BackgroundService
|
||||
.Where(r => r.IsRankedDefault)
|
||||
.FirstOrDefaultAsync(ct);
|
||||
|
||||
_logger.LogInformation(
|
||||
"[RULES] Ranked rules loaded: found={Found} StartingRandomTilePct={Pct}",
|
||||
rankedRules is not null,
|
||||
rankedRules?.StartingRandomTilePct);
|
||||
|
||||
// Create a game session.
|
||||
var session = new GameSession
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user