// ReSharper disable once UnusedParameter.Local public GameComponent_FacialStuff(Game game) { // Kill the damn beards - xml patching not reliable enough. for (int i = 0; i < DefDatabase <HairDef> .AllDefsListForReading.Count; i++) { HairDef hairDef = DefDatabase <HairDef> .AllDefsListForReading[i]; CheckReplaceHairTexPath(hairDef); if (Controller.settings.UseCaching) { string name = Path.GetFileNameWithoutExtension(hairDef.texPath); CutHairDB.ExportHairCut(hairDef, name); } } // Fix for VHE hair on existing pawns. foreach (Pawn pawn in PawnsFinder.AllMaps.FindAll(x => x.kindDef?.RaceProps != null && x.kindDef.RaceProps.Humanlike == true).Where(pawn => pawn.story?.hairDef != null && pawn.story.hairDef.IsBeardNotHair())) { PawnHairChooser.RandomHairDefFor(pawn, pawn.Faction.def); } this.WeaponCompsNew(); // todo: use BodyDef instead, target for kickstarting? this.AnimalPawnCompsBodyDefImport(); this.AnimalPawnCompsImportFromAnimationTargetDefs(); Controller.SetMainButtons(); // BuildWalkCycles(); // foreach (BodyAnimDef def in DefDatabase<BodyAnimDef>.AllDefsListForReading) // { // if (def.walkCycles.Count == 0) // { // var length = Enum.GetNames(typeof(LocomotionUrgency)).Length; // for (int index = 0; index < length; index++) // { // WalkCycleDef cycleDef = new WalkCycleDef(); // cycleDef.defName = def.defName + "_cycle"; // def.walkCycles.Add(index, cycleDef); // } // } // } }
// ReSharper disable once UnusedParameter.Local public GameComponent_FacialStuff(Game game) { // Kill the damn beards - xml patching not reliable enough. for (int i = 0; i < DefDatabase <HairDef> .AllDefsListForReading.Count; i++) { HairDef hairDef = DefDatabase <HairDef> .AllDefsListForReading[i]; CheckReplaceHairTexPath(hairDef); if (Controller.settings.UseCaching) { string name = Path.GetFileNameWithoutExtension(hairDef.texPath); CutHairDB.ExportHairCut(hairDef, name); } } this.WeaponCompsNew(); // todo: use BodyDef instead, target for kickstarting? this.AnimalPawnCompsBodyDefImport(); this.AnimalPawnCompsImportFromAnimationTargetDefs(); Controller.SetMainButtons(); // BuildWalkCycles(); // foreach (BodyAnimDef def in DefDatabase<BodyAnimDef>.AllDefsListForReading) // { // if (def.walkCycles.Count == 0) // { // var length = Enum.GetNames(typeof(LocomotionUrgency)).Length; // for (int index = 0; index < length; index++) // { // WalkCycleDef cycleDef = new WalkCycleDef(); // cycleDef.defName = def.defName + "_cycle"; // def.walkCycles.Add(index, cycleDef); // } // } // } }