From 6225390b7f2f70b4f4de6adc49be3b13e57c942c Mon Sep 17 00:00:00 2001 From: Menci Date: Sat, 30 Nov 2024 14:43:25 +0800 Subject: [PATCH] [F] Set ForceAsSserver to default ON (#92) * Set ForceAsSserver to default ON * work as origin --------- Co-authored-by: Clansty --- .../AquaMai.Config/Migration/ConfigMigration_V1_0_V2_0.cs | 6 +++++- AquaMai/AquaMai.Mods/GameSettings/ForceAsServer.cs | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/AquaMai/AquaMai.Config/Migration/ConfigMigration_V1_0_V2_0.cs b/AquaMai/AquaMai.Config/Migration/ConfigMigration_V1_0_V2_0.cs index ae6226d0..23c26637 100644 --- a/AquaMai/AquaMai.Config/Migration/ConfigMigration_V1_0_V2_0.cs +++ b/AquaMai/AquaMai.Config/Migration/ConfigMigration_V1_0_V2_0.cs @@ -125,7 +125,10 @@ public IConfigView Migrate(IConfigView src) { dst.SetValue("GameSystem.RemoveEncryption.Disabled", true); // Enabled by default in V2 } - MapBooleanTrueToSectionEnable(src, dst, "Fix.ForceAsServer", "GameSettings.ForceAsServer"); + if (!src.GetValueOrDefault("Fix.ForceAsServer", true)) + { + dst.SetValue("GameSettings.ForceAsServer.Disabled", true); // Enabled by default in V2 + } if (src.GetValueOrDefault("Fix.ForceFreePlay")) { dst.SetValue("GameSettings.CreditConfig.IsFreePlay", true); @@ -297,6 +300,7 @@ public IConfigView Migrate(IConfigView src) // Default enabled in V2 dst.EnsureDictionary("GameSystem.RemoveEncryption"); + dst.EnsureDictionary("GameSettings.ForceAsServer"); return dst; } diff --git a/AquaMai/AquaMai.Mods/GameSettings/ForceAsServer.cs b/AquaMai/AquaMai.Mods/GameSettings/ForceAsServer.cs index 814fc3ee..eebcaef9 100644 --- a/AquaMai/AquaMai.Mods/GameSettings/ForceAsServer.cs +++ b/AquaMai/AquaMai.Mods/GameSettings/ForceAsServer.cs @@ -6,7 +6,8 @@ namespace AquaMai.Mods.GameSettings; [ConfigSection( en: "If you want to configure in-shop party-link, you should turn this off.", - zh: "如果要配置店内招募的话,应该要把这个关闭")] + zh: "如果要配置店内招募的话,应该要把这个关闭", + defaultOn: true)] public class ForceAsServer { [HarmonyPrefix]