Ejemplo n.º 1
0
        protected override Job TryGiveJob(Pawn pawn)
        {
            ArcBaseRobot bot = pawn as ArcBaseRobot;
            Building_BaseRobotRechargeStation rechargeStation = BaseRobot_Helper.FindRechargeStationFor(bot);
            Job result;

            if (rechargeStation == null)
            {
                result = null;
            }
            else
            {
                if (bot.rechargeStation != rechargeStation)
                {
                    result = null;
                }
                else
                {
                    Job job = new Job(DefDatabase <JobDef> .GetNamed("AIRobot_GoRecharge", true), rechargeStation);
                    result = job;
                }
            }
            return(result);
        }
 public static Building_BaseRobotRechargeStation FindRechargeStationFor(ArcBaseRobot p)
 {
     return(BaseRobot_Helper.FindRechargeStationFor(p, p, false, false, false));
 }