Merge branch 'main' of https://gitea.tendokyu.moe/akanyan/mu3-mods into InfiniteStory
This commit is contained in:
commit
a6da232705
@ -12,7 +12,9 @@ class patch_OperationManager: OperationManager {
|
||||
~patch_OperationManager() {
|
||||
try {
|
||||
File.WriteAllText(_fileName, MovieIndex.ToString());
|
||||
} catch(Exception) { }
|
||||
} catch(Exception ex) {
|
||||
System.Console.WriteLine(ex);
|
||||
}
|
||||
}
|
||||
public int MovieIndex {
|
||||
set {
|
||||
@ -41,7 +43,9 @@ class patch_OperationManager: OperationManager {
|
||||
orig_initialize();
|
||||
|
||||
using IniFile iniFile = new("mu3.ini");
|
||||
_fileName = Path.Combine(iniFile.getValue("Extra", "CacheDir", "."), "data_advert_cache.txt");
|
||||
var dir = iniFile.getValue("Extra", "CacheDir", ".");
|
||||
Directory.CreateDirectory(dir);
|
||||
_fileName = Path.Combine(dir, "data_advert_cache.txt");
|
||||
|
||||
try {
|
||||
_movieIndex = Math.Max(0, int.Parse(File.ReadAllText(_fileName)));
|
||||
|
@ -13,7 +13,9 @@ public class patch_DataStudioManager: DataStudioManager {
|
||||
|
||||
private static void initCache() {
|
||||
using IniFile iniFile = new("mu3.ini");
|
||||
_fileName = Path.Combine(iniFile.getValue("Extra", "CacheDir", "."), "data_cache.bin");
|
||||
var dir = iniFile.getValue("Extra", "CacheDir", ".");
|
||||
Directory.CreateDirectory(dir);
|
||||
_fileName = Path.Combine(dir, "data_cache.bin");
|
||||
|
||||
if(File.Exists(_fileName)) {
|
||||
System.Console.WriteLine("Loading data cache...");
|
||||
|
Loading…
Reference in New Issue
Block a user