public void ExposeData() { Scribe_Collections.Look(ref allFactions, "allFactions", LookMode.Deep); if (Scribe.mode == LoadSaveMode.PostLoadInit) { BackCompatibility.FactionManagerPostLoadInit(); } if (Scribe.mode == LoadSaveMode.LoadingVars || Scribe.mode == LoadSaveMode.ResolvingCrossRefs || Scribe.mode == LoadSaveMode.PostLoadInit) { if (allFactions.RemoveAll((Faction x) => x == null || x.def == null) != 0) { Log.Error("Some factions were null after loading."); } RecacheFactions(); } }