Rewriting from scratch. Fixing old code is just less fun.

This commit is contained in:
DouweRavers
2022-04-29 01:45:27 +02:00
parent 5494f6fb17
commit 3e962ed04a
15 changed files with 159 additions and 974 deletions

21
_rooms.js Normal file
View File

@@ -0,0 +1,21 @@
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 (room.isNewLevel()) {
// Place new building types if the max construcion sites isn't achieved yet.
if (!room.isConstructionQueueFull()) {
room.planRoads();
room.planStructures();
}
}
}
}
}