Improved performance of walking.

Switches to manual walking when close to target.
This commit is contained in:
DouweRavers
2022-05-01 00:52:48 +02:00
parent 744b4a2478
commit 4e3ad07fff
5 changed files with 48 additions and 52 deletions

View File

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