private bool ShouldBeCalledOff() { if (!PartyUtility.AcceptableGameConditionsToContinueParty(base.Map)) { return(true); } if (!spot.Roofed(base.Map) && !JoyUtility.EnjoyableOutsideNow(base.Map)) { return(true); } return(false); }
private bool ShouldAfterPartyBeCalledOff() { if (!this.firstPawn.Destroyed && !this.secondPawn.Destroyed) { if (this.spot.GetDangerFor(this.firstPawn, base.Map) == Danger.None && this.spot.GetDangerFor(this.secondPawn, base.Map) == Danger.None) { if (!PartyUtility.AcceptableGameConditionsToContinueParty(base.Map)) { return(true); } return(false); } return(true); } return(true); }
public static bool AcceptableGameConditionsToStartParty(Map map) { bool result; if (!PartyUtility.AcceptableGameConditionsToContinueParty(map)) { result = false; } else if (GenLocalDate.HourInteger(map) < 4 || GenLocalDate.HourInteger(map) > 21) { result = false; } else if (GatheringsUtility.AnyLordJobPreventsNewGatherings(map)) { result = false; } else if (map.dangerWatcher.DangerRating != StoryDanger.None) { result = false; } else { int freeColonistsSpawnedCount = map.mapPawns.FreeColonistsSpawnedCount; if (freeColonistsSpawnedCount < 4) { result = false; } else { int num = 0; foreach (Pawn pawn in map.mapPawns.FreeColonistsSpawned) { if (pawn.health.hediffSet.BleedRateTotal > 0f) { return(false); } if (pawn.Drafted) { num++; } } result = ((float)num / (float)freeColonistsSpawnedCount < 0.5f && PartyUtility.EnoughPotentialGuestsToStartParty(map, null)); } } return(result); }
public static bool AcceptableGameConditionsToStartParty(Map map) { if (!PartyUtility.AcceptableGameConditionsToContinueParty(map)) { return(false); } if (GenLocalDate.HourInteger(map) >= 4 && GenLocalDate.HourInteger(map) <= 21) { if (GatheringsUtility.AnyLordJobPreventsNewGatherings(map)) { return(false); } if (map.dangerWatcher.DangerRating != 0) { return(false); } int freeColonistsSpawnedCount = map.mapPawns.FreeColonistsSpawnedCount; if (freeColonistsSpawnedCount < 4) { return(false); } int num = 0; foreach (Pawn item in map.mapPawns.FreeColonistsSpawned) { if (item.health.hediffSet.BleedRateTotal > 0.0) { return(false); } if (item.Drafted) { num++; } } if ((float)num / (float)freeColonistsSpawnedCount >= 0.5) { return(false); } if (!PartyUtility.EnoughPotentialGuestsToStartParty(map, null)) { return(false); } 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 (!PartyUtility.AcceptableGameConditionsToContinueParty(base.Map)) { return(true); } return(false); }
private bool ShouldAfterPartyBeCalledOff() { return(this.firstPawn.Destroyed || this.secondPawn.Destroyed || (this.firstPawn.Downed || this.secondPawn.Downed) || (this.spot.GetDangerFor(this.firstPawn, base.Map) != Danger.None || this.spot.GetDangerFor(this.secondPawn, base.Map) != Danger.None) || !PartyUtility.AcceptableGameConditionsToContinueParty(base.Map)); }
private bool ShouldBeCalledOff() { return(!PartyUtility.AcceptableGameConditionsToContinueParty(base.Map) || (!this.spot.Roofed(base.Map) && !JoyUtility.EnjoyableOutsideNow(base.Map, null))); }