public static bool AcceptableGameConditionsToStartCeremony(Map map) { if (!GatheringsUtility.AcceptableGameConditionsToContinueGathering(map)) { return(false); } if (GenLocalDate.HourInteger(map) < 5 || GenLocalDate.HourInteger(map) > 16) { return(false); } if (GatheringsUtility.AnyLordJobPreventsNewGatherings(map)) { return(false); } if (map.dangerWatcher.DangerRating != 0) { return(false); } int num = 0; foreach (Pawn item in map.mapPawns.FreeColonistsSpawned) { if (item.Drafted) { num++; } } if ((float)num / (float)map.mapPawns.FreeColonistsSpawnedCount >= 0.5f) { return(false); } return(true); }
protected virtual bool ShouldBeCalledOff() { if (!GatheringsUtility.PawnCanStartOrContinueGathering(organizer)) { return(true); } if (!GatheringsUtility.AcceptableGameConditionsToContinueGathering(base.Map)) { return(true); } return(false); }
private bool ShouldAfterPartyBeCalledOff() { if (firstPawn.Destroyed || secondPawn.Destroyed) { return(true); } if (firstPawn.Downed || secondPawn.Downed) { return(true); } if (spot.GetDangerFor(firstPawn, base.Map) != Danger.None || spot.GetDangerFor(secondPawn, base.Map) != Danger.None) { return(true); } if (!GatheringsUtility.AcceptableGameConditionsToContinueGathering(base.Map)) { return(true); } return(false); }
private bool ShouldCeremonyBeCalledOff() { if (firstPawn.Destroyed || secondPawn.Destroyed) { return(true); } if (!firstPawn.relations.DirectRelationExists(PawnRelationDefOf.Fiance, secondPawn)) { return(true); } if (spot.GetDangerFor(firstPawn, base.Map) != Danger.None || spot.GetDangerFor(secondPawn, base.Map) != Danger.None) { return(true); } if (!GatheringsUtility.AcceptableGameConditionsToContinueGathering(base.Map) || !MarriageCeremonyUtility.FianceCanContinueCeremony(firstPawn, secondPawn) || !MarriageCeremonyUtility.FianceCanContinueCeremony(secondPawn, firstPawn)) { return(true); } return(false); }