public override Job TryGiveJob(Pawn pawn) { Job result; if (pawn.story.WorkTypeIsDisabled(WorkTypeDefOf.Construction)) { result = null; } else if (!JoyUtility.EnjoyableOutsideNow(pawn, null)) { result = null; } else if (pawn.Map.snowGrid.TotalDepth < 200f) { result = null; } else { IntVec3 c = JoyGiver_BuildSnowman.TryFindSnowmanBuildCell(pawn); if (!c.IsValid) { result = null; } else { result = new Job(this.def.jobDef, c); } } return(result); }
public override Job TryGiveJob(Pawn pawn) { if (!JoyUtility.EnjoyableOutsideNow(pawn, null)) { return(null); } if (pawn.Map.snowGrid.TotalDepth < 200f) { return(null); } IntVec3 c = JoyGiver_BuildSnowman.TryFindSnowmanBuildCell(pawn); if (!c.IsValid) { return(null); } return(new Job(this.def.jobDef, c)); }