fixed workers again.

This commit is contained in:
2026-07-01 00:46:18 +02:00
parent aacf582e10
commit fe24faafe6
2 changed files with 2 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ void DouwcoHivemind::Worker::loop() {
} }
void DouwcoHivemind::Worker::getEnergy() { void DouwcoHivemind::Worker::getEnergy() {
if (foundContainer) collectEnergyFromContainers(); if (foundContainer || Screeps::Game.time()%100==0) collectEnergyFromContainers();
else harvestSource(); else harvestSource();
} }

View File

@@ -38,7 +38,7 @@ bool DouwcoHivemind::Room::placeContainers() {
auto sources = room.find(Screeps::FIND_SOURCES); auto sources = room.find(Screeps::FIND_SOURCES);
// No containers planned or build, planning now // No containers planned or build, planning now
if (sourceContainers.size() != sources.size()) { if (sourceContainers.size() < sources.size()) {
int controller_x = room.controller().value().pos().x(); int controller_x = room.controller().value().pos().x();
int controller_y = room.controller().value().pos().y(); int controller_y = room.controller().value().pos().y();