jptrrs / SoftWarmBeds

A bed expansion for RimWorld.
https://steamcommunity.com/sharedfiles/filedetails/?id=1713295858
MIT License
0 stars 8 forks source link

Performance Optimizer thing comp optimization incompat #23

Open Taranchuk opened 2 years ago

Taranchuk commented 2 years ago

In your hospitality patch you are removing and adding comps from guest beds. It makes the optimization do not see the new comps. With this lines of code you can reset the cache after your hospitality patch code: public static MethodInfo ComponentCache_ResetCompCache_Info = AccessTools.Method("PerformanceOptimizer.ComponentCache:ResetCompCache"); ComponentCache_ResetCompCache_Info.Invoke(null, new object[] { thing });