[F] Set ForceAsSserver to default ON (#92)

* Set ForceAsSserver to default ON

* work as origin

---------

Co-authored-by: Clansty <i@gao4.pw>
pull/94/head
Menci 2024-11-30 14:43:25 +08:00 committed by GitHub
parent d5a9c98ff9
commit 6225390b7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -125,7 +125,10 @@ public class ConfigMigration_V1_0_V2_0 : IConfigMigration
{
dst.SetValue("GameSystem.RemoveEncryption.Disabled", true); // Enabled by default in V2
}
MapBooleanTrueToSectionEnable(src, dst, "Fix.ForceAsServer", "GameSettings.ForceAsServer");
if (!src.GetValueOrDefault<bool>("Fix.ForceAsServer", true))
{
dst.SetValue("GameSettings.ForceAsServer.Disabled", true); // Enabled by default in V2
}
if (src.GetValueOrDefault<bool>("Fix.ForceFreePlay"))
{
dst.SetValue("GameSettings.CreditConfig.IsFreePlay", true);
@ -297,6 +300,7 @@ public class ConfigMigration_V1_0_V2_0 : IConfigMigration
// Default enabled in V2
dst.EnsureDictionary("GameSystem.RemoveEncryption");
dst.EnsureDictionary("GameSettings.ForceAsServer");
return dst;
}

View File

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