@@ -74,7 +74,6 @@ private void Start()
7474 catch ( Exception e )
7575 {
7676 Debug . LogException ( e ) ;
77- this . _modList . Remove ( mod . ModId ) ;
7877 }
7978 }
8079 this . postloading ( ) ;
@@ -170,20 +169,21 @@ private Dictionary<string, SFSMod> getModList()
170169 /// </summary>
171170 /// <param name="dependencies"> list of dependecies that you need to load first</param>
172171 /// <returns> true if all dependecies have been loaded </returns>
173- private bool loadDependencies ( SFSModDependencie [ ] dependencies )
172+ private bool loadDependencies ( Dictionary < string , string [ ] > dependencies )
174173 {
174+
175175 // for each mod dependencie
176- foreach ( SFSModDependencie dependencie in dependencies )
176+ foreach ( var item in dependencies )
177177 {
178178 // exist mod in the list?
179- if ( this . _modList . ContainsKey ( dependencie . ModId ) )
179+ if ( this . _modList . ContainsKey ( item . Key ) )
180180 {
181181 // get mod dependecie
182- SFSMod dependencieMod = this . _modList [ dependencie . ModId ] ;
182+ SFSMod dependencieMod = this . _modList [ item . Key ] ;
183183
184184 // verify if the dependencie version is the same that mod need
185185 bool versionFlag = false ;
186- foreach ( string version in dependencie . Versions )
186+ foreach ( string version in item . Value )
187187 {
188188 if ( verifyVersion ( dependencieMod . Version , version ) )
189189 {
@@ -201,7 +201,7 @@ private bool loadDependencies(SFSModDependencie[] dependencies)
201201 }
202202 }
203203 // dependencie not exist or is diferent version
204- throw new Exception ( "Is necesary install " + dependencie . ModId + " " + string . Join ( ", " , dependencie . Versions ) ) ;
204+ throw new Exception ( "Is necesary install " + item . Key + " " + string . Join ( ", " , item . Value ) ) ;
205205 }
206206 return true ;
207207 }
0 commit comments