feat(config): extend ChallengeConfig with TK2 format_info + PoolCardSetIds

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-05-31 10:23:08 -04:00
parent 5faa5e2445
commit 6e7f0dc4c9
4 changed files with 43 additions and 1 deletions

View File

@@ -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]
}

View File

@@ -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<int>();
});
touched++;
}

View File

@@ -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<int> PoolCardSetIds { get; set; } = new();
}
/// <summary>

View File

@@ -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<int> PoolCardSetIds { get; set; } = new();
public static ChallengeConfig ShippedDefaults() => new();
}