Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor console.logs to logger #192

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/roomPlanner/RoadPlanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,14 +398,14 @@ export class RoadPlanner {
/* Clean up leftover road coverage locations from remotes that aren't mined or old structures */
private cleanRoadCoverage() {
const colonyDestinations = this.colony.destinations.map(dest => `${dest.pos.roomName}:${dest.pos.x}:${dest.pos.y}`);
console.log(`Colony ${this.colony.print} has destinations of ${JSON.stringify(colonyDestinations)}`);
log.debug(`Colony ${this.colony.print} has destinations of ${JSON.stringify(colonyDestinations)}`);

for (const roadCoverageKey of Object.keys(this.memory.roadCoverages)) {
// console.log(`Colony ${this.colony.name} Road coverage of ${roadCoverageKey}`);
if (colonyDestinations.includes(roadCoverageKey)) {
// console.log(`Colony has destination of ${roadCoverageKey}`);
} else {
console.log(`Colony does not have destination of ${roadCoverageKey}, deleting.`);
log.warning(`Colony does not have destination of ${roadCoverageKey}, deleting.`);
delete this.memory.roadCoverages[roadCoverageKey];
}
}
Expand Down