mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-08 22:13:30 +08:00
minor fix
This commit is contained in:
@@ -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
|
||||
}
|
||||
@@ -82,6 +82,7 @@ public class UniverseGenTweaks : BaseUnityPlugin, IModCanSave
|
||||
|
||||
public void IntoOtherSave()
|
||||
{
|
||||
MoreSettings.IntoOtherSave();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user