[SOLVED] What gives pawns the Soaking Wet thought???

Started by battlemage64, February 15, 2020, 09:52:05 PM

Previous topic - Next topic

battlemage64

I want to modify the code that gives a pawn the Soaking Wet thought, which means finding where pawns are given the SoakingWet thought. SoakingWet is the exposedThought for the WeatherDef of rain, and the traversedThought for water floors, but I can't actually find references to either exposedThought or traversedThought anywhere in the code except for in the class declarations for WeatherDef and TerrainDef. Literally not a single mention (I used grep -i -lr to search for them and it didn't find anything, nor ILSpy or Visual Studio). I've looked through every method even tangentially related to weather, and I can't find a single mention. But it has to happen somewhere, because pawns get the Soaking Wet thought at some point! I'm out of places to look and I'm sorry to ask for help on something so trivial, but can anyone locate what bit of code (and in what class/method) actually gives this thought?

UPDATE: Found it! It's handled in Pawn_MindState. I couldn't find it because my decompiled code was from a previous version with some subtle differences and my version of ILSpy was bugged (reinstalled ILSpy and decompiled again and found it 10 sec later)
I love to mod and boy am I bad at it