Minor bug fixes
This commit is contained in:
@@ -10,16 +10,15 @@
|
||||
|
||||
void DouwcoHivemind::Spawn::process()
|
||||
{
|
||||
int creepcount = structure->room().find(Screeps::FIND_MY_CREEPS, nullptr).size();
|
||||
EM_ASM({ console.log('creepcount: ' + $0); }, creepcount);
|
||||
if (creepcount >= 10) return;
|
||||
int creepcount = structure->room().find(Screeps::FIND_MY_CREEPS).size();
|
||||
if (creepcount > 10) return;
|
||||
|
||||
JSON opts;
|
||||
opts["memory"]["role"] = DouwcoHivemind::ROLE_HARVESTER;
|
||||
|
||||
int resp = structure->spawnCreep(
|
||||
{"work", "carry", "move"},
|
||||
"harvester" + std::to_string(creepcount + 1),
|
||||
"harvester" + std::to_string(Screeps::Game.time()),
|
||||
opts
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user