11using BepInEx ;
2- using R2API ;
3- using R2API . Utils ;
42using RoR2 ;
53using UnityEngine ;
64using MiniMapLibrary ;
75using System . Collections . Generic ;
86using System . Linq ;
97using System ;
10- using UnityEngine . UI ;
11- using UnityEngine . Networking ;
128
139namespace 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 ) ;
0 commit comments