From 6e7f0dc4c9d0a16624a19593f19845dbe71fb37d Mon Sep 17 00:00:00 2001 From: gamer147 Date: Sun, 31 May 2026 10:23:08 -0400 Subject: [PATCH] feat(config): extend ChallengeConfig with TK2 format_info + PoolCardSetIds Co-Authored-By: Claude Sonnet 4.6 --- SVSim.Bootstrap/Data/seeds/challenge-config.json | 11 ++++++++++- .../Importers/RotationConfigImporter.cs | 9 +++++++++ SVSim.Bootstrap/Models/Seed/RotationConfigSeed.cs | 10 ++++++++++ SVSim.Database/Models/Config/ChallengeConfig.cs | 14 ++++++++++++++ 4 files changed, 43 insertions(+), 1 deletion(-) diff --git a/SVSim.Bootstrap/Data/seeds/challenge-config.json b/SVSim.Bootstrap/Data/seeds/challenge-config.json index c277b9b..7cefe2f 100644 --- a/SVSim.Bootstrap/Data/seeds/challenge-config.json +++ b/SVSim.Bootstrap/Data/seeds/challenge-config.json @@ -1,4 +1,13 @@ { "use_two_pick_premium_card": false, - "two_pick_sleeve_id": 3000011 + "two_pick_sleeve_id": 0, + "last_card_pack_set_id": 10015, + "card_pool_name": "Throwback Rotation", + "card_pool_url": "", + "announce_id": "", + "start_time": "", + "end_time": "", + "two_pick_type": 0, + "strategy_pick_num": 0, + "pool_card_set_ids": [10000, 10011, 10012, 10013, 10014, 10015] } diff --git a/SVSim.Bootstrap/Importers/RotationConfigImporter.cs b/SVSim.Bootstrap/Importers/RotationConfigImporter.cs index 3108476..1d2b1e1 100644 --- a/SVSim.Bootstrap/Importers/RotationConfigImporter.cs +++ b/SVSim.Bootstrap/Importers/RotationConfigImporter.cs @@ -42,6 +42,15 @@ public class RotationConfigImporter { c.UseTwoPickPremiumCard = cc.UseTwoPickPremiumCard; c.TwoPickSleeveId = cc.TwoPickSleeveId; + c.LastCardPackSetId = cc.LastCardPackSetId; + c.CardPoolName = cc.CardPoolName; + c.CardPoolUrl = cc.CardPoolUrl; + c.AnnounceId = cc.AnnounceId; + c.StartTime = cc.StartTime; + c.EndTime = cc.EndTime; + c.TwoPickType = cc.TwoPickType; + c.StrategyPickNum = cc.StrategyPickNum; + c.PoolCardSetIds = cc.PoolCardSetIds ?? new List(); }); touched++; } diff --git a/SVSim.Bootstrap/Models/Seed/RotationConfigSeed.cs b/SVSim.Bootstrap/Models/Seed/RotationConfigSeed.cs index f246499..d9dd785 100644 --- a/SVSim.Bootstrap/Models/Seed/RotationConfigSeed.cs +++ b/SVSim.Bootstrap/Models/Seed/RotationConfigSeed.cs @@ -21,6 +21,16 @@ public sealed class ChallengeConfigSeed { [JsonPropertyName("use_two_pick_premium_card")] public bool UseTwoPickPremiumCard { get; set; } [JsonPropertyName("two_pick_sleeve_id")] public long TwoPickSleeveId { get; set; } + + [JsonPropertyName("last_card_pack_set_id")] public int LastCardPackSetId { get; set; } + [JsonPropertyName("card_pool_name")] public string CardPoolName { get; set; } = ""; + [JsonPropertyName("card_pool_url")] public string CardPoolUrl { get; set; } = ""; + [JsonPropertyName("announce_id")] public string AnnounceId { get; set; } = ""; + [JsonPropertyName("start_time")] public string StartTime { get; set; } = ""; + [JsonPropertyName("end_time")] public string EndTime { get; set; } = ""; + [JsonPropertyName("two_pick_type")] public int TwoPickType { get; set; } = 0; + [JsonPropertyName("strategy_pick_num")] public int StrategyPickNum { get; set; } = 0; + [JsonPropertyName("pool_card_set_ids")] public List PoolCardSetIds { get; set; } = new(); } /// diff --git a/SVSim.Database/Models/Config/ChallengeConfig.cs b/SVSim.Database/Models/Config/ChallengeConfig.cs index 4e245c4..ec59e71 100644 --- a/SVSim.Database/Models/Config/ChallengeConfig.cs +++ b/SVSim.Database/Models/Config/ChallengeConfig.cs @@ -6,5 +6,19 @@ public class ChallengeConfig public bool UseTwoPickPremiumCard { get; set; } public long TwoPickSleeveId { get; set; } + // Wire-mirrored fields from format_info (ChallengeData.cs parser) + public int LastCardPackSetId { get; set; } + public string CardPoolName { get; set; } = ""; + public string CardPoolUrl { get; set; } = ""; + public string AnnounceId { get; set; } = ""; + public string StartTime { get; set; } = ""; + public string EndTime { get; set; } = ""; + public int TwoPickType { get; set; } = 0; + public int StrategyPickNum { get; set; } = 0; + + // Server-internal: which sets the TK2 pool draws from. Empty falls back to + // RotationConfig.RotationCardSetIds at runtime in the card-pool service. + public List PoolCardSetIds { get; set; } = new(); + public static ChallengeConfig ShippedDefaults() => new(); }