mirror of
https://github.com/EggLinks/DanhengServer-OpenSource.git
synced 2026-01-02 20:26:03 +08:00
feat: support resources cache
This commit is contained in:
@@ -23,6 +23,16 @@ public static class HandbookGenerator
|
||||
{
|
||||
if (langFile.Extension != ".json") return;
|
||||
var lang = langFile.Name.Replace("TextMap", "").Replace(".json", "");
|
||||
|
||||
// Check if handbook needs to regenerate
|
||||
var handbookPath = $"GM Handbook/GM Handbook {lang}.txt";
|
||||
if (File.Exists(handbookPath))
|
||||
{
|
||||
var handbookInfo = new FileInfo(handbookPath);
|
||||
if (handbookInfo.LastWriteTime >= langFile.LastWriteTime)
|
||||
continue; // Skip if handbook is newer than language file
|
||||
}
|
||||
|
||||
Generate(lang);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user