Gargamiel / PokeWorld

RimWorld mod adding all 493 Pokémon from gen I-IV
MIT License
22 stars 9 forks source link

Game freezes when any Trader appears/is called, then pretty much halts when there a clothes on the screen #23

Closed hideki2k02 closed 2 years ago

hideki2k02 commented 2 years ago

Hello, i've reported this on Steam but i guess you havent seen it, since there was a lot of comments, so i decided to post this on GitHub.

Steps to reproduce the problem:

  1. Spawn a Trade Caravan/Call one on the Comms Console using "[KV] Call Trade Ships" or something similar (You must be able to Trade Clothes)

  2. Your game should freeze for a while (i think it depends on the amount of total clothes in the game, for me it was around 15s)

  3. The Trade Menu will appear, the game will run fine until you scroll down to a clothing, then your game should pretty much die, running at 2FPS

  4. Finishing the Trade will freeze the game again

image

I'm 99% sure its related to this line of code, maybe caching resolves it? https://github.com/Gargamiel/PokeWorld/blob/main/Source/PokeWorld/PokeWorld/Harmony_Patching/StockGenerator_Clothes_HandlesThingDef_Patch.cs#L20

Gargamiel commented 2 years ago

Hi, I saw your comment on steam, but I went on to do something else and it slipped my mind, I'm sorry about that. Nevertheless I thank you very much for describing your issue in great details, it was indeed a problem in my mod as you expected, and it has already been fixed by another contributor, thank you mszabo-wikia. I'm merging the fix now and the issue will be fixed in the next update on steam.