public override void Cleanup()
        {
            base.Cleanup();             // there's nothing in the base call (at the moment), but just in case in the future there's something

            // get pawns that spawned from Reunion
            var listToReturn = pawns.FindAll((pawn) =>
            {
                return(pawn.Faction != Faction.OfPlayer && GameComponent.ListAllySpawned.Contains(pawn.GetUniqueLoadID()));
            });

            GameComponent.FlagNextEventReadyForScheduling();
            foreach (var pawn in listToReturn)
            {
                GameComponent.ReturnToAvailable(pawn, GameComponent.ListAllySpawned, GameComponent.ListAllyAvailable);
            }

            if (quest.State == QuestState.EndedOfferExpired)
            {
                saveByReference = true;
            }
            else
            {
                GameComponent.TryScheduleNextEvent(ScheduleMode.Forced);
            }
        }
 static bool Prefix(RimWorld.Planet.WorldPawns __instance, ref Pawn pawn, ref RimWorld.Planet.PawnDiscardDecideMode discardMode)
 {
     if (Current.Game.Info.RealPlayTimeInteracting > 0 &&                          // prevent this from firing when the game hasn't even started proper
         !pawn.Destroyed &&                                                        // ignore pawns destroyed for whatever reason
         !KidnapUtility.IsKidnapped(pawn) &&                                       // don't make kidnapped pawns available; vanilla handles that naturally
         !PawnsFinder.AllCaravansAndTravelingTransportPods_Alive.Contains(pawn) && // ignore caravan/pods
         (pawn.ParentHolder == null || !(pawn.ParentHolder is CompTransporter)) && // ignore pawns in shuttle
         GameComponent.ListAllySpawned.Contains(pawn.GetUniqueLoadID()))
     {
         if (PawnComponentsUtility.HasSpawnedComponents(pawn))
         {
             PawnComponentsUtility.RemoveComponentsOnDespawned(pawn);
         }
         GameComponent.ReturnToAvailable(pawn, GameComponent.ListAllySpawned, GameComponent.ListAllyAvailable);
         return(false);
     }
     return(true);
 }