Multiplayer icon indicating copy to clipboard operation
Multiplayer copied to clipboard

Debug finish research/apply techprint not synced

Open SokyranTheDragon opened this issue 3 years ago • 1 comments

Both of those are called through RimWorld.MainTabWindow_Research:DrawLeftRect.

The simple solution would involve watching currentProj field inside of RimWorld.ResearchManager and syncing RimWorld.ResearchManager:FinishProject and RimWorld.ResearchManager:ApplyTechprint. However, my question would be - is it safe to do so? Are those ever called from a place where those methods would end up being synced (and cancelled if not in dev mode) when we don't want them to?

SokyranTheDragon avatar Feb 10 '22 07:02 SokyranTheDragon

ResearchTree and friends call FinishProject. A SyncField is more expensive than a SyncMethod. If possible prefer SyncMethod/SyncDelegate. In this case I think you can do with the delegates in MainTabWindow_Research. I'm not aware of anything that touches currentProj directly.

notfood avatar Feb 11 '22 01:02 notfood