public override Job TryGiveJob(Pawn pawn)
        {
            bool allowedOutside = JoyUtility.EnjoyableOutsideNow(pawn);

            if (!pawn.Map.listerThings.ThingsInGroup(ThingRequestGroup.Grave).Where(delegate(Thing x)
            {
                Building_Grave building_Grave = (Building_Grave)x;
                return(x.Faction == Faction.OfPlayer && building_Grave.HasCorpse && !building_Grave.IsForbidden(pawn) && building_Grave.Corpse.InnerPawn.Faction == Faction.OfPlayer && (allowedOutside || building_Grave.Position.Roofed(building_Grave.Map)) && pawn.CanReserveAndReach(x, PathEndMode.Touch, Danger.None) && building_Grave.IsPoliticallyProper(pawn));
            }).TryRandomElementByWeight(delegate(Thing x)
            {
                float lengthHorizontal = (x.Position - pawn.Position).LengthHorizontal;
                return(Mathf.Max(150f - lengthHorizontal, 5f));
            }, out var result))
            {
                return(null);
            }
            return(JobMaker.MakeJob(def.jobDef, result));
        }
        public override Job TryGiveJob(Pawn pawn)
        {
            bool allowedOutside        = JoyUtility.EnjoyableOutsideNow(pawn, null);
            IEnumerable <Thing> source = pawn.Map.listerThings.ThingsInGroup(ThingRequestGroup.Grave).Where(delegate(Thing x)
            {
                Building_Grave building_Grave = (Building_Grave)x;
                return(x.Faction == Faction.OfPlayer && building_Grave.HasCorpse && !building_Grave.IsForbidden(pawn) && building_Grave.Corpse.InnerPawn.Faction == Faction.OfPlayer && (allowedOutside || building_Grave.Position.Roofed(building_Grave.Map)) && pawn.CanReserveAndReach(x, PathEndMode.Touch, Danger.None, 1, -1, null, false) && building_Grave.IsPoliticallyProper(pawn));
            });
            Thing t = default(Thing);

            if (!source.TryRandomElementByWeight <Thing>((Func <Thing, float>) delegate(Thing x)
            {
                float lengthHorizontal = (x.Position - pawn.Position).LengthHorizontal;
                return(Mathf.Max((float)(150.0 - lengthHorizontal), 5f));
            }, out t))
            {
                return(null);
            }
            return(new Job(base.def.jobDef, t));
        }
            internal bool <> m__0(Thing x)
            {
                Building_Grave building_Grave = (Building_Grave)x;

                return(x.Faction == Faction.OfPlayer && building_Grave.HasCorpse && !building_Grave.IsForbidden(this.pawn) && building_Grave.Corpse.InnerPawn.Faction == Faction.OfPlayer && (this.allowedOutside || building_Grave.Position.Roofed(building_Grave.Map)) && this.pawn.CanReserveAndReach(x, PathEndMode.Touch, Danger.None, 1, -1, null, false) && building_Grave.IsPoliticallyProper(this.pawn));
            }