Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. pmaidens
    3. Topics
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    Topics created by pmaidens

    • Extension documentation says "You are not the owner of this spawn"
      Technical Issues and Bugs • • pmaidens

      1
      1
      Posts
      2812
      Views

      No one has replied

    • Cannot use moveTo, harvest, or transferEnergy on target stored in memory
      Technical Issues and Bugs • • pmaidens

      8
      8
      Posts
      11667
      Views

      I'll just leave this here, it is a helper function that deals with the room position issue without needing to use the Game.getObjectById function: /** * @param {number|object} x * @param {number} [y] * @param {string} [roomName] * @returns {RoomPosition|boolean} */ var getRoomPosition = function (x, y, roomName) { if (!x) return false; if (typeof x == 'object') { var object = x; x = object.x; y = object.y; roomName = object.roomName || object.room; } return new RoomPosition(x, y, roomName); }; global.pos = getRoomPosition; // Usage: creep.memory.target = creep.room.find(FIND_SOURCES)[0]; creep.moveTo(pos(creep.memory.target));
    • Spawn.canCreateCreep() should not return 0 on success
      Technical Issues and Bugs • • pmaidens

      4
      4
      Posts
      6112
      Views

      There is a global constant OK, which is set to 0; So suddenly everything makes sense var canDo = method.canDo() == 0 ? true:false;//Misuse of the API. Docs DO include the number, but defined constant should be used. var canDo = method.canDo() == OK ? true:false;// Appropriate use of the published API, OK constant is defined