-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,8 @@ namespace RealTime.Core | |
/// </summary> | ||
public sealed class RealTimeMod : LoadingExtensionBase, IUserMod | ||
{ | ||
private const long WorkshopId = 1420955187; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
dymanoid
Author
Owner
|
||
|
||
private readonly string modVersion = GitVersion.GetAssemblyVersion(typeof(RealTimeMod).Assembly); | ||
private readonly string modPath = GetModPath(); | ||
|
||
|
@@ -119,8 +121,10 @@ public override void OnLevelUnloading() | |
|
||
private static string GetModPath() | ||
{ | ||
string assemblyName = typeof(RealTimeMod).Assembly.GetName().Name; | ||
|
||
PluginManager.PluginInfo pluginInfo = PluginManager.instance.GetPluginsInfo() | ||
.FirstOrDefault(pi => pi.name == typeof(RealTimeMod).Assembly.GetName().Name); | ||
.FirstOrDefault(pi => pi.name == assemblyName || pi.publishedFileID.AsUInt64 == WorkshopId); | ||
|
||
return pluginInfo == null | ||
? Environment.CurrentDirectory | ||
|
Shouldn't this be a
ulong
instead oflong
?Additional info: #153