Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Commit

Permalink
force mapstation plugin dll to load from winterland, fix typo in csproj
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode committed Dec 3, 2023
1 parent b76237e commit 6916d75
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Winterland.MapStation.Plugin/AssemblyDependencies.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Hack: Exists solely to force this DLL to load.
// To trigger this, other assemblies reference `typeof(AssemblyDependencies)`
// They could reference *anything* in this DLL, doesn't have to be this empty
// class.
namespace Winterland.MapStation.Plugin.Dependencies {
public class AssemblyDependencies {}
}
1 change: 1 addition & 0 deletions Winterland.Plugin/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class Plugin : BaseUnityPlugin {
// Hack: we must reference dependent assemblies from a class that's guaranteed to execute or else they don't
// load and MonoBehaviours are missing.
private static Type ForceLoadMapStationCommonAssembly = typeof(Winterland.MapStation.Common.Dependencies.AssemblyDependencies);
private static Type ForceLoadMapStationPluginAssembly = typeof(Winterland.MapStation.Plugin.Dependencies.AssemblyDependencies);

private void Awake() {
Instance = this;
Expand Down
2 changes: 1 addition & 1 deletion Winterland.Plugin/Winterland.Plugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<ItemGroup>
<ProjectReference Include="..\Winterland.MapStation.Common\Winterland.MapStation.Common.csproj" />
<ProjectReference Include="..\Winterland.MapStation.Common\Winterland.MapStation.Plugin.csproj" />
<ProjectReference Include="..\Winterland.MapStation.Plugin\Winterland.MapStation.Plugin.csproj" />
<ProjectReference Include="..\libs\BRC-CommonAPI\CommonAPI.csproj" />
<ProjectReference Include="..\Winterland.Common\Winterland.Common.csproj" />
</ItemGroup>
Expand Down

0 comments on commit 6916d75

Please sign in to comment.