minor fix

This commit is contained in:
2025-09-05 23:53:03 +08:00
parent a446a17d02
commit 9d586d68e0
2 changed files with 9 additions and 10 deletions
+8 -10
View File
@@ -230,7 +230,7 @@ public class MoreSettings
private static class PermanentPatch
{
private static void ResetSettings()
public static void ResetSettings()
{
_gameMinDist = 2;
_gameMinStep = 2;
@@ -238,15 +238,6 @@ public class MoreSettings
_gameFlatten = 0.18;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(GameData), nameof(GameData.Import))]
private static void GameData_Import_Prefix(GameData __instance)
{
// Skip prologue demo save
if (DSPGame.IsMenuDemo && DSPGame.LoadDemoIndex == -99) return;
ResetSettings();
}
[HarmonyPrefix]
[HarmonyPatch(typeof(GameData), nameof(GameData.SetForNewGame))]
private static void GameData_SetForNewGame_Prefix(GameData __instance)
@@ -803,5 +794,12 @@ public class MoreSettings
_gameMaxStep = r.ReadDouble();
_gameFlatten = r.ReadDouble();
}
public static void IntoOtherSave()
{
// Skip prologue demo save
if (DSPGame.IsMenuDemo && DSPGame.LoadDemoIndex == -99) return;
PermanentPatch.ResetSettings();
}
#endregion
}
+1
View File
@@ -82,6 +82,7 @@ public class UniverseGenTweaks : BaseUnityPlugin, IModCanSave
public void IntoOtherSave()
{
MoreSettings.IntoOtherSave();
}
#endregion
}