From e38a37801ba041054d1d0a3b1998244f0df50491 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Wed, 20 Aug 2025 13:25:18 -0700 Subject: [PATCH] Add a custom key for if someone makes a mod of the game it won't clash with the main savefile --- Assets/Scripts/BazookaManager.cs | 4 ++-- Assets/Scripts/SensitiveInfo.cs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/BazookaManager.cs b/Assets/Scripts/BazookaManager.cs index a5d55fe..0ad2e53 100644 --- a/Assets/Scripts/BazookaManager.cs +++ b/Assets/Scripts/BazookaManager.cs @@ -44,7 +44,7 @@ public class BazookaManager : MonoBehaviour public void Load() { - string path = Path.Join(Application.persistentDataPath, "BazookaManager.dat"); + string path = Path.Join(Application.persistentDataPath, SensitiveInfo.BAZOOKA_MANAGER_FILE_KEY + ".dat"); if (!File.Exists(path)) { File.Create(path).Dispose(); @@ -68,7 +68,7 @@ public class BazookaManager : MonoBehaviour #if UNITY_EDITOR return; #else - string path = Path.Join(Application.persistentDataPath, "BazookaManager.dat"); + string path = Path.Join(Application.persistentDataPath, SensitiveInfo.BAZOOKA_MANAGER_FILE_KEY + "BazookaManager.dat"); var encoded = SensitiveInfo.EncryptRaw(saveFile.ToString(Formatting.None), SensitiveInfo.BAZOOKA_MANAGER_KEY); if (encoded == null) return; using var fileStream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.None); diff --git a/Assets/Scripts/SensitiveInfo.cs b/Assets/Scripts/SensitiveInfo.cs index 2e3136c..a3b0fb7 100644 --- a/Assets/Scripts/SensitiveInfo.cs +++ b/Assets/Scripts/SensitiveInfo.cs @@ -10,6 +10,7 @@ public class SensitiveInfo public static readonly string SERVER_RECEIVE_TRANSFER_KEY = ""; public static readonly string SERVER_SEND_TRANSFER_KEY = ""; public static readonly string BAZOOKA_MANAGER_KEY = ""; + public static readonly string BAZOOKA_MANAGER_FILE_KEY = "9b9ad7a5a824436144083c19dd071d66"; public static string Encrypt(string plainText, string key) {