private void DoArrivalAction(Caravan caravan) { bool num = !target.HasMap; if (num) { target.SetFaction(Faction.OfPlayer); } Map orGenerateMap = GetOrGenerateMapUtility.GetOrGenerateMap(target.Tile, null); LookTargets lookTargets = new LookTargets(caravan.PawnsListForReading); CaravanEnterMapUtility.Enter(caravan, orGenerateMap, CaravanEnterMode.Edge, CaravanDropInventoryMode.UnloadIndividually); if (num) { Find.TickManager.Notify_GeneratedPotentiallyHostileMap(); Find.LetterStack.ReceiveLetter("EscapeShipFoundLabel".Translate(), (!Find.Storyteller.difficultyValues.allowBigThreats) ? "EscapeShipFoundPeaceful".Translate() : "EscapeShipFound".Translate(), LetterDefOf.PositiveEvent, new GlobalTargetInfo(target.Map.Center, target.Map)); } else { Find.LetterStack.ReceiveLetter("LetterLabelCaravanEnteredMap".Translate(target), "LetterCaravanEnteredMap".Translate(caravan.Label, target).CapitalizeFirst(), LetterDefOf.NeutralEvent, lookTargets); } }
private void DoArrivalAction(Caravan caravan) { bool flag = !target.HasMap; if (flag) { target.SetFaction(Faction.OfPlayer); } Map orGenerateMap = GetOrGenerateMapUtility.GetOrGenerateMap(target.Tile, null); Pawn t = caravan.PawnsListForReading[0]; CaravanEnterMapUtility.Enter(caravan, orGenerateMap, CaravanEnterMode.Edge, CaravanDropInventoryMode.UnloadIndividually); if (flag) { Find.TickManager.Notify_GeneratedPotentiallyHostileMap(); Find.LetterStack.ReceiveLetter("EscapeShipFoundLabel".Translate(), "EscapeShipFound".Translate(), LetterDefOf.PositiveEvent, new GlobalTargetInfo(target.Map.Center, target.Map)); } else { Find.LetterStack.ReceiveLetter("LetterLabelCaravanEnteredMap".Translate(target), "LetterCaravanEnteredMap".Translate(caravan.Label, target).CapitalizeFirst(), LetterDefOf.NeutralEvent, t); } }