|
|
@@ -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) |
|
|
|
{ |
|
|
|