@@ -19,7 +19,7 @@ public class ModManagerMod : IModApi
1919 private ModManagerAPI . ModSettings . ModSetting < int > currentModDirSetting ;
2020 private ModManagerAPI . ModSettings . ModSetting < string > openModDirButton ;
2121
22- private readonly ISet < string > modPaths = new HashSet < string > ( ) ;
22+ internal static readonly ISet < string > modPaths = new HashSet < string > ( ) ;
2323 private int selectedModDir ;
2424
2525 private bool showPatchNotesOnStartup = true , showUpdatesOnStartup = true ;
@@ -38,10 +38,10 @@ public ModManagerMod()
3838 private void AddBasePaths ( )
3939 {
4040 if ( MODS_BASE_PATH_LEGACY_FIELD != null )
41- this . modPaths . Add ( ( string ) MODS_BASE_PATH_LEGACY_FIELD . GetValue ( null ) ) ;
41+ modPaths . Add ( ( string ) MODS_BASE_PATH_LEGACY_FIELD . GetValue ( null ) ) ;
4242
4343 if ( MODS_BASE_PATH_PROPERTY != null )
44- this . modPaths . Add ( ( string ) MODS_BASE_PATH_PROPERTY . GetValue ( null ) ) ;
44+ modPaths . Add ( ( string ) MODS_BASE_PATH_PROPERTY . GetValue ( null ) ) ;
4545 }
4646
4747 public void InitMod ( global ::Mod _modInstance )
@@ -61,14 +61,14 @@ private void InitSettings(ModManagerAPI.ModSettings settings)
6161 {
6262 List < string > paths = value . Split ( ';' ) . ToList ( ) ;
6363
64- this . modPaths . Clear ( ) ;
64+ modPaths . Clear ( ) ;
6565
6666 this . AddBasePaths ( ) ;
6767 foreach ( var path in paths )
6868 {
69- this . modPaths . Add ( path ) ;
69+ modPaths . Add ( path ) ;
7070 }
71- this . loader . Load ( this . modPaths . ToArray ( ) ) ;
71+ this . loader . Load ( modPaths . ToArray ( ) ) ;
7272
7373 if ( currentModDirSetting != null )
7474 {
@@ -78,7 +78,7 @@ private void InitSettings(ModManagerAPI.ModSettings settings)
7878 if ( openModDirButton != null )
7979 openModDirButton . Update ( ) ;
8080 }
81- } , ( ) => this . modPaths . ToList ( ) . StringFromList ( ";" ) , toStr =>
81+ } , ( ) => modPaths . ToList ( ) . StringFromList ( ";" ) , toStr =>
8282 {
8383 int dirCount = toStr . Split ( ';' ) . Length ;
8484 return ( toStr , dirCount + " Director" + ( dirCount > 1 ? "ies" : "y" ) ) ;
@@ -96,18 +96,18 @@ private void InitSettings(ModManagerAPI.ModSettings settings)
9696
9797 if ( openModDirButton != null )
9898 openModDirButton . Update ( ) ;
99- } , ( ) => selectedModDir , toStr => ( toStr . ToString ( ) , toStr <= this . modPaths . Count && toStr > 0 ? this . modPaths . ToList ( ) [ toStr - 1 ] : "Choose a Mod Directory" ) , str =>
99+ } , ( ) => selectedModDir , toStr => ( toStr . ToString ( ) , toStr <= modPaths . Count && toStr > 0 ? modPaths . ToList ( ) [ toStr - 1 ] : "Choose a Mod Directory" ) , str =>
100100 {
101101 bool success = int . TryParse ( str , out int val ) ;
102102 return ( val , success ) ;
103- } ) . SetMinimumMaximumAndIncrementValues ( 0 , this . modPaths . Count , 1 ) ;
103+ } ) . SetMinimumMaximumAndIncrementValues ( 0 , modPaths . Count , 1 ) ;
104104
105105 this . openModDirButton = settings . Button ( "openModDirButton" , "xuiModManagerOpenModDirButton" , ( ) =>
106106 {
107- if ( selectedModDir > 0 && selectedModDir <= this . modPaths . Count )
108- UnityEngine . Application . OpenURL ( this . modPaths . ToList ( ) [ selectedModDir - 1 ] ) ;
107+ if ( selectedModDir > 0 && selectedModDir <= modPaths . Count )
108+ UnityEngine . Application . OpenURL ( modPaths . ToList ( ) [ selectedModDir - 1 ] ) ;
109109 } ,
110- ( ) => Localization . Get ( "xuiModManagerOpenModDirButtonText" ) ) . SetEnabled ( ( ) => this . modPaths . Count > 0 && selectedModDir > 0 && selectedModDir <= this . modPaths . Count ) ;
110+ ( ) => Localization . Get ( "xuiModManagerOpenModDirButtonText" ) ) . SetEnabled ( ( ) => modPaths . Count > 0 && selectedModDir > 0 && selectedModDir <= modPaths . Count ) ;
111111
112112 /*
113113 settings.Category("startup", "Startup");
0 commit comments