namespace XFEWarframe.Desktop.Editing; internal sealed record SettingSection(string Key, string Title, int Order); /// Presentation groups only; the server still owns field types, values and authorization. internal static class SettingSections { private static readonly IReadOnlyDictionary Server = Build( ("tutorial", "教程与解锁", "skipTutorial skipClanKeyCrafting"), ("official-events", "官方活动同步", "worldState.officialEventsEnabled"), ("relays", "中继站与访问", "noHubDiscrimination worldState.tennoLiveRelay worldState.baroTennoConRelay"), ("vendors", "商人与商品", "fullyStockedVendors worldState.baroAlwaysAvailable worldState.baroFullyStocked worldState.baroRelayOverride worldState.evilBaroStage worldState.varziaFullyStocked worldState.varziaOverride worldState.vanguardVaultRelics worldState.darvoStockMultiplier"), ("boosters", "全局加成", "worldState.creditBoostMultiplier worldState.affinityBoostMultiplier worldState.resourceBoostMultiplier"), ("cycles", "世界周期与任务轮换", "worldState.eidolonOverride worldState.vallisOverride worldState.duviriOverride worldState.allTheFissures worldState.classicAlerts worldState.circuitGameModes"), ("nightwave", "午夜电波", "worldState.nightwaveOverride worldState.nightwaveEpisode"), ("operations", "行动与进度", "worldState.bloodOfPerita worldState.scarletSpear worldState.orphixVenom worldState.breedingGrounds unfaithfulBugFixes.giveBreedingGroundsRewardsAtSum worldState.operationAtramentum worldState.operationAtramentumProgressOverride worldState.bellyOfTheBeast worldState.bellyOfTheBeastProgressOverride worldState.eightClaw worldState.eightClawProgressOverride"), ("open-world", "开放世界活动", "worldState.ghoulEmergenceOverride worldState.plagueStarOverride worldState.thermiaFracturesOverride worldState.thermiaFracturesProgressOverride worldState.dogDaysOverride worldState.dogDaysRewardsOverride"), ("seasonal", "节日与纪念活动", "worldState.anniversary worldState.naberusNightsOverride worldState.starDaysOverride worldState.saintPatrickOverride worldState.xmasOverride worldState.prideOverride worldState.lunarNewYear worldState.snowdayShowdown"), ("alerts", "限时警报与奖励", "worldState.longShadow worldState.hallowedFlame worldState.qtccAlerts worldState.destiny2TributeAlert worldState.wolfHunt worldState.hallowedNightmares worldState.hallowedNightmaresRewardsOverride worldState.proxyRebellion worldState.proxyRebellionRewardsOverride worldState.galleonOfGhouls"), ("void-2025", "虚空腐蚀 · 2025", "worldState.voidCorruption2025Week1 worldState.voidCorruption2025Week2 worldState.voidCorruption2025Week3 worldState.voidCorruption2025Week4"), ("dagath-2026", "Dagath 警报 · 2026", "worldState.dagathAlerts2026Week1 worldState.dagathAlerts2026Week2 worldState.dagathAlerts2026Week3 worldState.dagathAlerts2026Week4"), ("stardays-2026", "星日警报 · 2026", "worldState.starDaysAlerts2026Week1 worldState.starDaysAlerts2026Week2 worldState.starDaysAlerts2026Week3 worldState.starDaysAlerts2026Week4"), ("synthesis", "社区结合仪式", "worldState.communitySynthesisTarget worldState.communitySynthesisProgress"), ("compatibility", "旧版活动兼容", "unfaithfulBugFixes.useAnniversaryTagForOldGoals")); private static readonly IReadOnlyDictionary Account = Build( ("interface", "对话与提示", "skipAllDialogue skipAllPopups"), ("costs", "购买与消耗", "dontSubtractPurchaseCreditCost dontSubtractPurchasePlatinumCost dontSubtractRushPlatinumCost dontSubtractPurchaseItemCost dontSubtractPurchaseStandingCost dontSubtractKuvaForRivens dontSubtractVoidTraces dontSubtractConsumables dontSubtractKeys noNodeEntryFees"), ("resources", "资源与使用次数", "infiniteCredits infinitePlatinum infiniteRegalAya infiniteEndo infiniteDirac infiniteRevives infiniteTrades infiniteGifts infiniteHelminthMaterials"), ("equipment", "装备与容量", "universalPolarityEverywhere unlockDoubleCapacityPotatoesEverywhere unlockExilusEverywhere unlockArcanesEverywhere"), ("limits", "限制与冷却", "alertsRepeatable syndicateMissionsRepeatable instantFinishRivenChallenge noDailyStandingLimits noDailyFocusLimit noArgonCrystalDecay noMasteryRankUpCooldown noVendorPurchaseLimits noKimCooldowns noBlessingCooldown spoofMasteryRank"), ("foundry", "制造与采集", "noResourceExtractorDronesDamage instantResourceExtractorDrones claimingBlueprintRefundsIngredients"), ("relics", "遗物与奖励", "missionsCanGiveAllRelics exceptionalRelicsAlwaysGiveBronzeReward flawlessRelicsAlwaysGiveSilverReward radiantRelicsAlwaysGiveGoldReward relicRewardItemCountMultiplier relicPlatinumBonusCommon relicPlatinumBonusUncommon relicPlatinumBonusRare"), ("nemesis", "玄骸与追猎", "noDeathMarks noNemesis nemesisHenchmenKillsMultiplierGrineer nemesisHenchmenKillsMultiplierCorpus nemesisAntivirusGainMultiplier nemesisHintProgressMultiplierGrineer nemesisHintProgressMultiplierCorpus nemesisExtraWeapon"), ("rewards", "登录与任务奖励", "disableDailyTribute incrementDailyTributeBy50 dailyTributeRewardMultiplier finishInvasionsInOneMission teralystCapturePlatinumBonus gantulystCapturePlatinumBonus hydrolystCapturePlatinumBonus nightwaveStandingMultiplier")); private static readonly IReadOnlyDictionary Permissions = Build( ("equipment", "装备编辑", "rename experience forma features mature remove parts valence"), ("warframes", "战甲强化与技能", "shards umbra invigoration ability exalted loadout"), ("mods", "MOD 与紫卡编辑", "mod.rank riven legacy"), ("acquisition", "物品创建与批量操作", "create.legacy create.modular create.booster create.quest acquire.missing acquire.mods batch"), ("progress", "进度与解锁", "quest booster evolution create.evolution inbox.read syndicate"), ("archive", "存档导入与导出", "archive.export archive.import")); internal static SettingSection Find(string scope, string key) { if (scope == "server") return Server.GetValueOrDefault(key) ?? Other; if (scope == "permissions") { if (key.StartsWith("setting.", StringComparison.Ordinal)) { var group = Account.GetValueOrDefault(key[8..]) ?? Other; return new("account-" + group.Key, UiText.Format("账号规则 · {0}", UiText.Translate(group.Title)), 20 + group.Order); } if (key.StartsWith("guild.", StringComparison.Ordinal)) return new("guild", "氏族与联盟权限", 6); if (key.StartsWith("template.", StringComparison.Ordinal)) return new("templates", "存档模板权限", 7); if (key.StartsWith("unlock.", StringComparison.Ordinal)) return Permissions["quest"]; return Permissions.GetValueOrDefault(key) ?? Other; } return Account.GetValueOrDefault(key) ?? Other; } private static readonly SettingSection Other = new("other", "其他设置", 99); private static IReadOnlyDictionary Build(params (string Key, string Title, string Fields)[] sections) => sections.SelectMany((group, index) => group.Fields.Split(' ', StringSplitOptions.RemoveEmptyEntries) .Select(key => KeyValuePair.Create(key, new SettingSection(group.Key, group.Title, index)))).ToDictionary(); }