Skip to content

Commit 0dcfeb8

Browse files
committed
updated dependencies to match new UnityRuntime dynamic link libraries, changed location of minimap spawning
1 parent e99039b commit 0dcfeb8

4 files changed

Lines changed: 30 additions & 13 deletions

File tree

MiniMapMod/MiniMapMod.csproj

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
<Private>false</Private>
2323
</Reference>
2424
<Reference Include="BepInEx">
25-
<HintPath>libs\BepInEx.dll</HintPath>
26-
<Private>false</Private>
25+
<HintPath>..\..\..\..\Users\user\AppData\Roaming\r2modmanPlus-local\RiskOfRain2\profiles\Modding\BepInEx\core\BepInEx.dll</HintPath>
26+
</Reference>
27+
<Reference Include="com.unity.multiplayer-hlapi.Runtime">
28+
<HintPath>libs\com.unity.multiplayer-hlapi.Runtime.dll</HintPath>
2729
</Reference>
2830
<Reference Include="Facepunch.Steamworks">
2931
<HintPath>libs\Facepunch.Steamworks.dll</HintPath>
@@ -81,6 +83,12 @@
8183
<HintPath>libs\Rewired_Windows_Lib.dll</HintPath>
8284
<Private>false</Private>
8385
</Reference>
86+
<Reference Include="RoR2">
87+
<HintPath>libs\RoR2.dll</HintPath>
88+
</Reference>
89+
<Reference Include="RoR2BepInExPack">
90+
<HintPath>..\..\..\..\Users\user\AppData\Roaming\r2modmanPlus-local\RiskOfRain2\profiles\Modding\BepInEx\plugins\RoR2BepInExPack\RoR2BepInExPack.dll</HintPath>
91+
</Reference>
8492
<Reference Include="SimpleJSON">
8593
<HintPath>libs\SimpleJSON.dll</HintPath>
8694
<Private>false</Private>
@@ -181,6 +189,9 @@
181189
<HintPath>libs\UnityEngine.IMGUIModule.dll</HintPath>
182190
<Private>false</Private>
183191
</Reference>
192+
<Reference Include="UnityEngine.InputLegacyModule">
193+
<HintPath>libs\UnityEngine.InputLegacyModule.dll</HintPath>
194+
</Reference>
184195
<Reference Include="UnityEngine.InputModule">
185196
<HintPath>libs\UnityEngine.InputModule.dll</HintPath>
186197
<Private>false</Private>

MiniMapMod/MiniMapPlugin.cs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
using BepInEx;
2-
using R2API;
3-
using R2API.Utils;
42
using RoR2;
53
using UnityEngine;
64
using MiniMapLibrary;
75
using System.Collections.Generic;
86
using System.Linq;
97
using System;
10-
using UnityEngine.UI;
11-
using UnityEngine.Networking;
128

139
namespace MiniMapMod
1410
{
15-
[BepInPlugin("MiniMap", "Mini Map Mod", "2.0.4")]
11+
[BepInPlugin("MiniMap", "Mini Map Mod", "3.0.0")]
1612
public class MiniMapPlugin : BaseUnityPlugin
1713
{
1814
private readonly ISpriteManager SpriteManager = new SpriteManager();
@@ -31,19 +27,22 @@ public void Awake()
3127
{
3228
Log.Init(Logger);
3329

30+
Log.LogInfo("MINIMAP: Creating scene scan hooks");
31+
3432
GlobalEventManager.onCharacterDeathGlobal += (x) => ScanScene();
3533
GlobalEventManager.OnInteractionsGlobal += (x, y, z) => ScanScene();
3634
}
3735

3836
//The Update() method is run on every frame of the game.
3937
private void Update()
4038
{
41-
if (Input.GetKeyDown(KeyCode.M))
39+
if (UnityEngine.Input.GetKeyDown(KeyCode.M))
4240
{
4341
Enable = !Enable;
4442

4543
if (Enable == false)
4644
{
45+
Log.LogInfo("MINIMAP: Resetting minimap");
4746
Reset();
4847
return;
4948
}
@@ -129,23 +128,25 @@ private bool TryCreateMinimap()
129128

130129
if (objectivePanel == null || this.SpriteManager == null)
131130
{
131+
Log.LogInfo("MINIMAP: ObjectivePanel was not found, cancelling creating minimap");
132132
Minimap.Destroy();
133133
return false;
134134
}
135135

136-
Transform parentTransform = objectivePanel.transform.Find("StripContainer");
136+
Transform parentTransform = objectivePanel.transform;//objectivePanel.transform.Find("StripContainer");
137137

138138
if (parentTransform == null)
139139
{
140+
Log.LogInfo("MINIMAP: Subcontainer on ObjectivePanel wasn't found, cancelling creating minimap");
140141
Minimap.Destroy();
141142
return false;
142143
}
143144

144-
Log.LogInfo("Creating Minimap");
145+
Log.LogInfo("MINIMAP: Creating Minimap object");
145146

146147
Minimap.CreateMinimap(this.SpriteManager, parentTransform.gameObject);
147148

148-
Log.LogInfo("Finished creating Minimap");
149+
Log.LogInfo("MINIMAP: Finished creating Minimap");
149150

150151
return true;
151152
}
@@ -174,6 +175,8 @@ private void ScanStaticTypes()
174175
return;
175176
}
176177

178+
Log.LogInfo("MINIMAP: Scanning scene for container/object changes");
179+
177180
RegisterMonobehaviorType<ChestBehavior>(InteractableKind.Chest, dynamicObject: false);
178181

179182
RegisterMonobehaviorType<ShrineBloodBehavior>(InteractableKind.Shrine, dynamicObject: false);

MiniMapMod/Minimap.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ public void CreateMinimap(ISpriteManager spriteManager, GameObject Parent)
3131

3232
SetParent(gameObject, Parent);
3333

34+
// make sure it's the last thing within the objective box
35+
gameObject.transform.SetAsFirstSibling();
36+
3437
CreateIconContainer();
3538

3639
CreatePlayerIcon(spriteManager);

manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "MiniMapMod",
3-
"version_number": "2.0.4",
3+
"version_number": "3.0.0",
44
"website_url": "https://github.com/DekuDesu",
5-
"description": "Adds a MiniMap to your game v2.0.4",
5+
"description": "Adds a MiniMap to your game v3.0",
66
"dependencies": [
77
"bbepis-BepInExPack-5.4.9",
88
"RiskofThunder-HookGenPatcher-1.2.1"

0 commit comments

Comments
 (0)