diff --git a/src/RoomPlanner/index.ts b/src/RoomPlanner/index.ts index c03cc67..ce440ad 100644 --- a/src/RoomPlanner/index.ts +++ b/src/RoomPlanner/index.ts @@ -190,10 +190,11 @@ export default profiler.registerFN(function (room: Room) { // Build Roads + Containers const roadTargets = (room.sources as (_HasRoomPosition | null)[]) .concat([room.controller, room.mineral]) - .concat([room.find(FIND_EXIT_TOP).at(0), - room.find(FIND_EXIT_LEFT).at(0), - room.find(FIND_EXIT_RIGHT).at(0), - room.find(FIND_EXIT_BOTTOM).at(0)] + .concat((room.find(FIND_EXIT_TOP).slice(0, 1)) + .concat(room.find(FIND_EXIT_LEFT).slice(0, 1)) + .concat(room.find(FIND_EXIT_RIGHT).slice(0, 1)) + .concat(room.find(FIND_EXIT_BOTTOM).slice(0, 1)) + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition .map(pos => pos != null ? ({ pos }) : null)); for (const target of roadTargets) { if (target == null) { diff --git a/tsconfig.json b/tsconfig.json index c0f37f3..871820b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,12 +23,11 @@ }, "include": [ "next-env.d.ts", - "src/**/*.ts", - "src/**/*.tsx", + "**/*.ts", + "**/*.tsx", ], "exclude": [ "node_modules", - "deps", "dist", ] }