bug in src/game/creeps.js withdrawing from power spawn
-
in https://raw.githubusercontent.com/screeps/engine/c318a920e3c04c1285c885e328d89ef748d7004c/src/game/creeps.js line 608 I think
if(data(target.id)[resourceType] || data(target.id)[resourceType] < amount) { return C.ERR_NOT_ENOUGH_RESOURCES; }
should read
if(!data(target.id)[resourceType] || data(target.id)[resourceType] < amount) { return C.ERR_NOT_ENOUGH_RESOURCES; }
-
Yes, I'm seeing the same error, withdrawing from a powerSpawn is returning ERR_NOT_ENOUGH_RESOURCES when called with valid parameters currently.
https://github.com/screeps/engine/blob/master/src/game/creeps.js#L627 is the line in error, you can see the correct line below:
https://github.com/screeps/engine/blob/master/src/game/creeps.js#L657
-
well that explains why OCS can't rob power spawns XD