Esempio n. 1
0
        private void Outcome_Triumph(Caravan caravan)
        {
            float randomInRange = PeaceTalks.TriumphFactionRelationOffset.RandomInRange;

            base.Faction.AffectGoodwillWith(Faction.OfPlayer, randomInRange);
            List <Thing> list = ItemCollectionGeneratorDefOf.PeaceTalksGift.Worker.Generate(default(ItemCollectionGeneratorParams));

            for (int i = 0; i < list.Count; i++)
            {
                caravan.AddPawnOrItem(list[0], true);
            }
            Find.LetterStack.ReceiveLetter("LetterLabelPeaceTalks_Triumph".Translate(), this.GetLetterText("LetterPeaceTalks_Triumph".Translate(base.Faction.Name, Mathf.RoundToInt(randomInRange), list[0].Label), caravan), LetterDefOf.PositiveEvent, caravan, null);
        }
Esempio n. 2
0
        private void Outcome_Triumph(Caravan caravan)
        {
            FactionRelationKind playerRelationKind = base.Faction.PlayerRelationKind;
            int randomInRange = DiplomacyTuning.Goodwill_PeaceTalksTriumphRange.RandomInRange;

            base.Faction.TryAffectGoodwillWith(Faction.OfPlayer, randomInRange, canSendMessage: false, canSendHostilityLetter: false);
            List <Thing> list = ThingSetMakerDefOf.Reward_PeaceTalksGift.root.Generate();

            for (int i = 0; i < list.Count; i++)
            {
                caravan.AddPawnOrItem(list[i], addCarriedPawnToWorldPawnsIfAny: true);
            }
            Find.LetterStack.ReceiveLetter("LetterLabelPeaceTalks_Triumph".Translate(), GetLetterText("LetterPeaceTalks_Triumph".Translate(base.Faction.Name, randomInRange, GenLabel.ThingsLabel(list)), caravan, playerRelationKind), LetterDefOf.PositiveEvent, caravan, base.Faction);
        }
 public override void Arrived(List <ActiveDropPodInfo> pods, int tile)
 {
     for (int i = 0; i < pods.Count; i++)
     {
         tmpContainedThings.Clear();
         tmpContainedThings.AddRange(pods[i].innerContainer);
         for (int j = 0; j < tmpContainedThings.Count; j++)
         {
             pods[i].innerContainer.Remove(tmpContainedThings[j]);
             caravan.AddPawnOrItem(tmpContainedThings[j], addCarriedPawnToWorldPawnsIfAny: true);
         }
     }
     tmpContainedThings.Clear();
     Messages.Message("MessageTransportPodsArrivedAndAddedToCaravan".Translate(caravan.Name).CapitalizeFirst(), caravan, MessageTypeDefOf.TaskCompletion);
 }
        private void Outcome_Triumph(Caravan caravan)
        {
            FactionRelationKind playerRelationKind = base.Faction.PlayerRelationKind;
            int randomInRange = DiplomacyTuning.Goodwill_PeaceTalksTriumphRange.RandomInRange;

            base.Faction.TryAffectGoodwillWith(Faction.OfPlayer, randomInRange, false, false, null, null);
            List <Thing> list = ThingSetMakerDefOf.Reward_PeaceTalksGift.root.Generate();

            for (int i = 0; i < list.Count; i++)
            {
                caravan.AddPawnOrItem(list[i], true);
            }
            Find.LetterStack.ReceiveLetter("LetterLabelPeaceTalks_Triumph".Translate(), this.GetLetterText("LetterPeaceTalks_Triumph".Translate(new object[]
            {
                base.Faction.Name,
                randomInRange,
                GenLabel.ThingsLabel(list, "  - ")
            }), caravan, playerRelationKind), LetterDefOf.PositiveEvent, caravan, base.Faction, null);
        }
        private void Outcome_Triumph(Caravan caravan)
        {
            FactionRelationKind playerRelationKind = base.Faction.PlayerRelationKind;
            int randomInRange = DiplomacyTuning.Goodwill_PeaceTalksTriumphRange.RandomInRange;

            base.Faction.TryAffectGoodwillWith(Faction.OfPlayer, randomInRange, canSendMessage: false, canSendHostilityLetter: false);
            ThingSetMakerParams parms = default(ThingSetMakerParams);

            parms.makingFaction         = base.Faction;
            parms.techLevel             = base.Faction.def.techLevel;
            parms.maxTotalMass          = 20f;
            parms.totalMarketValueRange = new FloatRange(500f, 1200f);
            parms.tile = base.Tile;
            List <Thing> list = ThingSetMakerDefOf.Reward_ItemsStandard.root.Generate(parms);

            for (int i = 0; i < list.Count; i++)
            {
                caravan.AddPawnOrItem(list[i], addCarriedPawnToWorldPawnsIfAny: true);
            }
            Find.LetterStack.ReceiveLetter("LetterLabelPeaceTalks_Triumph".Translate(), GetLetterText("LetterPeaceTalks_Triumph".Translate(base.Faction.NameColored, randomInRange, GenLabel.ThingsLabel(list)), caravan, playerRelationKind, TryGainRoyalFavor(caravan)), LetterDefOf.PositiveEvent, caravan, base.Faction);
        }