Skip to content

Commit

Permalink
SLManager-1.4.3
Browse files Browse the repository at this point in the history
- 调整存档备份流程
- 替换DotNetZip.dll与Taiwu本体相同版本
  • Loading branch information
sth4nothing committed Apr 20, 2019
1 parent c5e49f7 commit 036ad77
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 21 deletions.
7 changes: 7 additions & 0 deletions SLManager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,10 @@

## 1.4.1
- 修复了ionic.zip的调用问题,不再使用7z处理压缩文档

## 1.4.2
- 调整图标替换,适配新版本

## 1.4.3
- 调整存档备份流程
- 替换DotNetZip.dll与Taiwu本体相同版本
Binary file renamed SLManager/Ionic.Zip.dll → SLManager/DotNetZip.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion SLManager/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static class Main
private static string[] dlls = {
"I18N.dll",
"I18N.West.dll",
"Ionic.Zip.dll"
"DotNetZip.dll",
};

public static Settings settings;
Expand Down
23 changes: 3 additions & 20 deletions SLManager/Patch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static bool Prefix(int codepage, ref Encoding __result)
{
if (!Main.Enabled || codepage != 437)
return true;

__result = new I18N.West.CP437();
return false;
}
Expand Down Expand Up @@ -672,26 +672,9 @@ static void Prefix(SaveDateFile __instance)
__instance.saveSaveDate = false;
return;
}
}
}
}

/// <summary>
/// 存档后备份当前存档
/// </summary>
[HarmonyPatch(typeof(SaveDateFile), "EnsureFiles")]
public class SaveDateFile_EnsureFiles_Patch
{
static void Postfix()
{
try
{
// 保存存档前备份
SaveManager.Backup(SaveManager.AFTER_SAVE_BACKUP);
}
catch (Exception e)
{
Debug.Log(e);
}
}
}

Expand All @@ -706,7 +689,7 @@ static void Prefix(SaveDateFile __instance)
if (!Main.Enabled) return;

var df = DateFile.instance;
var savedate = new SaveData(df.GetActorName(), df.year, df.samsara, df.dayTrun,
var savedate = new SaveData(df.GetActorName(0, false, false), df.year, df.samsara, df.dayTrun,
df.playerSeatName, DateTime.Now);

var dirpath = typeof(SaveDateFile)
Expand Down

0 comments on commit 036ad77

Please sign in to comment.