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

@@ -19,12 +19,12 @@
#include <Screeps/ConstructionSite.hpp>
#include "Creeps/Builder.hpp"
#include "Creeps/CreepBase.hpp"
void DouwcoHivemind::Builder::depositEnergy()
{
auto constructionSite = getConstructionSiteTarget();
if (!constructionSite)
return;
if (!constructionSite) return;
if (isNearTo(constructionSite->pos(), 1))
{
@@ -42,6 +42,7 @@ std::unique_ptr<Screeps::ConstructionSite> DouwcoHivemind::Builder::getConstruct
if (!roomObj)
{
searchConstructionSite();
if(target_id.empty()) creep.move(rand()%5);
return nullptr;
}