Implement more UX and cards for other distros

This commit is contained in:
2026-07-06 15:37:12 +02:00
parent 8b6c6235c2
commit 68dc13c60d
31 changed files with 759 additions and 16 deletions
+35
View File
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace KernelPanic.Data
{
/// <summary>
/// Resolves persisted card ids to immutable card definitions.
/// </summary>
public sealed class CardDatabase : ScriptableObject
{
[SerializeField] private List<CardDefinition> allCards = new();
public IReadOnlyList<CardDefinition> AllCards => allCards;
public CardDefinition FindById(string id)
{
if (string.IsNullOrWhiteSpace(id))
{
return null;
}
for (int i = 0; i < allCards.Count; i++)
{
CardDefinition card = allCards[i];
if (card != null && string.Equals(card.Id, id, StringComparison.OrdinalIgnoreCase))
{
return card;
}
}
return null;
}
}
}