Files
screeps/_rooms.js
DouweRavers 4e3ad07fff Improved performance of walking.
Switches to manual walking when close to target.
2022-05-01 00:52:48 +02:00

21 lines
461 B
JavaScript

module.exports = {
start: function () {
for (const room_name in Game.rooms) {
const room = Game.rooms[room_name];
room.init();
}
},
update: function () {
for (const room_name in Game.rooms) {
const room = Game.rooms[room_name];
if (Game.time % 1000 == 0) {
// Place new building types if the max construcion sites isn't achieved yet.
if (room.canConstruct()) {
room.planRoads();
room.planStructures();
}
}
}
}
}