As you can see. The marked position of source spot is wrong so the miner will take wrong destination.
At around line 150 in file mineral.ts at , you can see the miner take the first position of finded path as it's destination pos but the terrain at this position is wall, so I have to add terrain check to avoid this problem temporily or the miner will hang around source endlessly.
But I think it's someting wrong with path find or there maybe more elegent way to solve this.
please fix it ASAP, thanks.
const [pathResult, details] = getPath(kernel, mineral.pos, basePos, roadPolicy, trace);
if (!pathResult || !pathResult.path.length || new Room.Terrain(mineral.room.name).get(pathResult.path[0].x, pathResult.path[0].y)) {
trace.error('path not found', { basePos, mineral: mineral.pos, details });
return;
}
As you can see. The marked position of source spot is wrong so the miner will take wrong destination.
At around line 150 in file mineral.ts at , you can see the miner take the first position of finded path as it's destination pos but the terrain at this position is wall, so I have to add terrain check to avoid this problem temporily or the miner will hang around source endlessly.
But I think it's someting wrong with path find or there maybe more elegent way to solve this.
please fix it ASAP, thanks.