public override float VoluntaryJoinPriorityFor(Pawn p) { if (assignedPreachers.Contains(p)) { return(0f); } if (!this.IsInvited(p, spot)) { return(0f); } if (!PartyUtility.ShouldPawnKeepPartying(p)) { return(0f); } if (!this.lord.ownedPawns.Contains(p) && this.IsPartyAboutToEnd()) { return(0f); } Need_Soul soul = p.needs.TryGetNeed <Need_Soul>(); if (soul != null) { switch (soul.DevotionTrait.SDegree) { case -2: { return(0f); } case -1: { return(5f); } case 0: { return(20f); } case 1: { return(25f); } case 2: { return(30f); } } } return(20f); }
public override float VoluntaryJoinPriorityFor(Pawn p) { if (!this.IsInvited(p)) { return(0f); } if (!PartyUtility.ShouldPawnKeepPartying(p)) { return(0f); } if (!this.lord.ownedPawns.Contains(p) && this.IsPartyAboutToEnd()) { return(0f); } return(20f); }
// Token: 0x0600078F RID: 1935 RVA: 0x0003FD88 File Offset: 0x0003E188 public override float VoluntaryJoinPriorityFor(Pawn p) { if (!this.IsInvited(p)) { return(0f); } if (!PartyUtility.ShouldPawnKeepPartying(p)) { return(0f); } if (this.spot.IsForbidden(p)) { return(0f); } if (!this.lord.ownedPawns.Contains(p) && this.IsPartyAboutToEnd()) { return(0f); } return(VoluntarilyJoinableLordJobJoinPriorities.PartyGuest); }
public bool AcceptableMapConditionsToStartElection(Map map) { if (!PartyUtility.AcceptableGameConditionsToContinueParty(map) || (!Position.Roofed(map) && !JoyUtility.EnjoyableOutsideNow(map, null))) { return(false); } if (GenLocalDate.HourInteger(map) < 8 || GenLocalDate.HourInteger(map) > 21) { return(false); } List <Lord> lords = map.lordManager.lords; for (int i = 0; i < lords.Count; i++) { if (lords[i].LordJob is LordJob_Joinable_Party || lords[i].LordJob is LordJob_Joinable_MarriageCeremony || lords[i].LordJob is LordJob_Joinable_LeaderElection) { return(false); } } if (map.dangerWatcher.DangerRating != StoryDanger.None) { return(false); } int num2 = Mathf.RoundToInt((float)map.mapPawns.FreeColonistsSpawnedCount * 0.65f); num2 = Mathf.Clamp(num2, 2, 10); int num3 = 0; foreach (Pawn current2 in map.mapPawns.FreeColonistsSpawned) { if (PartyUtility.ShouldPawnKeepPartying(current2)) { num3++; } } return(num3 >= num2); }