screeps/role.nrworker.js

10 lines
328 B
JavaScript
Raw Normal View History

2020-11-09 19:31:39 -06:00
let rolenrBuilder = {
run: function(creep) {
if(Game.flags.claim.pos.isEqualTo(creep.pos) && creep.room == Game.flags.claim.room){
creep.memory.role = 'phase' + creep.room.memory.phase + 'worker'
} else {
creep.travelTo(Game.flags.claim)
}
}
};
2020-11-10 01:29:27 -06:00
module.exports = rolenrBuilder;