Compare commits

...

2 Commits

Author SHA1 Message Date
jie
542d127eea 更新gitignore 2024-11-03 22:17:29 +08:00
jie
0d66740d0d 修复获取有能量空位建筑函数 2024-11-03 22:17:23 +08:00
4 changed files with 4 additions and 5 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
./dist
node_modules/*
dist/*

View File

@ -7,7 +7,6 @@ import typescript from 'rollup-plugin-typescript2' // <== 新增这一行
import { config } from './.secret.js'
console.log(config[process.env.DEST])
// 根据指定的目标获取对应的配置项
if (!process.env.DEST) console.log("未指定目标, 代码将被编译但不会上传")
else if (config.main == null && config.local == null) {

View File

@ -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,

View File

@ -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
)
}
})