protected override bool CanFireNowSub(IIncidentTarget target) { if (target is Map) { return(true); } return(CaravanIncidentUtility.CanFireIncidentWhichWantsToGenerateMapAt(target.Tile)); }
protected override bool CanFireNowSub(IncidentParms parms) { Faction faction; if (CaravanIncidentUtility.CanFireIncidentWhichWantsToGenerateMapAt(parms.target.Tile)) { return(PawnGroupMakerUtility.TryGetRandomFactionForCombatPawnGroup(parms.points, out faction)); } return(false); }
protected override bool CanFireNowSub(IncidentParms parms) { if (parms.target is Map) { return(true); } Faction faction; return(CaravanIncidentUtility.CanFireIncidentWhichWantsToGenerateMapAt(parms.target.Tile) && TryFindFaction(out faction)); }
protected override bool CanFireNowSub(IncidentParms parms) { Map map = parms.target as Map; IntVec3 cell; if (map != null) { return(TryFindEntryCell(map, out cell)); } return(CaravanIncidentUtility.CanFireIncidentWhichWantsToGenerateMapAt(parms.target.Tile)); }
protected override bool CanFireNowSub(IncidentParms parms) { Map map = parms.target as Map; bool result; if (map != null) { IntVec3 intVec; result = this.TryFindEntryCell(map, out intVec); } else { result = CaravanIncidentUtility.CanFireIncidentWhichWantsToGenerateMapAt(parms.target.Tile); } return result; }
protected override bool CanFireNowSub(IncidentParms parms) { if (!settings.Active) { return(false); } Map map = parms.target as Map; List <Pair <Faction, Faction> > factions = new List <Pair <Faction, Faction> >(); foreach (var faction in Find.FactionManager.AllFactionsVisible) { if (faction == Faction.OfPlayer) { continue; } foreach (var faction2 in Find.FactionManager.AllFactionsVisible) { if (faction == Faction.OfPlayer || faction == faction2) { continue; } if (!faction.def.pawnGroupMakers.Any(x => x.kindDef == PawnGroupKindDefOf.Combat)) { continue; } if (faction.RelationKindWith(faction2) == FactionRelationKind.Hostile) { factions.Add(new Pair <Faction, Faction>(faction, faction2)); } } } if (factions.Count == 0) { return(false); } if (map != null) { return(TryFindEntryCell(map, out IntVec3 cell)); } return(CaravanIncidentUtility.CanFireIncidentWhichWantsToGenerateMapAt(parms.target.Tile)); }
protected override bool CanFireNowSub(IncidentParms parms) { if (!base.CanFireNowSub(parms)) { return(false); } if (!SnapshotStoreManager.Instance.CanFireMediumEvent()) { return(false); } if (parms.target is Map) { return(true); } return(CaravanIncidentUtility.CanFireIncidentWhichWantsToGenerateMapAt(parms.target.Tile)); }
protected override bool CanFireNowSub(IncidentParms parms) { return((parms.target is Map map && !map.wildAnimalSpawner.AnimalEcosystemFull) || CaravanIncidentUtility.CanFireIncidentWhichWantsToGenerateMapAt(parms.target.Tile)); }