Skip to content

Instantly share code, notes, and snippets.

@Yardboy
Created September 13, 2020 17:38
Show Gist options
  • Save Yardboy/2626979228ac7fd372d7a5d361920f34 to your computer and use it in GitHub Desktop.
Save Yardboy/2626979228ac7fd372d7a5d361920f34 to your computer and use it in GitHub Desktop.
Quick js for Dave
if(creep.memory.transfering) {
if (creep.store[RESOURCE_ENERGY] == 0) {
creep.memory.transfering = false;
creep.say('🔄 harvest');
}
} else if(creep.store.getFreeCapacity() == 0) {
creep.memory.transfering = true;
creep.say('transfering');
} else {
[whatever]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment