Added small movments when waiting on new target preventing blocking a source.

This commit is contained in:
2026-06-17 01:04:10 +02:00
parent af440fd296
commit 2332978ab7
5 changed files with 17 additions and 13 deletions

View File

@@ -17,7 +17,6 @@ void DouwcoHivemind::Spawn::loop()
int required_suppliers = 1;
int required_maintainers = spawn.room().find(Screeps::FIND_MY_STRUCTURES).size() <= 2 ? 0 : 1;;
int required_builders = spawn.room().find(Screeps::FIND_MY_CONSTRUCTION_SITES).size() == 0 ? 0 : 1;
for (auto &creep : Screeps::Game.creeps())
{
CreepRole role = creep.second.memory()["role"];
@@ -32,7 +31,7 @@ void DouwcoHivemind::Spawn::loop()
required_builders--;
}
if (energyAvailable < energyCapacityAvailable && required_suppliers < 2)
if (energyAvailable < energyCapacityAvailable && 3 < Screeps::Game.creeps().size())
return;
std::string name;
JSON opts;