使用全局Memory存放所有建筑ID及分配的Creep, Creep内存存放工作建筑
This commit is contained in:
15
src/index.d.ts
vendored
15
src/index.d.ts
vendored
@@ -1,8 +1,21 @@
|
||||
interface CreepMemory {
|
||||
role: string,
|
||||
working?: boolean | null,
|
||||
working?: boolean,
|
||||
source?:string,
|
||||
workTarget?: Id<Structure>,
|
||||
[property: string]: any,
|
||||
}
|
||||
|
||||
interface MemoryStructure{
|
||||
id: Id<Structure>,
|
||||
structureType: string,
|
||||
roomName: string
|
||||
creep?: Id<Creep>,
|
||||
}
|
||||
|
||||
interface Memory{
|
||||
structures?: MemoryStructure[]
|
||||
}
|
||||
|
||||
|
||||
declare type Part = WORK | MOVE | CARRY | HEAL | ATTACK | RANGED_ATTACK | TOUGH | CLAIM;
|
||||
Reference in New Issue
Block a user