// Token: 0x0600001E RID: 30 RVA: 0x00002C2C File Offset: 0x00001C2C private Thing Findmech_oil(Pawn pawn, Building_sd_luciprod_distillery barrel) { Predicate <Thing> predicate = (Thing x) => !x.IsForbidden(pawn) && pawn.CanReserve(x, 1, -1, null, false); Predicate <Thing> validator = predicate; return(GenClosest.ClosestThingReachable(pawn.Position, pawn.Map, ThingRequest.ForDef(ThingDefOf.sd_luciprod_mechanite_oil), PathEndMode.ClosestTouch, TraverseParms.For(pawn, Danger.Deadly, TraverseMode.ByPawn, false), 9999f, validator, null, 0, -1, false, RegionType.Set_Passable, false)); }
// Token: 0x0600001D RID: 29 RVA: 0x00002BA4 File Offset: 0x00001BA4 public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { Building_sd_luciprod_distillery building_sd_luciprod_distillery = (Building_sd_luciprod_distillery)t; Thing t2 = this.Findmech_oil(pawn, building_sd_luciprod_distillery); return(new Job(JobDefOf.sd_luciprod_filldistillery, t, t2) { count = building_sd_luciprod_distillery.sd_luciprod_SpaceLeftFor_oil }); }
// Token: 0x0600001C RID: 28 RVA: 0x00002A84 File Offset: 0x00001A84 public override bool HasJobOnThing(Pawn pawn, Thing t, bool forced = false) { Building_sd_luciprod_distillery building_sd_luciprod_distillery = t as Building_sd_luciprod_distillery; bool result; if (building_sd_luciprod_distillery == null || building_sd_luciprod_distillery.Distilled || building_sd_luciprod_distillery.sd_luciprod_SpaceLeftFor_oil <= 0) { result = false; } else { float temperature = building_sd_luciprod_distillery.Position.GetTemperature(building_sd_luciprod_distillery.Map); CompProperties_TemperatureRuinable compProperties = building_sd_luciprod_distillery.def.GetCompProperties <CompProperties_TemperatureRuinable>(); if (temperature < compProperties.minSafeTemperature + 2f || temperature > compProperties.maxSafeTemperature - 2f) { JobFailReason.Is(WorkGiver_sd_luciprod_FillDistillery.TemperatureTrans, null); result = false; } else if (t.IsForbidden(pawn) || !pawn.CanReserveAndReach(t, PathEndMode.Touch, pawn.NormalMaxDanger(), 1, -1, null, false)) { result = false; } else if (pawn.Map.designationManager.DesignationOn(t, DesignationDefOf.Deconstruct) != null) { result = false; } else if (this.Findmech_oil(pawn, building_sd_luciprod_distillery) == null) { JobFailReason.Is(WorkGiver_sd_luciprod_FillDistillery.sd_luciprod_mechanite_No_oil_Trans, null); result = false; } else { result = !t.IsBurning(); } } return(result); }
// Token: 0x06000022 RID: 34 RVA: 0x00002CD4 File Offset: 0x00001CD4 public override bool HasJobOnThing(Pawn pawn, Thing t, bool forced = false) { Building_sd_luciprod_distillery building_sd_luciprod_distillery = t as Building_sd_luciprod_distillery; return(building_sd_luciprod_distillery != null && building_sd_luciprod_distillery.Distilled && !t.IsBurning() && !t.IsForbidden(pawn) && pawn.CanReserveAndReach(t, PathEndMode.Touch, pawn.NormalMaxDanger(), 1, -1, null, false)); }