Mainly more hauling optimizations, utilizing linked storage groups

This also adds an experimental, usually slower, threaded gas grid mode and implements a workaround for the whole mod and game failing to start when opening prepatcher's mod manager with unfortunate timing
This commit is contained in:
bbradson
2024-02-01 19:57:50 +01:00
parent 20aebe4e83
commit 949bde76ce
27 changed files with 451 additions and 280 deletions
+9 -6
View File
@@ -151,8 +151,8 @@ public sealed class PerformanceFishMod : Mod
public static void LogPatchCount()
{
var allFishPatches = AllPatchClasses!.SelectMany(static patchClass => patchClass.Patches.All.Values).ToList();
var allFishPrepatches
= AllPrepatchClasses!.SelectMany(static patchClass => patchClass.Patches.All.Values).ToList();
var allFishPrepatches = AllPrepatchClasses!.SelectMany(static patchClass => patchClass.Patches.All.Values)
.ToList();
var prefixCount = SumFor(allFishPatches, static fishPatch => fishPatch.PrefixMethodInfo);
var postfixCount = SumFor(allFishPatches, static fishPatch => fishPatch.PostfixMethodInfo);
@@ -174,10 +174,13 @@ public sealed class PerformanceFishMod : Mod
(prepatcherClassPatchCount == 1 ? "" : "es")}. That's a total of {prefixCount + postfixCount
+ transpilerCount + prepatcherPrefixCount + prepatcherPostfixCount
+ prepatcherTranspilerCount + prepatcherClassPatchCount} patches. Amazing!\n\n"
+ $"The following methods were patched:\n{string.Join("\n", allFishPatches.SelectMany(static fishPatch
=> fishPatch.TargetMethodInfos).Concat(allFishPrepatches.Select(static fishPrepatch
=> (fishPrepatch as FishPrepatch)?.TargetMethodBase)).Where(static method
=> method != null).Select(static method => method.FullDescription()))}\n"
+ $"The following methods were patched:\n{string.Join("\n",
allFishPatches
.SelectMany(static fishPatch => fishPatch.TargetMethodInfos)
.Concat(allFishPrepatches
.Select(static fishPrepatch => (fishPrepatch as FishPrepatch)?.TargetMethodBase))
.Where(Is.NotNull)
.Select(static method => method.FullDescription()))}\n"
+ $"===================================================================================");
}