Dungeon Builder p6
This commit is contained in:
@@ -745,8 +745,12 @@ public sealed partial class DungeonHandler : IClientMessageHandler
|
||||
object? tileSheets = null;
|
||||
object? visualTiles = null;
|
||||
|
||||
_log.LogInformation("LayoutV2 is null: {IsNull}, TileDetails count: {Count}",
|
||||
instance.LayoutV2 == null, instance.LayoutV2?.TileDetails?.Count ?? 0);
|
||||
|
||||
if (instance.LayoutV2 != null && instance.LayoutV2.TileDetails.Count > 0)
|
||||
{
|
||||
// Materialize to arrays for JSON serialization
|
||||
tileSheets = instance.LayoutV2.TileMapSheets.Select(s => new
|
||||
{
|
||||
id = s.Id,
|
||||
@@ -756,7 +760,7 @@ public sealed partial class DungeonHandler : IClientMessageHandler
|
||||
sheetW = s.SheetWidth,
|
||||
sheetH = s.SheetHeight,
|
||||
cols = s.Columns
|
||||
});
|
||||
}).ToArray();
|
||||
|
||||
visualTiles = instance.LayoutV2.TileDetails.Select(t => new
|
||||
{
|
||||
@@ -769,9 +773,10 @@ public sealed partial class DungeonHandler : IClientMessageHandler
|
||||
r = t.Rotation,
|
||||
fx = t.FlipX,
|
||||
fy = t.FlipY
|
||||
});
|
||||
}).ToArray();
|
||||
|
||||
_log.LogInformation("Sending {TileCount} visual tiles to client", instance.LayoutV2.TileDetails.Count);
|
||||
_log.LogInformation("Sending {SheetCount} sheets, {TileCount} visual tiles to client",
|
||||
instance.LayoutV2.TileMapSheets.Count, instance.LayoutV2.TileDetails.Count);
|
||||
}
|
||||
|
||||
await SendAsync(connection, DungeonOpCodes.DUNGEON_ENTER_RESULT, new
|
||||
|
||||
Reference in New Issue
Block a user