[breaking bug] Accessing anything in .store of abandoned ruins throws exception in some cases

  • So basically here's what a friend of mine and me managed to dig up:

    Accessing anything under ruin.store of a ruin made from abandoned structures that did not have any storage before throws an exception from inside the API code. For now ruins of STRUCTURE_RAMPART, STRUCTURE_WALL, STRUCTURE_EXTRACTOR, and STRUCTURE_OBSERVER are confirmed to throw this errors.

    Room: https://screeps.com/a/#!/room/shard1/E46S11

    Structures that throw the exceptions: any of the ruins from outer rampart ring, ruins from extractor, and from observer.

    Error in question:

    TypeError: Cannot convert undefined or null to object
        at Function.entries (<anonymous>)
        at new <anonymous> (<runtime>:41413:16)
        at Object._storeGetter [as store] (<runtime>:41322:12)
        at Object.get [as store] (eval at exports.defineGameObjectProperties (<runtime>:1093:9), <anonymous>:7:61)
        at filter (role.builder:423:26)
        at arrayFilter (<runtime>:2665:13)
        at Function.filter (<runtime>:7590:14)
        at Object.find (<runtime>:14280:24)
        at Object.harvest (role.builder:420:32)

    Code block throwing the exception:

        // look for ruins with stuff
        var ruins = creep.room.find(FIND_RUINS, {
            filter: function(r)
                return r.store[RESOURCE_ENERGY] > 0;

  • Seeing the same issue.

  • Yeah - reported to o4 on slack on patch day. Kinda hoping it just goes away when the original ruins expire.

  • Dev Team

    It should be solved now, please confirm.

  • Can confirm that it is fixed in the original room. Thanks

  • @o4kapuk confirm it is working.