From 364cc5cbfb4c5d7046bacdbc7c30102706b0c08f Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Sun, 23 Aug 2020 10:56:34 -0400 Subject: [PATCH] Upgrade to GCIPA v4.0 --- GameSDKcraft/GameSDKcraft.csproj | 2 +- GameSDKcraft/Plugin.cs | 18 ++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/GameSDKcraft/GameSDKcraft.csproj b/GameSDKcraft/GameSDKcraft.csproj index e0df8d8..e8e8ee1 100644 --- a/GameSDKcraft/GameSDKcraft.csproj +++ b/GameSDKcraft/GameSDKcraft.csproj @@ -3,7 +3,7 @@ net472 true - 1.1.0 + 1.2.0 Me MIT https://git.exmods.org/???/??? diff --git a/GameSDKcraft/Plugin.cs b/GameSDKcraft/Plugin.cs index c456515..7934e35 100644 --- a/GameSDKcraft/Plugin.cs +++ b/GameSDKcraft/Plugin.cs @@ -11,11 +11,11 @@ using Discord; namespace GamecraftRPC { - public class Plugin : IPlugin // the Illusion Plugin Architecture (IPA) will ignore classes that don't implement IPlugin' + public class Plugin : IEnhancedPlugin // the Illusion Plugin Architecture (IPA) will ignore classes that don't implement IPlugin' { - public string Name { get; } = Assembly.GetExecutingAssembly().GetName().Name; + public override string Name { get; } = Assembly.GetExecutingAssembly().GetName().Name; - public string Version { get; } = + public override string Version { get; } = #if DEBUG Assembly.GetExecutingAssembly().GetName().Version.ToString() + "alpha"; #else @@ -39,7 +39,7 @@ namespace GamecraftRPC internal static Discord.Discord DiscordRPC; // called when Gamecraft shuts down - public void OnApplicationQuit() + public override void OnApplicationQuit() { // Shutdown this mod if (DiscordRPC != null) @@ -53,7 +53,7 @@ namespace GamecraftRPC } // called when Gamecraft starts up - public void OnApplicationStart() + public override void OnApplicationStart() { // Initialize the Gamecraft modding API first GamecraftModdingAPI.Main.Init(); @@ -238,13 +238,7 @@ namespace GamecraftRPC GamecraftModdingAPI.Utility.Logging.MetaLog($"{Name} has started up"); } - public void OnFixedUpdate() { } // called once per physics update - - public void OnLevelWasInitialized(int level) { } // called after a level is initialized - - public void OnLevelWasLoaded(int level) { } // called after a level is loaded - - public void OnUpdate() // called once per rendered frame (frame update) + public override void OnUpdate() // called once per rendered frame (frame update) { if (DiscordRPC != null) {