Open jcstryker opened 3 years ago
Having looked into this, I can definitively confirm the cause. This is a vanilla bug exposed by modding; the culprit is:
Precept_Role precept_Role = ritual.ideo.RolesListForReading.First((Precept_Role r) => r.def == PreceptDefOf.IdeoRole_Moralist);
in RimWorld.RitualBehaviorWorker_Conversion.CanStartRitualNow().
The IEnumerable<>.First() function automatically throws an exception if it doesn't find an element, whereas Tynan (or whoever else is programming at Ludeon, if he has a team now) should be using FirstOrDefault, and should be verifying against null in the next line too.
The cause is when you have an ideology assigned to your colony that doesn't have a spiritual leader role defined.