Пример #1
0
        protected override bool CanFireNowSub(IncidentParms parms)
        {
            int     num;
            Faction faction;

            return(base.CanFireNowSub(parms) && this.TryFindTile(out num) && SiteMakerHelper.TryFindRandomFactionFor(SiteCoreDefOf.DownedRefugee, null, out faction, true, null));
        }
Пример #2
0
        protected override bool CanFireNowSub(IncidentParms parms)
        {
            List <SitePartDef> x = new List <SitePartDef>();

            x.Add(SitePartDefOf.DownedT5Android);
            return(base.CanFireNowSub(parms) && this.TryFindTile(out int num) && SiteMakerHelper.TryFindRandomFactionFor(x, out Faction faction, true, null));
        }
Пример #3
0
        private bool TrySetVars(Slate slate, bool test)
        {
            Pawn  asker = slate.Get <Pawn>("asker");
            Thing mustBeHostileToFactionOfResolved = mustBeHostileToFactionOf.GetValue(slate);

            if (!SiteMakerHelper.TryFindRandomFactionFor(sitePartDefs.GetValue(slate), out Faction faction, disallowNonHostileFactions : true, delegate(Faction x)
            {
                if (asker != null && asker.Faction == x)
                {
                    return(false);
                }
                return((mustBeHostileToFactionOfResolved == null || mustBeHostileToFactionOfResolved.Faction == null || (x != mustBeHostileToFactionOfResolved.Faction && x.HostileTo(mustBeHostileToFactionOfResolved.Faction))) ? true : false);
            }))
            {
                return(false);
            }
            if (!Find.Storyteller.difficulty.allowViolentQuests && faction.HostileTo(Faction.OfPlayer))
            {
                return(false);
            }
            slate.Set(storeAs.GetValue(slate), faction);
            if (!test && faction != null && !faction.def.hidden)
            {
                QuestPart_InvolvedFactions questPart_InvolvedFactions = new QuestPart_InvolvedFactions();
                questPart_InvolvedFactions.factions.Add(faction);
                QuestGen.quest.AddPart(questPart_InvolvedFactions);
            }
            return(true);
        }
Пример #4
0
        protected override bool CanFireNowSub(IncidentParms parms)
        {
            var x = new List <SitePartDef> {
                SitePartDefOf.DownedT5Android
            };

            return(base.CanFireNowSub(parms) && TryFindTile(out var num) && SiteMakerHelper.TryFindRandomFactionFor(x, out var faction));
        }
Пример #5
0
        protected override bool CanFireNowSub(IIncidentTarget target)
        {
            if (!base.CanFireNowSub(target))
            {
                return(false);
            }
            int     num     = default(int);
            Faction faction = default(Faction);

            return(this.TryFindTile(out num) && SiteMakerHelper.TryFindRandomFactionFor(SiteCoreDefOf.DownedRefugee, (IEnumerable <SitePartDef>)null, out faction, true, (Predicate <Faction>)null));
        }
Пример #6
0
        protected override bool CanFireNowSub(IncidentParms parms)
        {
            if (!base.CanFireNowSub(parms))
            {
                return(false);
            }
            int     tile;
            Faction faction;

            return(TryFindTile(out tile) && SiteMakerHelper.TryFindRandomFactionFor(SiteCoreDefOf.DownedRefugee, null, out faction));
        }
Пример #7
0
        protected override bool CanFireNowSub(IIncidentTarget target)
        {
            int     num;
            Faction faction;

            return(base.CanFireNowSub(target) && (Find.FactionManager.RandomAlliedFaction(false, false, false, TechLevel.Undefined) != null && TileFinder.TryFindNewSiteTile(out num, 8, 30, false, true, -1)) && SiteMakerHelper.TryFindRandomFactionFor(SiteCoreDefOf.ItemStash, null, out faction, true, null));
        }
Пример #8
0
        protected override bool CanFireNowSub(IncidentParms parms)
        {
            if (!base.CanFireNowSub(parms))
            {
                return(false);
            }
            int     tile;
            Faction faction;

            return(Find.FactionManager.RandomNonHostileFaction(allowHidden: false, allowDefeated: false, allowNonHumanlike: false) != null && TryFindTile(out tile) && SiteMakerHelper.TryFindRandomFactionFor(SiteCoreDefOf.ItemStash, null, out faction));
        }
        protected override bool CanFireNowSub(IIncidentTarget target)
        {
            if (!base.CanFireNowSub(target))
            {
                return(false);
            }
            int     num     = default(int);
            Faction faction = default(Faction);

            return(Find.FactionManager.RandomAlliedFaction(false, false, false, TechLevel.Undefined) != null && TileFinder.TryFindNewSiteTile(out num, 8, 30, false, true, -1) && SiteMakerHelper.TryFindRandomFactionFor(SiteCoreDefOf.ItemStash, (IEnumerable <SitePartDef>)null, out faction, true, (Predicate <Faction>)null));
        }
        protected override bool CanFireNowSub(IncidentParms parms)
        {
            if (!base.CanFireNowSub(parms))
            {
                return(false);
            }

            if (!SnapshotStoreManager.Instance.CanFireLargeEvent())
            {
                return(false);
            }

            int     tile;
            Faction faction;

            return(Find.FactionManager.RandomNonHostileFaction(false, false, false, TechLevel.Undefined) != null && TryFindTile(out tile) && SiteMakerHelper.TryFindRandomFactionFor(DefDatabase <SiteCoreDef> .GetNamed("RuinedBaseSite"), null, out faction, true, null));
        }
        protected override bool CanFireNowSub(IncidentParms parms)
        {
            int     num;
            Faction faction;

            return(base.CanFireNowSub(parms) && (Find.FactionManager.RandomNonHostileFaction(false, false, false, TechLevel.Undefined) != null && this.TryFindTile(out num)) && SiteMakerHelper.TryFindRandomFactionFor(SiteCoreDefOf.ItemStash, null, out faction, true, null));
        }
        // Token: 0x06000070 RID: 112 RVA: 0x00004920 File Offset: 0x00002B20
        protected override bool CanFireNowSub(IncidentParms parms)
        {
            int     num;
            Faction faction;

            return(base.CanFireNowSub(parms) && Find.FactionManager.RandomNonHostileFaction(false, false, false, TechLevel.Industrial) != null && this.TryFindTile(out num) && SiteMakerHelper.TryFindRandomFactionFor(SiteCoreDefOf.OldOutpost, null, ref faction, true, null));
        }
Пример #13
0
        protected override bool CanFireNowSub(IncidentParms parms)
        {
            int     num;
            Faction faction;

            return(base.CanFireNowSub(parms) && (Find.FactionManager.RandomNonHostileFaction(false, false, false, TechLevel.Undefined) != null && TileFinder.TryFindNewSiteTile(out num, 7, 27, false, true, -1)) && SiteMakerHelper.TryFindRandomFactionFor(PolarisIncidentDefOf.Polaris_TradeShipPodCrashSiteCore, null, out faction, true, null));
        }