|
@@ -14,14 +14,33 @@ namespace ExtensibleSaveFormat
|
|
|
|
|
|
public override Version Version => new Version("1.0");
|
|
public override Version Version => new Version("1.0");
|
|
|
|
|
|
|
|
+ void Awake()
|
|
|
|
+ {
|
|
|
|
+ Hooks.InstallHooks();
|
|
|
|
+ }
|
|
|
|
|
|
internal static Dictionary<ChaFile, Dictionary<string, object>> internalDictionary = new Dictionary<ChaFile, Dictionary<string, object>>();
|
|
internal static Dictionary<ChaFile, Dictionary<string, object>> internalDictionary = new Dictionary<ChaFile, Dictionary<string, object>>();
|
|
|
|
|
|
- public ExtensibleSaveFormat()
|
|
|
|
|
|
+ #region Events
|
|
|
|
+
|
|
|
|
+ public delegate void CardEventHandler(ChaFile file);
|
|
|
|
+
|
|
|
|
+ public static event CardEventHandler CardBeingSaved;
|
|
|
|
+
|
|
|
|
+ public static event CardEventHandler CardBeingLoaded;
|
|
|
|
+
|
|
|
|
+ internal static void writeEvent(ChaFile file)
|
|
{
|
|
{
|
|
- Hooks.InstallHooks();
|
|
|
|
|
|
+ CardBeingSaved?.Invoke(file);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ internal static void readEvent(ChaFile file)
|
|
|
|
+ {
|
|
|
|
+ CardBeingLoaded?.Invoke(file);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ #endregion
|
|
|
|
+
|
|
|
|
|
|
public static bool TryGetExtendedFormat(ChaFile file, out Dictionary<string, object> extendedFormatData)
|
|
public static bool TryGetExtendedFormat(ChaFile file, out Dictionary<string, object> extendedFormatData)
|
|
{
|
|
{
|