修复获取有能量空位建筑函数
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
let HARVESTER_COUNT: number = 2;
|
||||
let BUILDER_COUNT: number = 2;
|
||||
let HARVESTER_COUNT: number = 4;
|
||||
let BUILDER_COUNT: number = 3;
|
||||
let UPGRADER_COUNT: number = 6;
|
||||
export {
|
||||
HARVESTER_COUNT,
|
||||
|
||||
@@ -5,7 +5,7 @@ export function FindCapacity(creep: Creep) {
|
||||
return (
|
||||
(type == STRUCTURE_EXTENSION ||
|
||||
type == STRUCTURE_SPAWN) &&
|
||||
structure.store.getFreeCapacity() != null && structure.store.getFreeCapacity() as number > 0
|
||||
structure.store.getFreeCapacity(RESOURCE_ENERGY) as number > 0
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user