Skip to content

Commit

Permalink
Fix not detecting delete events from within the game
Browse files Browse the repository at this point in the history
  • Loading branch information
DeathWeasel1337 authored Oct 26, 2018
1 parent 7fe7564 commit 0c81089
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions KK_ReloadCharaListOnChange/KK_ReloadCharaListOnChange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ private void SceneUnloaded(Scene s)
if (s.name == "CustomScene")
{
InCharaMaker = false;
DoRefresh = false;
EventFromCharaMaker = false;
CardTimer.Dispose();
CharacterCardWatcher.Dispose();
CharacterCardEventList.Clear();
Expand Down Expand Up @@ -327,12 +329,12 @@ public static void SaveCharaFilePrefix()
/// <summary>
/// When saving the a new coordinate card in game set a flag
/// </summary>
/// [HarmonyPrefix]
[HarmonyPrefix]
[HarmonyPatch(typeof(ChaFileCoordinate), nameof(ChaFileCoordinate.SaveFile), new[] { typeof(string) })]
public static void SaveCoordinateFilePrefix()
public static void SaveCoordinateFilePrefix(string path)
{
if (InCharaMaker)
if (Singleton<CustomBase>.Instance.customCtrl.saveNew == true)
if (!File.Exists(path)) //saving new
EventFromCharaMaker = true;
}
/// <summary>
Expand Down

0 comments on commit 0c81089

Please sign in to comment.