protected override Job TryGiveJob(Pawn pawn) { X2_AIRobot aiRobot = pawn as X2_AIRobot; X2_Building_AIRobotRechargeStation rechargeStation = AIRobot_Helper.FindRechargeStationFor(aiRobot); if (rechargeStation == null) { return(null); } if (aiRobot.rechargeStation != rechargeStation) { return(null); } Job job = new Job(DefDatabase <JobDef> .GetNamed("AIRobot_GoRecharge"), rechargeStation); return(job); }
protected override Job TryGiveJob(Pawn pawn) { X2_AIRobot aiRobot = pawn as X2_AIRobot; X2_Building_AIRobotRechargeStation rechargeStation = AIRobot_Helper.FindRechargeStationFor(aiRobot); if (rechargeStation == null) { return(null); } if (aiRobot.rechargeStation != rechargeStation) { return(null); } Job job = new Job(JobDefOf.Goto, rechargeStation); return(job); }