Screeps Wiki
Advertisement

function (direction) {

   if (!this.my) {
     return C.ERR_NOT_OWNER;
   }
   if (data(this.id).spawning) {
     return C.ERR_BUSY;
   }
   if (data(this.id).fatigue > 0) {
     return C.ERR_TIRED;
   }
   if (this.getActiveBodyparts(C.MOVE) == 0) {
     return C.ERR_NO_BODYPART;
   }
   intents[this.id] = intents[this.id] || {};
   intents[this.id].move = {direction: direction};
   return C.OK;
 }
Advertisement