Sprite Sheet debug
This commit is contained in:
@@ -245,20 +245,26 @@ public sealed partial class DungeonHandler : IClientMessageHandler
|
|||||||
var spriteConfigBuilder = new MobSpriteConfigBuilder(db);
|
var spriteConfigBuilder = new MobSpriteConfigBuilder(db);
|
||||||
_mobSpriteConfigs = await spriteConfigBuilder.BuildSpriteConfigsAsync(mobs.Select(m => m.Id));
|
_mobSpriteConfigs = await spriteConfigBuilder.BuildSpriteConfigsAsync(mobs.Select(m => m.Id));
|
||||||
|
|
||||||
|
// Count animation assignments for debugging
|
||||||
|
var assignmentCount = await db.Set<MobAnimationAssignment>().CountAsync();
|
||||||
|
_log.LogInformation("Found {Count} total mob animation assignments in database", assignmentCount);
|
||||||
|
|
||||||
// Log sprite config status
|
// Log sprite config status
|
||||||
foreach (var mob in mobs)
|
foreach (var mob in mobs)
|
||||||
{
|
{
|
||||||
if (_mobSpriteConfigs.TryGetValue(mob.Id, out var config) && !string.IsNullOrEmpty(config))
|
if (_mobSpriteConfigs.TryGetValue(mob.Id, out var config) && !string.IsNullOrEmpty(config))
|
||||||
{
|
{
|
||||||
_log.LogInformation("Mob {Name} has new-format SpriteConfig ({Length} chars)", mob.Name, config.Length);
|
_log.LogInformation("Mob {Name} (ID:{Id}) has new-format SpriteConfig ({Length} chars): {Preview}",
|
||||||
|
mob.Name, mob.Id, config.Length, config.Substring(0, Math.Min(200, config.Length)));
|
||||||
}
|
}
|
||||||
else if (!string.IsNullOrEmpty(mob.SpriteConfigJson))
|
else if (!string.IsNullOrEmpty(mob.SpriteConfigJson))
|
||||||
{
|
{
|
||||||
_log.LogInformation("Mob {Name} has legacy SpriteConfigJson: {Json}", mob.Name, mob.SpriteConfigJson.Substring(0, Math.Min(100, mob.SpriteConfigJson.Length)));
|
_log.LogInformation("Mob {Name} (ID:{Id}) has legacy SpriteConfigJson: {Json}",
|
||||||
|
mob.Name, mob.Id, mob.SpriteConfigJson.Substring(0, Math.Min(100, mob.SpriteConfigJson.Length)));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_log.LogInformation("Mob {Name} has NO sprite config", mob.Name);
|
_log.LogInformation("Mob {Name} (ID:{Id}) has NO sprite config", mob.Name, mob.Id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user