Navigation

    forum

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

    lisukovigor492

    @lisukovigor492

    1
    Posts
    926
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    lisukovigor492 Follow

    Posts made by lisukovigor492

    • RE: Find empty spawn in room with full extensions.

      @ayrtep said in Find empty spawn in room with full extensions.:

      So this is the first time I have looked at the screeps engine, so I am probably missing stuff. However

      https://github.com/screeps/engine/blob/master/src/game/game.js#L316

      register.rooms[object.room].energyAvailable += object.store.energy;

      register.rooms[object.room].energyCapacityAvailable += object.storeCapacityResource.energy;

      We are += on something that could be null, in which case it would just turn null and stay that way forever!

      https://github.com/screeps/engine/blob/master/src/game/store.js#L28

      Here stuff in the store is set to "null" rather than "0" if the resource is missing.

      I am just guessing, but I suspect there might be an issue here. The bit in game.js was only done 11 months ago. https://github.com/screeps/engine/commit/879b4ca215f1e0b7fd92c7b32c7e59bdc4722cfc#diff-47818c887f19982321abd70c2e741871 https://www.worktime.com/

      I am not sure if this is relevant, but it's happening on a steam private server.

      posted in General Discussion
      lisukovigor492