Navigation

    forum

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

    red_led

    @red_led

    5
    Posts
    888
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    red_led Follow

    Posts made by red_led

    • Find* methods

      Please add thisArg to options list of all find methods and pass it to lodash filter.

      posted in Feature Requests
      red_led
    • RE: Find dropped energy

      I think (1) is becouse some type of owerflow. For example creep has 43 energy, 50 energyCapacity and harverts 10 per round. After calling creep.harvest() there will be 3 dropped energy on ground. Next creep gets it from ground and so on... Problem is that there is no way to get 7 energy instaed of 10.

      As for (2) i'm not trying to do anything special. Just noticed this strange behaviour.

      posted in Technical Issues and Bugs
      red_led
    • git branches

      It would be great to snap game code braches to git branches. Or just import all github branches and let me choose current active in each game mode (game/simulation/survival)

      posted in Feature Requests
      red_led
    • RE: Find dropped energy

      Arr... Sample code again:

          if (creep.carry.energy < creep.carryCapacity)
          {
              var energy = creep.pos.findInRange(
                  FIND_DROPPED_ENERGY,
                  1
              );
      
              if (energy.length) {
                  console.log('found ' + energy[0].energy + ' energy at ', energy[0].pos);
                  creep.pickup(energy[0]);
              }
          }
      
      posted in Technical Issues and Bugs
      red_led
    • Find dropped energy

      Have this tines in code:
      ```js
      if (creep.carry.energy < creep.carryCapacity)
      {
      var energy = creep.pos.findInRange(
      FIND_DROPPED_ENERGY,
      1
      );

          if (energy.length) {
              console.log('found ' + energy[0].energy + ' energy at ', energy[0].pos);
              creep.pickup(energy[0]);
          }
      }
      
      
      And noticed 2 bugs:
      1) when few creeps harvesting near each other there is often found 1-4 energy
      2) after calling ```someCreep.suicide()``` there is NaN energy!
      
      posted in Technical Issues and Bugs
      red_led