feat(config): wire /config/update + /config/update_challenge_config (closes family 4/4)

is_skip_gacha_effect, use_challenge_two_pick_premium_card, and
challenge_two_pick_sleeve_id all persist on ViewerInfo and round-trip
through /load/index.

The two challenge fields move from the global ChallengeConfig section to
ViewerInfo — they're viewer preferences, not server-wide policy. Premium
card defaults to 0; sleeve falls back to DefaultLoadoutConfig.SleeveId
(3000011) when unset. MatchContextBuilder's TK2 sleeve read switches to
the same viewer-scoped path.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-13 11:25:40 -04:00
parent b5e13551cd
commit 715dd4dea8
17 changed files with 4860 additions and 16 deletions

View File

@@ -1,6 +1,4 @@
{
"use_two_pick_premium_card": false,
"two_pick_sleeve_id": 3000011,
"last_card_pack_set_id": 10015,
"card_pool_name": "Throwback Rotation",
"card_pool_url": "",

View File

@@ -40,8 +40,6 @@ public class RotationConfigImporter
{
await UpsertSection<ChallengeConfig>(context, ChallengeConfig.ShippedDefaults, c =>
{
c.UseTwoPickPremiumCard = cc.UseTwoPickPremiumCard;
c.TwoPickSleeveId = cc.TwoPickSleeveId;
c.LastCardPackSetId = cc.LastCardPackSetId;
c.CardPoolName = cc.CardPoolName;
c.CardPoolUrl = cc.CardPoolUrl;

View File

@@ -19,9 +19,6 @@ public sealed class RotationConfigSeed
/// <summary>Mirrors <c>seeds/challenge-config.json</c>. Drives the Challenge <c>GameConfigSection</c>.</summary>
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; } = "";