#include #include #include #include #include #include #include "Constants.hpp" #include "Structures/Spawn.hpp" void DouwcoHivemind::Spawn::loop() { int creepcount = spawn.room().find(Screeps::FIND_MY_CREEPS).size(); if (creepcount > 10) { EM_ASM({ console.log('To much creeps in this room'); }); return; } EM_ASM({ console.log('Creating a harvester'); }); JSON opts; opts["memory"]["role"] = Roles::HARVESTER; int resp = spawn.spawnCreep( {"work", "carry", "move"}, "harvester" + std::to_string(Screeps::Game.time()), opts); }