Пример #1
0
        public override void Arrived(List <ActiveDropPodInfo> pods, int tile)
        {
            Thing lookTarget = TransportPodsArrivalActionUtility.GetLookTarget(pods);

            TransportPodsArrivalActionUtility.DropTravelingTransportPods(pods, cell, mapParent.Map);
            Messages.Message("MessageTransportPodsArrived".Translate(), lookTarget, MessageTypeDefOf.TaskCompletion);
        }
        public override void Arrived(List <ActiveDropPodInfo> pods, int tile)
        {
            Thing lookTarget    = TransportPodsArrivalActionUtility.GetLookTarget(pods);
            bool  flag          = !this.site.HasMap;
            Map   orGenerateMap = GetOrGenerateMapUtility.GetOrGenerateMap(this.site.Tile, SiteCoreWorker.MapSize, null);

            if (flag)
            {
                Find.TickManager.Notify_GeneratedPotentiallyHostileMap();
                PawnRelationUtility.Notify_PawnsSeenByPlayer_Letter_Send(orGenerateMap.mapPawns.AllPawns, "LetterRelatedPawnsInMapWherePlayerLanded".Translate(Faction.OfPlayer.def.pawnsPlural), LetterDefOf.NeutralEvent, true, true);
            }
            Messages.Message("MessageTransportPodsArrived".Translate(), lookTarget, MessageTypeDefOf.TaskCompletion, true);
            this.arrivalMode.Worker.TravelingTransportPodsArrived(pods, orGenerateMap);
        }
Пример #3
0
        public override void Arrived(List <ActiveDropPodInfo> pods, int tile)
        {
            Thing  lookTarget    = TransportPodsArrivalActionUtility.GetLookTarget(pods);
            bool   flag          = !settlement.HasMap;
            Map    orGenerateMap = GetOrGenerateMapUtility.GetOrGenerateMap(settlement.Tile, null);
            string letterLabel   = "LetterLabelCaravanEnteredEnemyBase".Translate();
            string letterText    = "LetterTransportPodsLandedInEnemyBase".Translate(settlement.Label).CapitalizeFirst();

            SettlementUtility.AffectRelationsOnAttacked(settlement, ref letterText);
            if (flag)
            {
                Find.TickManager.Notify_GeneratedPotentiallyHostileMap();
                PawnRelationUtility.Notify_PawnsSeenByPlayer_Letter(orGenerateMap.mapPawns.AllPawns, ref letterLabel, ref letterText, "LetterRelatedPawnsInMapWherePlayerLanded".Translate(Faction.OfPlayer.def.pawnsPlural), informEvenIfSeenBefore: true);
            }
            Find.LetterStack.ReceiveLetter(letterLabel, letterText, LetterDefOf.NeutralEvent, lookTarget, settlement.Faction);
            arrivalMode.Worker.TravelingTransportPodsArrived(pods, orGenerateMap);
        }
Пример #4
0
        public override void Arrived(List <ActiveDropPodInfo> pods, int tile)
        {
            Thing lookTarget    = TransportPodsArrivalActionUtility.GetLookTarget(pods);
            bool  num           = !site.HasMap;
            Map   orGenerateMap = GetOrGenerateMapUtility.GetOrGenerateMap(site.Tile, CaravanArrivalAction_VisitSite.MapSize, null);

            if (num)
            {
                Find.TickManager.Notify_GeneratedPotentiallyHostileMap();
                PawnRelationUtility.Notify_PawnsSeenByPlayer_Letter_Send(orGenerateMap.mapPawns.AllPawns, "LetterRelatedPawnsInMapWherePlayerLanded".Translate(Faction.OfPlayer.def.pawnsPlural), LetterDefOf.NeutralEvent, informEvenIfSeenBefore: true);
            }
            if (site.Faction != null && site.Faction != Faction.OfPlayer)
            {
                site.Faction.TrySetRelationKind(Faction.OfPlayer, FactionRelationKind.Hostile);
            }
            Messages.Message("MessageTransportPodsArrived".Translate(), lookTarget, MessageTypeDefOf.TaskCompletion);
            arrivalMode.Worker.TravelingTransportPodsArrived(pods, orGenerateMap);
        }
Пример #5
0
        public override void Arrived(List <ActiveDropPodInfo> pods, int tile)
        {
            Thing  lookTarget    = TransportPodsArrivalActionUtility.GetLookTarget(pods);
            bool   flag          = !this.settlement.HasMap;
            Map    orGenerateMap = GetOrGenerateMapUtility.GetOrGenerateMap(this.settlement.Tile, null);
            string label         = "LetterLabelCaravanEnteredEnemyBase".Translate();
            string text          = "LetterTransportPodsLandedInEnemyBase".Translate(new object[]
            {
                this.settlement.Label
            }).CapitalizeFirst();

            SettlementUtility.AffectRelationsOnAttacked(this.settlement, ref text);
            if (flag)
            {
                Find.TickManager.CurTimeSpeed = TimeSpeed.Paused;
                PawnRelationUtility.Notify_PawnsSeenByPlayer_Letter(orGenerateMap.mapPawns.AllPawns, ref label, ref text, "LetterRelatedPawnsInMapWherePlayerLanded".Translate(new object[]
                {
                    Faction.OfPlayer.def.pawnsPlural
                }), true, true);
            }
            Find.LetterStack.ReceiveLetter(label, text, LetterDefOf.NeutralEvent, lookTarget, this.settlement.Faction, null);
            this.arrivalMode.Worker.TravelingTransportPodsArrived(pods, orGenerateMap);
        }