Feature: leaderboard hide, ability animations, card sounds, BGM, in-game settings

Server:
- Account.IsHiddenFromLeaderboard: filter bots/devs from leaderboard
- AbilityAnimationDefinition: type, effect, dimensions, asset/sound URLs per ability
- CardAnimationBinding: CastSoundCdnUrl + ImpactSoundCdnUrl per card action
- GameAudioConfig entity: admin-configurable BGM tracks per context
- GetGameAudioConfigHandler (content.get_audio_config) + ServiceRegistration
- Admin pages: AccountDetail toggle, AudioConfig CRUD, CardEditor + AbilityBuilder UI
- Migrations: AddLeaderboardHide, AddCardActionSounds, AddGameAudioConfig

Client:
- Music.gd autoload: fetches BGM config, crossfades between context tracks
- InGameSettings overlay: audio sliders, camera follow toggle, concede with confirm
- GameScreen: gear button opens settings; ConcedeBtn moved into settings panel
- project.godot: Music autoload registered

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-03-13 23:31:10 -04:00
co-authored by Claude Happy
parent c44dadec45
commit 3810742fe6
27 changed files with 1086 additions and 25 deletions
+18 -3
View File
@@ -104,7 +104,22 @@ public sealed record CardAssetDto(
bool IsAiGenerated);
public sealed record CardAnimationBindingDto(
Guid Id,
string ActionName,
string AnimationCdnUrl,
bool IsAiGenerated,
string? CastSoundCdnUrl,
string? ImpactSoundCdnUrl);
// ── BGM config ───────────────────────────────────────────────────────────────
/// <summary>Fetch all active background music tracks (keyed by game context).</summary>
public sealed record GetGameAudioConfigRequest;
public sealed record GetGameAudioConfigResponse(IEnumerable<GameAudioConfigDto> Tracks);
public sealed record GameAudioConfigDto(
Guid Id,
string ActionName,
string AnimationCdnUrl,
bool IsAiGenerated);
string Context,
string TrackName,
string TrackCdnUrl);
@@ -56,5 +56,7 @@ internal static class ContentDtoMapper
b.Id,
b.ActionName,
b.AnimationCdnUrl,
b.IsAiGenerated)));
b.IsAiGenerated,
b.CastSoundCdnUrl,
b.ImpactSoundCdnUrl)));
}
@@ -0,0 +1,40 @@
namespace SOR.Content.Handlers;
using Microsoft.EntityFrameworkCore;
using SOR.Database.Contexts;
using SOR.Networking.Abstractions.Messaging;
using SOR.Networking.Abstractions.Transport;
using SOR.Shared.Networking;
/// <summary>
/// content.get_audio_config — returns all active background music tracks.
/// The client uses these to stream BGM for each game context (Lobby, Game, Matchmaking, etc.).
/// </summary>
internal sealed class ContentGetAudioConfigHandler : IMessageHandler
{
private readonly CatalogDbContext _catalogDb;
public ContentGetAudioConfigHandler(CatalogDbContext catalogDb)
{
_catalogDb = catalogDb;
}
public string MessageType => "content.get_audio_config";
public async Task<IServerMessage?> HandleAsync(
IClientMessage message,
AuthenticatedConnection connection,
CancellationToken ct)
{
var tracks = await _catalogDb.AudioConfigs
.AsNoTracking()
.Where(g => g.IsActive)
.OrderBy(g => g.Context)
.ThenBy(g => g.TrackName)
.Select(g => new GameAudioConfigDto(g.Id, g.Context, g.TrackName, g.TrackCdnUrl))
.ToListAsync(ct);
return ServerMessage.Reply("content.get_audio_config.ack", message.Seq,
new GetGameAudioConfigResponse(tracks));
}
}
@@ -22,6 +22,7 @@ public static class ServiceRegistration
services.AddTransient<IMessageHandler, ContentGetCardSetsHandler>();
services.AddTransient<IMessageHandler, ContentGetCardDefinitionHandler>();
services.AddTransient<IMessageHandler, ContentGetTileModelsHandler>();
services.AddTransient<IMessageHandler, ContentGetAudioConfigHandler>();
return services;
}