diff --git a/SpaceWarp.Core/API/Loading/Loading.cs b/SpaceWarp.Core/API/Loading/Loading.cs index cd154963..e9a0a82d 100644 --- a/SpaceWarp.Core/API/Loading/Loading.cs +++ b/SpaceWarp.Core/API/Loading/Loading.cs @@ -16,10 +16,6 @@ public static class Loading internal static List> DescriptorLoadingActionGenerators = new(); - internal static List> - FallbackDescriptorLoadingActionGenerators = - new(); - internal static List> LoadingActionGenerators = new(); internal static List> GeneralLoadingActions = new(); @@ -33,11 +29,7 @@ internal static List> public static void AddAssetLoadingAction(string subfolder, string name, Func> importFunction, params string[] extensions) { - AddModLoadingAction(name, - extensions.Length == 0 - ? CreateAssetLoadingActionWithoutExtension(subfolder, importFunction) - : CreateAssetLoadingActionWithExtensions(subfolder, importFunction, extensions)); - FallbackDescriptorLoadingActionGenerators.Add(d => new DescriptorLoadingAction(name, + DescriptorLoadingActionGenerators.Add(d => new DescriptorLoadingAction(name, extensions.Length == 0 ? CreateAssetLoadingActionWithoutExtensionDescriptor(subfolder, importFunction) : CreateAssetLoadingActionWithExtensionsDescriptor(subfolder, importFunction, extensions), d)); diff --git a/SpaceWarp.Core/Patching/BootstrapPatch.cs b/SpaceWarp.Core/Patching/BootstrapPatch.cs index fb0d67d2..29a080fa 100644 --- a/SpaceWarp.Core/Patching/BootstrapPatch.cs +++ b/SpaceWarp.Core/Patching/BootstrapPatch.cs @@ -89,22 +89,10 @@ private static void DoLoadingActions(IList allPlugins private static void DoOldStyleLoadingActions(SequentialFlow flow, SpaceWarpPluginDescriptor plugin) { - if (plugin.Plugin != null) + if (plugin.Plugin is not BaseSpaceWarpPlugin baseSpaceWarpPlugin) return; + foreach (var action in Loading.LoadingActionGenerators) { - foreach (var action in Loading.LoadingActionGenerators) - { - if (plugin.Plugin is BaseSpaceWarpPlugin baseSpaceWarpPlugin) - { - flow.AddAction(action(baseSpaceWarpPlugin)); - } - } - } - else - { - foreach (var action in Loading.FallbackDescriptorLoadingActionGenerators) - { - flow.AddAction(action(plugin)); - } + flow.AddAction(action(baseSpaceWarpPlugin)); } }