File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -27,14 +27,14 @@ public class CoreModule : BaseModule
2727
2828 private bool _wasCacheInvalidated ;
2929
30- private static bool ShouldLoad ( string [ ] disabled , string modInfoLocation )
30+ private static bool ShouldLoad ( IEnumerable < string > disabled , string modInfoLocation )
3131 {
3232 if ( ! File . Exists ( modInfoLocation ) )
3333 return false ;
3434 try
3535 {
3636 var metadata = JsonConvert . DeserializeObject < ModInfo > ( File . ReadAllText ( modInfoLocation ) ) ;
37- return metadata . ModID == null || ! disabled . Contains ( metadata . ModID ) ;
37+ return metadata . ModID == null || disabled . All ( x => x != metadata . ModID ) ;
3838 }
3939 catch
4040 {
@@ -90,8 +90,8 @@ public override void PreLoad()
9090 var gameDataModsExists = Directory . Exists ( Path . Combine ( Paths . GameRootPath , "GameData/Mods" ) ) ;
9191
9292 // Go here instead so that the static constructor recognizes everything
93- var disabledPlugins = File . ReadAllText ( Path . Combine ( Paths . BepInExRootPath , "disabled_plugins.cfg" ) )
94- . Split ( new [ ] { '\n ' } , StringSplitOptions . RemoveEmptyEntries ) ;
93+ var disabledPlugins = File . ReadAllText ( SpaceWarp . Preload . API . CommonPaths . DisabledPluginsFilepath )
94+ . Split ( new [ ] { '\n ' } , StringSplitOptions . RemoveEmptyEntries ) . Select ( x => x . Trim ( ) ) . ToList ( ) ;
9595
9696 var modFolders = Directory . GetDirectories ( Paths . PluginPath , "*" , SearchOption . AllDirectories )
9797 . Where ( dir => ShouldLoad ( disabledPlugins , Path . Combine ( dir , "swinfo.json" ) ) )
Original file line number Diff line number Diff line change 55 <PackageReference Include =" BepInEx.AssemblyPublicizer.MSBuild" Version =" 0.4.1" PrivateAssets =" all" />
66 <PackageReference Include =" KerbalSpaceProgram2.GameLibs" Version =" 0.2.0" PrivateAssets =" all" Publicize =" true" />
77 <PackageReference Include =" Premonition.Core" Version =" 0.1.0" />
8- <PackageReference Include =" SpaceWarp" Version =" 1.7.0 " PrivateAssets =" all" Publicize =" true" />
8+ <PackageReference Include =" SpaceWarp" Version =" 1.8.1 " PrivateAssets =" all" Publicize =" true" />
99 </ItemGroup >
1010 <ItemGroup Label =" Project references" >
1111 <ProjectReference Include =" $(SolutionDir)/src/PatchManager.SassyPatching/PatchManager.SassyPatching.csproj" Private =" false" />
You can’t perform that action at this time.
0 commit comments