Added structure handling in engine as well.
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
#include "Constants.hpp"
|
||||
#include "Structures/Spawn.hpp"
|
||||
|
||||
void DouwcoHivemind::Spawn::process()
|
||||
void DouwcoHivemind::Spawn::loop()
|
||||
{
|
||||
int creepcount = structure->room().find(Screeps::FIND_MY_CREEPS).size();
|
||||
int creepcount = spawn.room().find(Screeps::FIND_MY_CREEPS).size();
|
||||
if (creepcount > 10)
|
||||
{
|
||||
EM_ASM({ console.log('To much creeps in this room'); });
|
||||
@@ -21,7 +21,7 @@ void DouwcoHivemind::Spawn::process()
|
||||
JSON opts;
|
||||
opts["memory"]["role"] = Roles::HARVESTER;
|
||||
|
||||
int resp = structure->spawnCreep(
|
||||
int resp = spawn.spawnCreep(
|
||||
{"work", "carry", "move"},
|
||||
"harvester" + std::to_string(Screeps::Game.time()),
|
||||
opts);
|
||||
|
||||
Reference in New Issue
Block a user