Skip to content

Commit

Permalink
Update for latest IDE.
Browse files Browse the repository at this point in the history
  • Loading branch information
nkrapivin committed Aug 15, 2021
1 parent 6162ffc commit 570fcd3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions ZplDiscordPlugin/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.3.0.0")]
[assembly: AssemblyFileVersion("1.3.0.0")]
10 changes: 5 additions & 5 deletions ZplDiscordPlugin/ZplDiscordPlugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,19 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="CoreResources">
<HintPath>..\..\..\..\..\Games\Steam\steamapps\common\GameMaker Studio 2 Desktop\CoreResources.dll</HintPath>
<HintPath>..\..\..\..\Progs\GameMakerStudio\23\IDE\CoreResources.dll</HintPath>
</Reference>
<Reference Include="DiscordRPC, Version=1.0.175.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DiscordRichPresence.1.0.175\lib\net35\DiscordRPC.dll</HintPath>
</Reference>
<Reference Include="IDE">
<HintPath>..\..\..\..\..\Games\Steam\steamapps\common\GameMaker Studio 2 Desktop\IDE.dll</HintPath>
<HintPath>..\..\..\..\Progs\GameMakerStudio\23\IDE\IDE.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json">
<HintPath>..\..\..\..\Progs\GameMakerStudio\23\IDE\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Utils">
<HintPath>..\..\..\..\..\Games\Steam\steamapps\common\GameMaker Studio 2 Desktop\Utils.dll</HintPath>
<HintPath>..\..\..\..\Progs\GameMakerStudio\23\IDE\Utils.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
12 changes: 10 additions & 2 deletions ZplDiscordPlugin/ZplDiscordPluginCommand.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using DiscordRPC;
using DiscordRPC.Logging;
using DiscordRPC.Message;
using YoYoStudio.GUI;
using YoYoStudio.Plugins.Attributes;
using YoYoStudio.Resources;

Expand Down Expand Up @@ -90,8 +90,14 @@ public void OnRpcReady(object sender, ReadyMessage args)

public void Initialise(ModulePackage _ide)
{
LockObject = new object();
IdeInterface = _ide;
OnIdeInitialised();
}

public void OnIdeInitialised()
{
LockObject = new object();

UILogger = new ZplDiscordPluginLogger(); // <-- this will log into ui.log
RichPresenceAssets = new Assets();
RpcClient = new DiscordRpcClient("857230153015754772", -1, UILogger, false);
Expand Down Expand Up @@ -129,6 +135,8 @@ protected virtual void Dispose(bool disposing)
// TODO: free unmanaged resources (unmanaged objects) and override a finalizer below.
// TODO: set large fields to null.
RpcClient = null;
UILogger = null;
IdeInterface = null;

disposed = true;
}
Expand Down

0 comments on commit 570fcd3

Please sign in to comment.