Chanded some filenames
Removed automatic path placement. Started command section.
This commit is contained in:
21
_creepsHandler.js
Normal file
21
_creepsHandler.js
Normal file
@@ -0,0 +1,21 @@
|
||||
module.exports = {
|
||||
// Gets called when recompiling and when Restart command is called.
|
||||
start: function () {
|
||||
for (const creep_name in Game.creeps) {
|
||||
const creep = Game.creeps[creep_name];
|
||||
creep.init();
|
||||
}
|
||||
},
|
||||
|
||||
// Gets called every tick.
|
||||
update: function () {
|
||||
for (const creep_name in Memory.creeps) {
|
||||
const creep = Game.creeps[creep_name];
|
||||
if (creep == undefined) {
|
||||
delete Memory.creeps[creep_name];
|
||||
return;
|
||||
}
|
||||
creep.tick();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user