Skip to content

Commit

Permalink
Use FIND_DROPPED_RESOURCE
Browse files Browse the repository at this point in the history
Addresses screeps#144
  • Loading branch information
RiftLurker authored Oct 18, 2019
1 parent e7c6f48 commit 6138682
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/source/PowerCreep.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ ERR_INVALID_ARGS | <code>enable</code> argument is not a boolean value.
{% api_method pickup 'target' A %}

```javascript
const target = creep.pos.findClosestByRange(FIND_DROPPED_ENERGY);
const target = creep.pos.findClosestByRange(FIND_DROPPED_RESOURCE);
if(target) {
if(creep.pickup(target) == ERR_NOT_IN_RANGE) {
creep.moveTo(target);
Expand Down

0 comments on commit 6138682

Please sign in to comment.