mirror of
https://github.com/paradizelost/screeps.git
synced 2024-11-25 02:14:44 -06:00
11 lines
329 B
JavaScript
11 lines
329 B
JavaScript
|
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)
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
module.exports = rolenrBuilder;
|