Add Traveler - an alternative to moveTo
This commit is contained in:
parent
c026087af1
commit
20fa862ba7
4 changed files with 6 additions and 1 deletions
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[submodule "deps/Traveler"]
|
||||
path = deps/Traveler
|
||||
url = https://github.com/screepers/Traveler.git
|
||||
1
deps/Traveler
vendored
Submodule
1
deps/Traveler
vendored
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 2fd1c0ce32ec214b93871ad4d780fd3952c8bbff
|
||||
|
|
@ -2,7 +2,7 @@ import { createAction, Fail, InProgress } from "./Action";
|
|||
|
||||
export const moveTo = (pos: _HasRoomPosition | RoomPosition) =>
|
||||
createAction("moveTo", (creep: Creep) => {
|
||||
switch (creep.moveTo(pos)) {
|
||||
switch (creep.travelTo(pos)) {
|
||||
case OK: {
|
||||
return InProgress;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import { Constructor } from "./Workers/Constructor";
|
|||
import { Miner } from "./Workers/Miner";
|
||||
import { Upgrader } from "./Workers/Upgrader";
|
||||
import { runWorkers, spawnWorkers } from "./Workers/worker";
|
||||
import "../deps/Traveler/Traveler";
|
||||
|
||||
const runTowers = (spawn: StructureSpawn) => {
|
||||
const towers: StructureTower[] = spawn.room.find(FIND_MY_STRUCTURES,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue