public override void Arrived(int tile) { LongEventHandler.QueueLongEvent(delegate() { Map map = GetOrGenerateMapUtility.GetOrGenerateMap(tile, null); //MAP INDEX BUG TaggedString label = "LetterLabelCaravanEnteredEnemyBase".Translate(); TaggedString text = "LetterTransportPodsLandedInEnemyBase".Translate(parent.Label).CapitalizeFirst(); if (parent is Settlement settlement) { SettlementUtility.AffectRelationsOnAttacked(settlement, ref text); } if (!parent.HasMap) { Find.TickManager.Notify_GeneratedPotentiallyHostileMap(); PawnRelationUtility.Notify_PawnsSeenByPlayer_Letter(map.mapPawns.AllPawns, ref label, ref text, "LetterRelatedPawnsInMapWherePlayerLanded".Translate(Faction.OfPlayer.def.pawnsPlural), true, true); } AerialVehicleInFlight aerialVehicle = vehicle.GetAerialVehicle(); CameraJumper.TryJump(map.Center, map); StrafeTargeter.Instance.BeginTargeting(vehicle, vehicle.CompVehicleLauncher.launchProtocol, delegate(IntVec3 start, IntVec3 end) { VehicleSkyfaller_FlyOver skyfaller = VehicleSkyfallerMaker.MakeSkyfallerFlyOver(vehicle.CompVehicleLauncher.Props.skyfallerStrafing, vehicle, start, end); skyfaller.aerialVehicle = aerialVehicle; Thing thing = GenSpawn.Spawn(skyfaller, start, parent.Map, Rot8.North); //REDO - Other rotations? }, null, null, null, true); aerialVehicle.Destroy(); }, "GeneratingMap", false, null, true); }
public override void Arrived(int tile) { VehicleSkyfaller_Arriving skyfaller = (VehicleSkyfaller_Arriving)VehicleSkyfallerMaker.MakeSkyfaller(vehicle.CompVehicleLauncher.Props.skyfallerIncoming, vehicle); GenSpawn.Spawn(skyfaller, landingCell, mapParent.Map, landingRot); }