-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrole.manual.js
45 lines (38 loc) · 1.33 KB
/
role.manual.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
36
37
38
39
40
41
42
43
44
45
var roleManual = {
run: function(creep) {
// Game.spawns['Spawn1'].spawnCreep([WORK, MOVE, CARRY], 'Builder0B', {memory: {role: 'manual'}})
// if(creep.store.getFreeCapacity() > 0) {
// var ruins = creep.room.find(FIND_STRUCTURES, {
// filter: (structure) => {
// return (structure.structureType == Ruin())
// }
// });
// }
// target = [31,17]
//
// creep.room.find(FIND_SOURCES, {
// filter: (structure) => {
// return (structure.structureType == STRUCTURE_WALL)
// }
// })
//
// creep.harvest()
console.log('🦾 manual')
// let containersTest = creep.room.find(FIND_STRUCTURES, {
// filter: (structure) => {
// return structure.structureType == STRUCTURE_CONTAINER
// }
// })
//
// console.log(containersTest.length + ' is ' + containersTest)
//
// let code = creep.withdraw(containersTest[0], RESOURCE_ENERGY)
//
// if (code == ERR_NOT_IN_RANGE) {
// creep.moveTo(containersTest[0], {visualizePathStyle: { stroke: '#ff0000'}})
// } else {
// console.log('code: ' + code)
// }
}
};
module.exports = roleManual;