Skip to content

Commit

Permalink
change documents
Browse files Browse the repository at this point in the history
  • Loading branch information
XenoAmess committed Sep 14, 2022
1 parent 6d3bd03 commit 02688e2
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/prototype_creep.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ Creep.prototype.checkForHandle = function() {

const role = this.memory.role;
if (!role) {
this.memory.role = 'scout';
this.log('Creep role not defined for: ' + this.id + ' ' + this.name.split('-')[0].replace(/[0-9]/g, ''));
Creep.recycleCreep(this);
return false;
Expand All @@ -115,7 +116,7 @@ Creep.prototype.handle = function() {
}
try {
if (!this.unit()) {
this.log('Unknown role suiciding');
this.log('Unknown role recycling creep');
Creep.recycleCreep(this);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/prototype_creep_clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Creep.prototype.cleanSetTargetId = function() {
}
}
this.memory.targetReached = true;
this.log('Nothing found, suicide');
this.log('Nothing found, recycling');
Creep.recycleCreep(this);
// return Creep.recycleCreep(this);
};
2 changes: 1 addition & 1 deletion src/prototype_creep_routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Creep.prototype.followPath = function(action) {
try {
path = this.prepareRoutingMemory();
} catch (e) {
this.log(`Suiciding, cannot prepare routing ${e} ${e.stack}`);
this.log(`Recycling, cannot prepare routing ${e} ${e.stack}`);
Creep.recycleCreep(this);
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/role_carry.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function checkHelperEmptyStorage(creep) {
if (targetStructure.structureType === STRUCTURE_STORAGE) {
creep.say('storage');
if (targetStructure.store.energy === 0) {
creep.log('Suiciding the storage I should get the energy from is empty');
creep.log('Recycling, the storage I should get the energy from is empty');
Creep.recycleCreep(creep);
}
}
Expand Down Expand Up @@ -398,7 +398,7 @@ roles.carry.action = function(creep) {

// End of path, can't harvest, suicide (otherwise the sourcer gets stuck)
if (!reverse && creep.body.filter((part) => part.type === WORK).length === 0) {
// creep.log('Suiciding because end of path, no energy, do not want to get in the way of the sourcer (better recycle?)');
// creep.log('Recycling because end of path, no energy, do not want to get in the way of the sourcer (better recycle?)');
Creep.recycleCreep(creep);
}

Expand Down
2 changes: 1 addition & 1 deletion src/role_quester.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ roles.quester.action = function(creep) {
creep.spawnReplacement();
const quest = Memory.quests[creep.memory.level];
if (!quest) {
creep.log(`Quest ${creep.memory.level} not found, suiciding`);
creep.log(`Quest ${creep.memory.level} not found, recycling`);
Creep.recycleCreep(creep);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/role_sourcer.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function harvest(creep) {
}

if (returnCode === ERR_NOT_OWNER) {
creep.log('Suiciding, someone else reserved the controller');
creep.log('Recycling, someone else reserved the controller');
Creep.recycleCreep(creep);
return false;
}
Expand Down

0 comments on commit 02688e2

Please sign in to comment.