diff --git a/Assets/Data/Distros/Ubuntu.asset b/Assets/Data/Distros/Ubuntu.asset index ba174de..eb51237 100644 --- a/Assets/Data/Distros/Ubuntu.asset +++ b/Assets/Data/Distros/Ubuntu.asset @@ -23,4 +23,9 @@ MonoBehaviour: baseUptime: 60 baseRam: 5 baseCyclesPerTurn: 3 - exclusiveCards: [] + exclusiveCards: + - {fileID: 11400000, guid: 0a4f1d1d84564f3cad58b8863e941201, type: 2} + - {fileID: 11400000, guid: 14c5d40f866a4cb6b0a6316e01f42891, type: 2} + - {fileID: 11400000, guid: 2a0f50d541f046fc99c8fb6deef4f1aa, type: 2} + - {fileID: 11400000, guid: 3d57857f3f30419c8be4c44914c5abbe, type: 2} + - {fileID: 11400000, guid: 4cae271a0f4146c59aab74e4c9d6d0f8, type: 2} diff --git a/Assets/Scenes/MainMenuScene.unity b/Assets/Scenes/MainMenuScene.unity index 27ca081..71fcc0f 100644 --- a/Assets/Scenes/MainMenuScene.unity +++ b/Assets/Scenes/MainMenuScene.unity @@ -306,4 +306,5 @@ MonoBehaviour: monospaceFont: {fileID: 0} motdBody: unstable userspace detected; keep a rollback shell open. distroDatabase: {fileID: 11400000, guid: 4d88ca5446fa4d80b2fbd4b12697cb7c, type: 2} + cardDatabase: {fileID: 11400000, guid: 6a8a9f37c98a4a7a9e67ab15d2d22208, type: 2} featuredUnitPanel: {} diff --git a/Assets/Scripts/Data/CardDefinition.cs b/Assets/Scripts/Data/CardDefinition.cs index e7a8a77..37dfd79 100644 --- a/Assets/Scripts/Data/CardDefinition.cs +++ b/Assets/Scripts/Data/CardDefinition.cs @@ -17,6 +17,8 @@ namespace KernelPanic.Data [SerializeField] private int cycleCost; [SerializeField] private ResolutionTrack resolutionTrack; [SerializeField] private bool distroExclusive; + [SerializeField] private bool isToken; + [SerializeField, TextArea] private string designNotes; [SerializeField] private CardDefinition upgradeTarget; [SerializeField] private List effects = new(); @@ -28,6 +30,8 @@ namespace KernelPanic.Data public int CycleCost => cycleCost; public ResolutionTrack ResolutionTrack => resolutionTrack; public bool DistroExclusive => distroExclusive; + public bool IsToken => isToken; + public string DesignNotes => designNotes; public CardDefinition UpgradeTarget => upgradeTarget; public IReadOnlyList Effects => effects; } diff --git a/Assets/Scripts/Meta/SaveService.cs b/Assets/Scripts/Meta/SaveService.cs index 84c0229..c902df1 100644 --- a/Assets/Scripts/Meta/SaveService.cs +++ b/Assets/Scripts/Meta/SaveService.cs @@ -60,6 +60,7 @@ namespace KernelPanic.Meta public bool starterChosen; public List ownedUnitIds = new(); public List bannerPoolIds = new(); + public List cardLoadouts = new(); public static SaveData CreateDefault() { @@ -70,6 +71,24 @@ namespace KernelPanic.Meta { ownedUnitIds ??= new List(); bannerPoolIds ??= new List(); + cardLoadouts ??= new List(); + for (int i = 0; i < cardLoadouts.Count; i++) + { + cardLoadouts[i] ??= new CardLoadoutSaveEntry(); + cardLoadouts[i].EnsureLists(); + } + } + } + + [Serializable] + public sealed class CardLoadoutSaveEntry + { + public string distroId; + public List equippedCardIds = new(); + + public void EnsureLists() + { + equippedCardIds ??= new List(); } } } diff --git a/Assets/Scripts/UI/MainMenuController.cs b/Assets/Scripts/UI/MainMenuController.cs index f88a9b1..19227b2 100644 --- a/Assets/Scripts/UI/MainMenuController.cs +++ b/Assets/Scripts/UI/MainMenuController.cs @@ -37,6 +37,7 @@ namespace KernelPanic.UI [SerializeField] private FontAsset monospaceFont; // TODO: Assign a real monospace FontAsset when typography assets exist. [SerializeField] private string motdBody = "unstable userspace detected; keep a rollback shell open."; [SerializeField] private DistroDatabase distroDatabase; + [SerializeField] private CardDatabase cardDatabase; [SerializeField] private FeaturedUnitPanel featuredUnitPanel = new(); [SerializeField] private CollectionScreenController collectionScreen = new(); [SerializeField] private StarterSelectionController starterSelection = new(); @@ -48,6 +49,7 @@ namespace KernelPanic.UI private VisualElement bootIntroPanel; private VisualElement mainMenuPanel; private VisualElement collectionPanel; + private VisualElement runSetupPanel; private VisualElement gachaPanel; private VisualElement settingsPanel; private VisualElement eventBanner; @@ -61,6 +63,9 @@ namespace KernelPanic.UI private Label motdBodyLabel; private VisualElement motdBlock; private Button collectionBackButton; + private Button collectionUnitsButton; + private Button collectionCardsButton; + private Button runSetupBackButton; private Button gachaBackButton; private Button settingsBackButton; private SaveService saveService; @@ -68,6 +73,7 @@ namespace KernelPanic.UI private EntropyWallet wallet; private GachaService gachaService; private PlayerCollection playerCollection; + private CardLoadout cardLoadout; private BackgroundLogRingBuffer backgroundLog; private IEventBannerSource eventBannerSource; private int selectedCommandIndex; @@ -76,6 +82,7 @@ namespace KernelPanic.UI private bool cursorVisible; private bool suppressNextClick; private bool warnedUnresolvedSaveId; + private bool warnedInvalidLoadoutId; private string bootIntroCopy; private IVisualElementScheduledItem blinkSchedule; private IVisualElementScheduledItem bootIntroSchedule; @@ -92,6 +99,7 @@ namespace KernelPanic.UI saveService = new SaveService(); gachaService = new GachaService(); playerCollection = new PlayerCollection(); // TODO: Replace with persistent player-collection service composition. + cardLoadout = new CardLoadout(playerCollection.OwnedUnits); Initialize(new EntropyWallet()); // TODO: Replace with persistent wallet service composition. BindElements(); BindCommandEntries(); @@ -137,6 +145,7 @@ namespace KernelPanic.UI bootIntroPanel = root.Q("BootIntroPanel"); mainMenuPanel = root.Q("MainMenuPanel"); collectionPanel = root.Q("CollectionPanel"); + runSetupPanel = root.Q("RunSetupPanel"); gachaPanel = root.Q("GachaPanel"); settingsPanel = root.Q("SettingsPanel"); eventBanner = root.Q("EventBanner"); @@ -153,6 +162,9 @@ namespace KernelPanic.UI motdBodyLabel = root.Q