fix crashes, temp disable reflection caching, possibly reduce optimization in some areas, likely break 1.5

This commit is contained in:
localavaster
2026-04-14 00:12:50 -06:00
parent 9821c68999
commit 35187cf2d2
20 changed files with 275 additions and 107 deletions
@@ -24,11 +24,11 @@ public static class StorageExtensions
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static CompProperties? TryGetLwmCompProperties(this Thing thing)
=> LwmCompCache.GetOrAdd(thing).CompProperties;
=> LwmCompCache.GetOrAdd(thing.def).CompProperties;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static DefModExtension? TryGetRimfactoryExtension(this Thing thing)
=> RimfactoryExtensionCache.GetOrAdd(thing).ModExtension;
=> RimfactoryExtensionCache.GetOrAdd(thing.def).ModExtension;
public static int GetTotalSlots(this SlotGroup slotGroup) => slotGroup.GetTotalSlots(slotGroup.CellsList.Count);
@@ -57,4 +57,4 @@ public static class StorageExtensions
LwmCompCacheValue.EnsureInitialized();
RimfactoryExtensionCacheValue.EnsureInitialized();
}
}
}