Vanilla-Expanded / VanillaExpandedFramework

Vanilla Expanded Framework for RimWorld
Other
69 stars 34 forks source link

Fix WeatherOverlay_Effects with multiple maps #74

Closed SokyranTheDragon closed 8 months ago

SokyranTheDragon commented 8 months ago

WeatherOverlay_Effects is keeping nextDamageTick as an int. However, there's 1 shared instance of SkyOverlay (or its subtype) for each WeatherDef.

This presents the issue where 1 map will set nextDamageTick to a value it'll use, and all maps processed after it will be ignored due to the value being set by a previous map.

The fix here is to store the next tick on a per-map basis using a dictionary. The value is then retrieved using Dictionary.TryGetValue (value will fallback to default of 0).