Added stat caching, fixed all the bugs

Added RitualObligationTriggers analyzer category,
Fixed defs from other mods with broken market value breaking fish's storage patches,
Fixed storage caches not updating for quality, rotting and similar changes to stored things,
Fixed storage caches not updating capacity when reinstalling storage,
Fixed prison labor compatibility,
Improved multiplayer compatibility,
Fixed ideology style dominance and altar sharing patches throwing errors instead of defaulting to disabled when not having ideology,
Fixed compatibility with RIMMSqol's world pawn GC patch by disabling that patch,
Fixed rare threading issues throwing errors on startup
This commit is contained in:
bbradson
2024-03-10 20:05:24 +01:00
parent a4ee95fde1
commit be3dae46bb
45 changed files with 1090 additions and 414 deletions
+3 -3
View File
@@ -22,7 +22,7 @@ public sealed class IdeoUtilityCaching : ClassWithFishPrepatches
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool Prefix(Thing? t, Ideo? ideo, ref float __result, out bool __state)
{
if (t is null || ideo is null || t.thingIDNumber < 0)
if (t is null || t.thingIDNumber < 0 || ideo is null)
{
__state = false;
return true;
@@ -51,10 +51,10 @@ public sealed class IdeoUtilityCaching : ClassWithFishPrepatches
=> StyleDominanceCache.GetExistingReference(t, ideo).Update(__result, t);
}
public record struct StyleDominanceCacheValue
public record struct StyleDominanceCacheValue()
{
public float Value;
private int _nextRefreshTick;
private int _nextRefreshTick = -2;
public void Update(float value, Thing thing)
{