tarot card icons + ranks; sig fallback for pre-sync Characters; DECKS label sizing — TDD
- migration 0011: The Nomad (0) → fa-hat-cowboy; The Schizo (1) → fa-hat-wizard - corner_rank: non-MAJOR pip card 1 → 'A' (Ace); court unchanged (M/J/Q/K); TDD - 17 unit model tests for corner_rank + suit_icon - _role_select_context: my_tray_sig falls back to seat.significator when confirmed_char.significator is None (Characters created before natus_save sync) - _card-deck.scss: DECKS label bigger (1rem, 0.32em letter-spacing) to fill stack height; sea-stack-name: opacity 0.6, scaleY(1.5), margin-top -0.4rem partially under face; sea-stack-face z-index:1 Code architected by Disco DeDisco <discodedisco@outlook.com> Git commit message Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
43
src/apps/epic/migrations/0011_nomad_schizo_icons.py
Normal file
43
src/apps/epic/migrations/0011_nomad_schizo_icons.py
Normal file
@@ -0,0 +1,43 @@
|
||||
"""Assign individual icons to The Nomad (0) and The Schizo (1).
|
||||
|
||||
All other Major Arcana already have fa-hand-dots from migration 0010.
|
||||
"""
|
||||
from django.db import migrations
|
||||
|
||||
ICONS = {0: 'fa-hat-cowboy', 1: 'fa-hat-wizard'}
|
||||
|
||||
|
||||
def assign_icons(apps, schema_editor):
|
||||
TarotCard = apps.get_model("epic", "TarotCard")
|
||||
DeckVariant = apps.get_model("epic", "DeckVariant")
|
||||
try:
|
||||
earthman = DeckVariant.objects.get(slug="earthman")
|
||||
except DeckVariant.DoesNotExist:
|
||||
return
|
||||
for number, icon in ICONS.items():
|
||||
TarotCard.objects.filter(
|
||||
deck_variant=earthman, arcana="MAJOR", number=number
|
||||
).update(icon=icon)
|
||||
|
||||
|
||||
def clear_icons(apps, schema_editor):
|
||||
TarotCard = apps.get_model("epic", "TarotCard")
|
||||
DeckVariant = apps.get_model("epic", "DeckVariant")
|
||||
try:
|
||||
earthman = DeckVariant.objects.get(slug="earthman")
|
||||
except DeckVariant.DoesNotExist:
|
||||
return
|
||||
TarotCard.objects.filter(
|
||||
deck_variant=earthman, arcana="MAJOR", number__in=list(ICONS.keys())
|
||||
).update(icon="")
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("epic", "0010_major_arcana_hand_dots_icon"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(assign_icons, reverse_code=clear_icons),
|
||||
]
|
||||
Reference in New Issue
Block a user