Browse Source

Upgrade to GCIPA v4.0

tags/v1.2.0
NGnius (Graham) 4 years ago
parent
commit
364cc5cbfb
2 changed files with 7 additions and 13 deletions
  1. +1
    -1
      GameSDKcraft/GameSDKcraft.csproj
  2. +6
    -12
      GameSDKcraft/Plugin.cs

+ 1
- 1
GameSDKcraft/GameSDKcraft.csproj View File

@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Version>1.1.0</Version>
<Version>1.2.0</Version>
<Authors>Me</Authors>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://git.exmods.org/???/???</PackageProjectUrl>


+ 6
- 12
GameSDKcraft/Plugin.cs View File

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


Loading…
Cancel
Save