First commit
This commit is contained in:
commit
6496f2d0ab
9 changed files with 1088 additions and 0 deletions
10
src/index.ts
Normal file
10
src/index.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
export function loop() {
|
||||
const spawn = Game.spawns.Spawn1;
|
||||
spawn.spawnCreep([WORK, CARRY, CARRY, MOVE], 'w1');
|
||||
for (const creep of Object.values(Game.creeps)) {
|
||||
const source = creep.pos.findClosestByPath(FIND_SOURCES_ACTIVE);
|
||||
if (source && creep.harvest(source) === ERR_NOT_IN_RANGE) {
|
||||
creep.moveTo(source);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue