-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
35 lines (28 loc) · 920 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const Hive_brain = require('hive_brain');
var PartCost = {
MOVE: 50,
CARRY: 50,
ATTACK: 80,
WORK: 100,
RANGED_ATTACK: 100,
HEAL: 250,
CLAIM: 600
};
module.exports.loop = function() {
//console.log(room.find(FIND_SOURCES)); Game.rooms['W29N23'].find(FIND_SOURCES)
// console.log(Game.creeps[Object.keys(Game.creeps)[0]]);
// console.log(Game.spawns['Spawn1'].room.energyAvailable);
//let totalCreeps = _.size(Game.creeps);
//console.log(totalCreeps);
//let newName = Game.spawns['Spawn1'].createCreep([WORK, WORK, CARRY, MOVE],undefined, {role:'harvester'});
//console.log(newName);
Hive_brain.commence();
Hive_brain.work();
//let newName = Game.spawns[spawnName].createCreep(c_body,c_name,c_memory);
for (var names in Memory.creeps) {
if (!Game.creeps[names]) {
delete Memory.creeps[names];
console.log('Clearing non-existing creep memory:', names);
}
}
};