From c105120dc6744aa8d2f148acfc01a5a8eb097b8a Mon Sep 17 00:00:00 2001 From: dingo Date: Tue, 17 Mar 2026 09:36:18 -0400 Subject: [PATCH] Feature: card unit SFX + genus multi-select + CardEditor UX fixes - CardDefinition: add MoveSoundUrl, DamagedSoundUrl, BlockedSoundUrl, AttackSoundUrl, DeathSoundUrl columns (nullable text) - Migration 20260317100000_AddCardUnitSounds: 5 new columns on card_definitions - CardDefinitionDto + ContentDtoMapper: expose 5 SFX fields to client - CardEditor: - Genus: replace plain text input with DB-backed checkbox multi-select (loads distinct tags from all cards; add new tags inline) - Channel range (Min/Max): now ArchSpirit-only (removed from Spirit) - CanUseAbility / RequiresLos: default true for display & new cards - Assets tab: Unit Sound Effects section (5 CDN URL inputs) - model-viewer script injected lazily so 3D preview renders Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- .../Components/Pages/Cards/CardEditor.razor | 148 +++++- Server/src/SOR.Content/ContentMessages.cs | 6 + .../SOR.Content/Handlers/ContentDtoMapper.cs | 5 + .../Entities/Catalog/CardDefinition.cs | 7 + ...260317100000_AddCardUnitSounds.Designer.cs | 502 ++++++++++++++++++ .../20260317100000_AddCardUnitSounds.cs | 78 +++ .../Catalog/CatalogDbContextModelSnapshot.cs | 42 ++ 7 files changed, 765 insertions(+), 23 deletions(-) create mode 100644 Server/src/SOR.Database/Migrations/Catalog/20260317100000_AddCardUnitSounds.Designer.cs create mode 100644 Server/src/SOR.Database/Migrations/Catalog/20260317100000_AddCardUnitSounds.cs diff --git a/Server/src/SOR.Admin/Components/Pages/Cards/CardEditor.razor b/Server/src/SOR.Admin/Components/Pages/Cards/CardEditor.razor index 2dd25cb..efd2065 100644 --- a/Server/src/SOR.Admin/Components/Pages/Cards/CardEditor.razor +++ b/Server/src/SOR.Admin/Components/Pages/Cards/CardEditor.razor @@ -126,17 +126,17 @@ else @if (_card.CardType is CardType.ArchSpirit or CardType.Spirit) {
-
Channeling
-
- - -
-
- - -
@if (_card.CardType == CardType.ArchSpirit) { +
Channeling
+
+ + +
+
+ + +
@@ -207,9 +207,33 @@ else
Genus Tags
- -
Stored as a Postgres text[] array.
+ @if (_availableGenus.Count > 0) + { +
+ @foreach (var tag in _availableGenus) + { + var capturedTag = tag; +
+ + +
+ } +
+ } +
+ + +
+ @if (_selectedGenus.Count > 0) + { +
Selected: @string.Join(", ", _selectedGenus)
+ }
} @@ -491,6 +515,35 @@ else + +
Unit Sound Effects
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
} } @@ -569,6 +622,17 @@ else
} + + +