Open xyzzy529 opened 2 years ago
Here is what seems to work as a fix:
registerLogisticsRequests(colony) {
// Register logistics requests for all dropped resources and tombstones
for (let room of colony.rooms) {
// Pick up all nontrivial dropped resources
console.log("drops ALL:", JSON.stringify(room.drops,null,4) );
for (let dropIdx in room.drops) { // <--- Added new level of room.drops
for (let resourceType in room.drops[dropIdx]) {
try {
for (let drop of room.drops[dropIdx][resourceType]) {
if (drop.amount > LogisticsNetwork.settings.droppedEnergyThreshold
|| drop.resourceType != RESOURCE_ENERGY) {
colony.logisticsNetwork.requestOutput(drop);
console.log("process drop: ", JSON.stringify(drop.pos), drop.amount );
}
}
} catch (error) {
console.log("drops-error:", dropIdx, resourceType, error);
}
}
}
}
// Place a logistics request directive for every tombstone with non-empty store that isn't on a container
Issue summary
Installed fresh 0.5.2.1 and received below error
Description of issue:
The room was stuck not harvesting or upgrading.
https://screeps.com/a/#!/room/shard0/W12S22
I re-copied the 0.5.2.1 release and it gave error.
Steps to reproduce:
AFAIK, just copy/paste the 0.5.2.1 version into main and commit it in screeps/scripts. Then error appears. The room was previously built out.
Error message:
Suggested fix (optional):
unknown
Other information:
‣ Version: Overmind v0.5.2 ‣ Checksum: 0x2bf8f766f8e ‣ Assimilated: No (clearance code: null) [WIP] ‣ Operating mode: automatic