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

@@ -20,8 +20,7 @@
void DouwcoHivemind::Supplier::depositEnergy()
{
auto structure = getEnergyStructureTarget();
if (!structure)
return;
if (!structure) return;
if (isNearTo(structure->pos(), 1))
{
@@ -39,6 +38,7 @@ std::unique_ptr<Screeps::Structure> DouwcoHivemind::Supplier::getEnergyStructure
if (!roomObj)
{
searchEnergyStructure();
if(target_id.empty()) creep.move(rand()%5);
return nullptr;
}