public static bool ShouldSendNotificationAbout(Pawn p)
        {
            bool result;

            if (Current.ProgramState != ProgramState.Playing)
            {
                result = false;
            }
            else if (PawnGenerator.IsBeingGenerated(p))
            {
                result = false;
            }
            else if (p.IsWorldPawn() && (!p.IsCaravanMember() || !p.GetCaravan().IsPlayerControlled) && !PawnUtility.IsTravelingInTransportPodWorldObject(p) && p.Corpse.DestroyedOrNull())
            {
                result = false;
            }
            else
            {
                if (p.Faction != Faction.OfPlayer)
                {
                    if (p.HostFaction != Faction.OfPlayer)
                    {
                        return(false);
                    }
                    if (p.RaceProps.Humanlike && p.guest.Released && !p.Downed && !p.InBed())
                    {
                        return(false);
                    }
                    if (p.CurJob != null && p.CurJob.exitMapOnArrival && !PrisonBreakUtility.IsPrisonBreaking(p))
                    {
                        return(false);
                    }
                }
                result = true;
            }
            return(result);
        }