internal static void _Tick_TryStartParty(this VoluntarilyJoinableLordsStarter _this) { if (!_this.GetMap().IsPlayerHome) { return; } int socialiteMod = 1; List <Pawn> allPawnsSpawned = _this.GetMap().mapPawns.AllPawnsSpawned; foreach (Pawn pawn in allPawnsSpawned) { if (pawn.RaceProps.Humanlike && pawn.story.traits.HasTrait(TraitDefOfPsychology.Socialite)) { socialiteMod++; } } if (Find.TickManager.TicksGame % 5000 == 0) { if (Rand.MTBEventOccurs(40f, 60000f, (5000f * socialiteMod))) { _this.SetStartPartyASAP(true); } if (_this.GetStartPartyASAP() && Find.TickManager.TicksGame - _this.GetLastLordStartTick() >= (int)(600000 / socialiteMod) && PartyUtility.AcceptableMapConditionsToStartParty(_this.GetMap())) { _this.TryStartParty(); } } }