Skip to content

Commit 930cf20

Browse files
Make "Backup Preferences" backup preferences every 5 minutes instead of every minute
1 parent b9fca98 commit 930cf20

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Menu/Main.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,15 @@ public static void Prefix()
666666
LogManager.Log("Automatically saved preferences");
667667

668668
if (BackupPreferences)
669-
File.WriteAllText($"{PluginInfo.BaseDirectory}/Backups/{ISO8601().Replace(":", ".")}.txt", Settings.SavePreferencesToText());
669+
{
670+
if (PreferenceBackupCount >= 5)
671+
{
672+
File.WriteAllText($"{PluginInfo.BaseDirectory}/Backups/{ISO8601().Replace(":", ".")}.txt", Settings.SavePreferencesToText());
673+
PreferenceBackupCount = 0;
674+
}
675+
676+
PreferenceBackupCount++;
677+
}
670678
}
671679
}
672680
catch { }
@@ -5960,6 +5968,7 @@ public static int buttonsType
59605968
public static float colorChangerDelay;
59615969
public static float autoSaveDelay = Time.time + 60f;
59625970
public static bool BackupPreferences;
5971+
public static int PreferenceBackupCount;
59635972

59645973
public static int notificationDecayTime = 1000;
59655974
public static int notificationSoundIndex;

PluginInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ public class PluginInfo
55
public const string GUID = "org.iidk.gorillatag.iimenu";
66
public const string Name = "ii's Stupid Menu";
77
public const string Description = "Created by @goldentrophy with love <3";
8-
public const string BuildTimestamp = "2025-08-08T03:59:04Z";
8+
public const string BuildTimestamp = "2025-08-08T04:06:44Z";
99
public const string Version = "6.8.1";
1010

1111
public const string BaseDirectory = "iisStupidMenu";

0 commit comments

Comments
 (0)