|
|
@@ -35,6 +35,12 @@ namespace GamecraftModdingAPI.Utility |
|
|
|
/// </summary> |
|
|
|
public static void Enable() |
|
|
|
{ |
|
|
|
if (!SerializerManager.ExistsSerializer(typeof(ModVersionStruct).FullName)) |
|
|
|
{ |
|
|
|
SerializerManager.AddSerializer<ModVersionDescriptor>(new SimpleEntitySerializer<ModVersionDescriptor>( |
|
|
|
(_) => { return new EGID[1] { new EGID(0u, ApiExclusiveGroups.versionGroup) }; } |
|
|
|
)); |
|
|
|
} |
|
|
|
EventManager.AddEventEmitter(versionEngine); |
|
|
|
isEnabled = true; |
|
|
|
} |
|
|
@@ -48,12 +54,8 @@ namespace GamecraftModdingAPI.Utility |
|
|
|
isEnabled = false; |
|
|
|
} |
|
|
|
|
|
|
|
public static void Init() |
|
|
|
{ |
|
|
|
SerializerManager.AddSerializer<ModVersionDescriptor>(new SimpleEntitySerializer<ModVersionDescriptor>( |
|
|
|
(_) => { return new EGID[1] { new EGID(0u, ApiExclusiveGroups.versionGroup) }; } |
|
|
|
)); |
|
|
|
} |
|
|
|
public static void Init() { } |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
internal class VersionTrackingEngine : IEventEmitterEngine |
|
|
|