public override Job JobOnThing(Pawn pawn, Thing t, bool forced) { if (!HaulAIUtility.PawnCanAutomaticallyHaulFast(pawn, t, forced)) { return(null); } return(HaulTherePlease.HaulToStorageJob(pawn, t)); }
public override Job JobOnThing(Pawn pawn, Thing t, bool forced) { bool canBeHauled = HaulAIUtility.PawnCanAutomaticallyHaulFast(pawn, t, forced); if (!canBeHauled) { return(null); } Job result = null; bool invalidStackCount = t.stackCount == 0; if (invalidStackCount) { return(null); } IntVec3 iceBoxCell = IntVec3.Invalid; IntVec3 roofedCell = IntVec3.Invalid; bool canFindColderPlace = false; bool canFindRoofedPlace = false; float rotDays = RottableUtil.GetRotDays(t); if (rotDays <= GenDate.DaysPerYear) { canFindColderPlace = TestStoreInColderPlace(pawn, t, out iceBoxCell); } canFindRoofedPlace = TestStoreUnderRoof(pawn, t, out roofedCell); if (canFindColderPlace) { result = HaulTherePlease.TestHaulMaxNumToCellJob(pawn, t, iceBoxCell, true); } if (canFindRoofedPlace) { result = HaulTherePlease.TestHaulMaxNumToCellJob(pawn, t, roofedCell, false); } //result = HaulTherePlease.HaulToStorageJob(pawn, t); return(result); }