diff --git a/MiniMapMod/MiniMapMod.csproj b/MiniMapMod/MiniMapMod.csproj
index 1fda4b4..05f1460 100644
--- a/MiniMapMod/MiniMapMod.csproj
+++ b/MiniMapMod/MiniMapMod.csproj
@@ -22,8 +22,10 @@
false
- libs\BepInEx.dll
- false
+ libs\BepInEx.dll
+
+
+ libs\com.unity.multiplayer-hlapi.Runtime.dll
libs\Facepunch.Steamworks.dll
@@ -81,6 +83,9 @@
libs\Rewired_Windows_Lib.dll
false
+
+ libs\RoR2.dll
+
libs\SimpleJSON.dll
false
@@ -181,6 +186,9 @@
libs\UnityEngine.IMGUIModule.dll
false
+
+ libs\UnityEngine.InputLegacyModule.dll
+
libs\UnityEngine.InputModule.dll
false
diff --git a/MiniMapMod/MiniMapPlugin.cs b/MiniMapMod/MiniMapPlugin.cs
index 2ad5e10..c4d6b54 100644
--- a/MiniMapMod/MiniMapPlugin.cs
+++ b/MiniMapMod/MiniMapPlugin.cs
@@ -1,18 +1,14 @@
using BepInEx;
-using R2API;
-using R2API.Utils;
using RoR2;
using UnityEngine;
using MiniMapLibrary;
using System.Collections.Generic;
using System.Linq;
using System;
-using UnityEngine.UI;
-using UnityEngine.Networking;
namespace MiniMapMod
{
- [BepInPlugin("MiniMap", "Mini Map Mod", "2.0.4")]
+ [BepInPlugin("MiniMap", "Mini Map Mod", "3.0.0")]
public class MiniMapPlugin : BaseUnityPlugin
{
private readonly ISpriteManager SpriteManager = new SpriteManager();
@@ -31,6 +27,8 @@ public void Awake()
{
Log.Init(Logger);
+ Log.LogInfo("MINIMAP: Creating scene scan hooks");
+
GlobalEventManager.onCharacterDeathGlobal += (x) => ScanScene();
GlobalEventManager.OnInteractionsGlobal += (x, y, z) => ScanScene();
}
@@ -38,12 +36,13 @@ public void Awake()
//The Update() method is run on every frame of the game.
private void Update()
{
- if (Input.GetKeyDown(KeyCode.M))
+ if (UnityEngine.Input.GetKeyDown(KeyCode.M))
{
Enable = !Enable;
if (Enable == false)
{
+ Log.LogInfo("MINIMAP: Resetting minimap");
Reset();
return;
}
@@ -129,23 +128,25 @@ private bool TryCreateMinimap()
if (objectivePanel == null || this.SpriteManager == null)
{
+ Log.LogInfo("MINIMAP: ObjectivePanel was not found, cancelling creating minimap");
Minimap.Destroy();
return false;
}
- Transform parentTransform = objectivePanel.transform.Find("StripContainer");
+ Transform parentTransform = objectivePanel.transform;//objectivePanel.transform.Find("StripContainer");
if (parentTransform == null)
{
+ Log.LogInfo("MINIMAP: Subcontainer on ObjectivePanel wasn't found, cancelling creating minimap");
Minimap.Destroy();
return false;
}
- Log.LogInfo("Creating Minimap");
+ Log.LogInfo("MINIMAP: Creating Minimap object");
Minimap.CreateMinimap(this.SpriteManager, parentTransform.gameObject);
- Log.LogInfo("Finished creating Minimap");
+ Log.LogInfo("MINIMAP: Finished creating Minimap");
return true;
}
@@ -174,6 +175,8 @@ private void ScanStaticTypes()
return;
}
+ Log.LogInfo("MINIMAP: Scanning scene for container/object changes");
+
RegisterMonobehaviorType(InteractableKind.Chest, dynamicObject: false);
RegisterMonobehaviorType(InteractableKind.Shrine, dynamicObject: false);
diff --git a/MiniMapMod/Minimap.cs b/MiniMapMod/Minimap.cs
index f2f8610..a46d429 100644
--- a/MiniMapMod/Minimap.cs
+++ b/MiniMapMod/Minimap.cs
@@ -31,6 +31,9 @@ public void CreateMinimap(ISpriteManager spriteManager, GameObject Parent)
SetParent(gameObject, Parent);
+ // make sure it's the last thing within the objective box
+ gameObject.transform.SetAsFirstSibling();
+
CreateIconContainer();
CreatePlayerIcon(spriteManager);
diff --git a/manifest.json b/manifest.json
index 9916b23..8d49ae0 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,8 +1,8 @@
{
"name": "MiniMapMod",
- "version_number": "2.0.4",
+ "version_number": "3.0.0",
"website_url": "https://github.com/DekuDesu",
- "description": "Adds a MiniMap to your game v2.0.4",
+ "description": "Adds a MiniMap to your game v3.0",
"dependencies": [
"bbepis-BepInExPack-5.4.9",
"RiskofThunder-HookGenPatcher-1.2.1"