[WIP] sourcer near storage deposits directly, no carry#435
[WIP] sourcer near storage deposits directly, no carry#435sparr wants to merge 1 commit intoTooAngel:masterfrom
Conversation
|
The layout is currently. Each Pretty basic fits for most of the rooms. What you are describing is a special case within this logic, We had similar cases where carries could block other creeps. I think a better approach if the carry wouldn't stand still, but flips between two positions while waiting on energy. This would allow other creeps to pass by. |
|
So far this patch just has the sourcer deposit directly to the storage and not summon/spawn a carry. Thanks for the heads up that I need to have the layout skip one of the links and the sourcer not expect it, too. I'll have to wait until I have a room with links to test that. |
|
|
||
| if (nearStorage) { | ||
| const workParts = this.body.filter((part) => part.type === WORK).length; | ||
| if (_.sum(this.carry) > this.carryCapacity - workParts * 2) { |
There was a problem hiding this comment.
why not
if (_.sum(this.carry) > 0) {
The goal here is for a sourcer adjacent to the storage to deposit energy directly to the storage, without needing a carry. This is especially important if the carry would insist on standing in a spot that causes a traffic jam.
[WIP] pending more testing and possibly more improvements.