Added small movments when waiting on new target preventing blocking a source.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user