1010using PatchManager . Shared ;
1111using PatchManager . Shared . Modules ;
1212using ReduxLib . Configuration ;
13- using SpaceWarp . API . Mods . JSON ;
13+ using SpaceWarp2 . API . Mods . JSON ;
1414using UniLinq ;
1515using Unity . VisualScripting ;
1616using UnityEngine ;
@@ -66,7 +66,7 @@ private static bool NoSwinfo(DirectoryInfo directory, DirectoryInfo gameRoot)
6666 /// </summary>
6767 public override void Init ( )
6868 {
69- if ( _shouldAlwaysInvalidate . Value || SpaceWarp . API . Mods . PluginList . ModListChangedSinceLastRun )
69+ if ( _shouldAlwaysInvalidate . Value || SpaceWarp2 . API . Mods . PluginList . ModListChangedSinceLastRun )
7070 {
7171 CacheManager . CreateCacheFolderIfNotExists ( ) ;
7272 CacheManager . InvalidateCache ( ) ;
@@ -77,19 +77,19 @@ public override void Init()
7777 if ( ! isValid )
7878 {
7979 _wasCacheInvalidated = true ;
80- SpaceWarp . API . Loading . Loading . GeneralLoadingActions . Insert ( 0 , ( ) => new FlowAction ( "Patch Manager: loading Patches from Addressables" ,
80+ SpaceWarp2 . API . Loading . Loading . GeneralLoadingActions . Insert ( 0 , ( ) => new FlowAction ( "Patch Manager: loading Patches from Addressables" ,
8181 LoadPatchesFromAddressables ) ) ;
82- SpaceWarp . API . Loading . Loading . GeneralLoadingActions . Insert ( 1 , ( ) => new FlowAction ( "Patch Manager: Registering all patches" , RegisterAllPatches ) ) ;
83- SpaceWarp . API . Loading . Loading . GeneralLoadingActions . Insert ( 2 ,
82+ SpaceWarp2 . API . Loading . Loading . GeneralLoadingActions . Insert ( 1 , ( ) => new FlowAction ( "Patch Manager: Registering all patches" , RegisterAllPatches ) ) ;
83+ SpaceWarp2 . API . Loading . Loading . GeneralLoadingActions . Insert ( 2 ,
8484 ( ) => new FlowAction ( "Patch Manager: Creating New Assets" , PatchingManager . CreateNewAssets ) ) ;
85- SpaceWarp . API . Loading . Loading . GeneralLoadingActions . Insert ( 3 ,
85+ SpaceWarp2 . API . Loading . Loading . GeneralLoadingActions . Insert ( 3 ,
8686 ( ) => new FlowAction ( "Patch Manager: Rebuilding Cache" , PatchingManager . RebuildAllCache ) ) ;
87- SpaceWarp . API . Loading . Loading . GeneralLoadingActions . Insert ( 4 ,
87+ SpaceWarp2 . API . Loading . Loading . GeneralLoadingActions . Insert ( 4 ,
8888 ( ) => new FlowAction ( "Patch Manager: Registering Resource Locator" , RegisterResourceLocator ) ) ;
8989 }
9090 else
9191 {
92- SpaceWarp . API . Loading . Loading . GeneralLoadingActions . Insert ( 0 ,
92+ SpaceWarp2 . API . Loading . Loading . GeneralLoadingActions . Insert ( 0 ,
9393 ( ) => new FlowAction ( "Patch Manager: Registering Resource Locator" , RegisterResourceLocator ) ) ;
9494 }
9595 }
@@ -116,10 +116,10 @@ private static void LoadPatchesFromAddressables(Action resolve, Action<string> r
116116 public override void PreLoad ( )
117117 {
118118 // Go here instead so that the static constructor recognizes everything
119- var disabledPlugins = File . ReadAllText ( SpaceWarp . API . CommonPaths . DisabledPlugins )
119+ var disabledPlugins = File . ReadAllText ( SpaceWarp2 . API . CommonPaths . DisabledPlugins )
120120 . Split ( new [ ] { '\n ' } , StringSplitOptions . RemoveEmptyEntries ) . Select ( x => x . Trim ( ) ) . ToList ( ) ;
121121
122- var modFolders = Directory . GetDirectories ( SpaceWarp . API . CommonPaths . ModsFolder , "*" , SearchOption . AllDirectories )
122+ var modFolders = Directory . GetDirectories ( SpaceWarp2 . API . CommonPaths . ModsFolder , "*" , SearchOption . AllDirectories )
123123 . Where ( dir => ShouldLoad ( disabledPlugins , Path . Combine ( dir , "swinfo.json" ) ) )
124124 . Select ( x => (
125125 Folder : x ,
@@ -130,7 +130,7 @@ public override void PreLoad()
130130 var gameRoot = new DirectoryInfo ( "." ) ;
131131
132132 var standalonePatches = Directory . EnumerateFiles (
133- SpaceWarp . API . CommonPaths . ModsFolder ,
133+ SpaceWarp2 . API . CommonPaths . ModsFolder ,
134134 "*.patch" ,
135135 SearchOption . AllDirectories
136136 )
0 commit comments