// ===================== Setup work ===================== public override void SpawnSetup(Map map, bool respawningAfterLoad) { base.SpawnSetup(map, respawningAfterLoad); if (respawningAfterLoad == false) { this.pawnsAboard.AddRange(Expedition.GenerateExpeditionPawns(this.Map)); } }
// ===================== Setup work ===================== public override void SpawnSetup(Map map, bool respawningAfterLoad) { base.SpawnSetup(map, respawningAfterLoad); if ((this.teamIsDropped == false) && (this.pawnsAboard.Count == pilotsNumber)) { this.pawnsAboard.AddRange(Expedition.GenerateExpeditionPawns(this.Map)); } }
protected override bool TryExecuteWorker(IncidentParms parms) { Map map = (Map)parms.target; Building_LandingPad landingPad = Util_LandingPad.GetBestAvailableLandingPadReachingMapEdge(map); if (landingPad == null) { // Should not happen if CanFireNowSub returned true. return(false); } // Spawn landing dispatcher spaceship. FlyingSpaceshipLanding dispatcherSpaceship = Util_Spaceship.SpawnLandingSpaceship(landingPad, SpaceshipKind.DispatcherPick); // Spawn expedition team. List <Pawn> teamPawns = Expedition.GenerateExpeditionPawns(map); if (Rand.Value < 0.2f) { ApplyInjuriesOrIllnessToTeam(map, teamPawns); } return(SpawnTeamOnMapEdge(landingPad.Position, map, teamPawns)); }