Improved miners and workers to work together.

This commit is contained in:
2026-07-01 00:24:25 +02:00
parent ceed83358b
commit 1e9b14f21c
6 changed files with 98 additions and 42 deletions

View File

@@ -64,7 +64,8 @@ void DouwcoHivemind::Spawn::loop() {
std::vector<std::string> body;
if (opts["memory"]["role"] == CreepRole::MINER) {
body.push_back("move");
for (int i = 0; i < (energyAvailable - 50) / 100 && i < 5; i++) {
body.push_back("work");
for (int i = 0; i < (energyAvailable - 150) / 100 && i < 5; i++) {
body.push_back("work");
}
} else {