public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { CompTransporterPawn transporter = t.TryGetComp <CompTransporterPawn>(); if (t == null) { return(null); } return(LoadTransportersPawnJobUtility.JobOnTransporter(pawn, transporter)); }
protected override Job TryGiveJob(Pawn pawn) { Utility.DebugReport("JobGiver_LoadTransportersPawn Called"); var transportersGroup = pawn.mindState.duty.transportersGroup; LoadTransportersPawnJobUtility.GetTransportersInGroup(transportersGroup, pawn.Map, tmpTransporters); foreach (var transporter in tmpTransporters) { if (LoadTransportersPawnJobUtility.HasJobOnTransporter(pawn, transporter)) { return(LoadTransportersPawnJobUtility.JobOnTransporter(pawn, transporter)); } } return(null); }
protected override Job TryGiveJob(Pawn pawn) { Cthulhu.Utility.DebugReport("JobGiver_LoadTransportersPawn Called"); int transportersGroup = pawn.mindState.duty.transportersGroup; LoadTransportersPawnJobUtility.GetTransportersInGroup(transportersGroup, pawn.Map, JobGiver_LoadTransportersPawn.tmpTransporters); for (int i = 0; i < JobGiver_LoadTransportersPawn.tmpTransporters.Count; i++) { CompTransporterPawn transporter = JobGiver_LoadTransportersPawn.tmpTransporters[i]; if (LoadTransportersPawnJobUtility.HasJobOnTransporter(pawn, transporter)) { return(LoadTransportersPawnJobUtility.JobOnTransporter(pawn, transporter)); } } return(null); }
public override Job JobOnThing(Pawn pawn, Thing t, bool forced = false) { var transporter = t.TryGetComp <CompTransporterPawn>(); return(t == null ? null : LoadTransportersPawnJobUtility.JobOnTransporter(pawn, transporter)); }