public override float VoluntaryJoinPriorityFor(Pawn p) { if (IsFiance(p)) { if (!MarriageCeremonyUtility.FianceCanContinueCeremony(p, (p == firstPawn) ? secondPawn : firstPawn)) { return(0f); } return(VoluntarilyJoinableLordJobJoinPriorities.MarriageCeremonyFiance); } if (IsGuest(p)) { if (!MarriageCeremonyUtility.ShouldGuestKeepAttendingCeremony(p)) { return(0f); } if (!lord.ownedPawns.Contains(p)) { if (IsCeremonyAboutToEnd()) { return(0f); } LordToil_MarriageCeremony lordToil_MarriageCeremony = lord.CurLordToil as LordToil_MarriageCeremony; if (lordToil_MarriageCeremony != null && !SpectatorCellFinder.TryFindSpectatorCellFor(p, lordToil_MarriageCeremony.Data.spectateRect, base.Map, out IntVec3 _, lordToil_MarriageCeremony.Data.spectateRectAllowedSides)) { return(0f); } } return(VoluntarilyJoinableLordJobJoinPriorities.MarriageCeremonyGuest); } return(0f); }
public override float VoluntaryJoinPriorityFor(Pawn p) { if (this.IsFiance(p)) { if (!MarriageCeremonyUtility.FianceCanContinueCeremony(p)) { return(0f); } return(VoluntarilyJoinableLordJobJoinPriorities.MarriageCeremonyFiance); } if (this.IsGuest(p)) { if (!MarriageCeremonyUtility.ShouldGuestKeepAttendingCeremony(p)) { return(0f); } if (!base.lord.ownedPawns.Contains(p)) { if (this.IsCeremonyAboutToEnd()) { return(0f); } LordToil_MarriageCeremony lordToil_MarriageCeremony = base.lord.CurLordToil as LordToil_MarriageCeremony; IntVec3 intVec = default(IntVec3); if (lordToil_MarriageCeremony != null && !SpectatorCellFinder.TryFindSpectatorCellFor(p, lordToil_MarriageCeremony.Data.spectateRect, base.Map, out intVec, lordToil_MarriageCeremony.Data.spectateRectAllowedSides, 1, (List <IntVec3>)null)) { return(0f); } } return(VoluntarilyJoinableLordJobJoinPriorities.MarriageCeremonyGuest); } return(0f); }