Stabilize RimWorld 1.6 caches and tick optimizations
This commit is contained in:
@@ -39,7 +39,7 @@ public static class OnAssembliesLoaded
|
||||
PerformanceFishMod.AllPatchClasses = PerformanceFishMod.InitializeAllPatchClasses<IHasFishPatch>();
|
||||
PerformanceFishMod.AllPrepatchClasses ??= PerformanceFishMod.InitializeAllPatchClasses<ClassWithFishPrepatches>();
|
||||
|
||||
TryInitialize(AnalyzerFixes.Patch, true);
|
||||
TryInitialize(AnalyzerFixes.Patch);
|
||||
|
||||
_ = FishSettings.Instance;
|
||||
|
||||
@@ -109,14 +109,11 @@ public static class OnAssembliesLoaded
|
||||
}
|
||||
}
|
||||
|
||||
private static async void TryInitialize(Action action, bool async = false)
|
||||
private static void TryInitialize(Action action)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (async)
|
||||
await Task.Run(action).ConfigureAwait(false);
|
||||
else
|
||||
action();
|
||||
action();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user