mirror of
https://gitea.tendokyu.moe/beerpsi/sinmai-mods.git
synced 2024-11-30 18:24:39 +01:00
32 lines
736 B
C#
32 lines
736 B
C#
// ReSharper disable CheckNamespace
|
|
// ReSharper disable InconsistentNaming
|
|
|
|
using System.IO;
|
|
using DB;
|
|
using MonoMod;
|
|
using UnityEngine;
|
|
|
|
namespace Process;
|
|
|
|
[method: MonoModIgnore]
|
|
public class patch_PowerOnProcess(ProcessDataContainer dataContainer) : PowerOnProcess(dataContainer)
|
|
{
|
|
private extern void orig_OnStart();
|
|
|
|
public override void OnStart()
|
|
{
|
|
var dbPath = Path.Combine(Application.streamingAssetsPath, "DB");
|
|
|
|
if (Directory.Exists(dbPath))
|
|
{
|
|
DBLoader.LoadAll(dbPath);
|
|
}
|
|
else
|
|
{
|
|
Directory.CreateDirectory(dbPath);
|
|
DBLoader.DumpAll(dbPath);
|
|
}
|
|
|
|
orig_OnStart();
|
|
}
|
|
} |