How to use the roads.gc function in roads

To help you get started, we’ve selected a few roads examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jerroydmoore / screeps-ai / main.js View on Github external
if (!creep.busy) { // Upgrader, also the catch-all
            roleUpgrader.run(creep);
        }

        if (creep.ticksToLive === 1) {
            creep.say('☠️ dying');
            // console.log(`${creep} ${creep.pos} died naturally.`);
            for(const resourceType in creep.carry) {
                creep.drop(resourceType);
            }
            // TODO Inform a Spawner to replace the creep.
            delete Memory.creeps[creep.name];
        }
    }
    utils.gc(); // garbage collect the recently deseased creep
    Roads.gc();
    Towers.gc();
    Extensions.gc();
    RoomUtils.gc();
    BuildOrders.gc();
};

roads

An isomophic http framework

MIT
Latest version published 3 years ago

Package Health Score

36 / 100
Full package analysis