Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid lag burst when a CE grenade explodes
When a CE frag grenade explodes, it spawns a large number of "Fragment_GrenadeFrag" entities at the same time (mortar shells spawn "Fragment_Shell" instead) Running "DefDatabase<ThingDef>.AllDefs.FirstOrDefault()" twice each time is very slow, causing a several-second RimWorld freeze. Bailing out early on "Fragment_" prefixes seems to work around it, but please check if this would break anything else before accepting this PR, I don't have much of any experience in RimWorld modding. Fixes #4.
- Loading branch information