-
Notifications
You must be signed in to change notification settings - Fork 159
[WIP] compare my branch to master #678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
1cf208b
fcfdcdd
07fa194
1c2cd3e
f6588ff
42757d5
fec7ba1
f947bae
092c929
0b44fdb
8590bbf
277eb35
478f1fa
ac8c29b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,11 +7,7 @@ global.brain = { | |
global.roles = {}; | ||
global.profiler = {}; | ||
|
||
try { | ||
global.friends = require('friends'); // eslint-disable-line global-require | ||
} catch (e) { | ||
global.friends = []; | ||
} | ||
global.friends = ["Antagonist", "ceneezer"] | ||
|
||
global.config = { | ||
profiler: { | ||
|
@@ -46,8 +42,8 @@ global.config = { | |
|
||
info: { | ||
signController: true, | ||
signText: 'Fully automated open source NPC: http://tooangel.github.io/screeps/', | ||
resignInterval: 500, | ||
signText: 'XenoAmesss here. Nice to meat you!', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why? |
||
resignInterval: 5000, | ||
}, | ||
|
||
// Due to newly introduces via global variable caching this can be removed | ||
|
@@ -154,7 +150,7 @@ global.config = { | |
}, | ||
|
||
pixel: { | ||
enabled: false, | ||
enabled: true, | ||
minBucketAfter: 2500, | ||
}, | ||
|
||
|
@@ -220,7 +216,7 @@ global.config = { | |
|
||
myRoom: { | ||
underAttackMinAttackTimer: 50, | ||
leastSpawnsToRebuildStructureSpawn: 1, | ||
leastSpawnsToRebuildStructureSpawn: 2, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe a good idea in hostile env. |
||
}, | ||
|
||
room: { | ||
|
@@ -345,6 +341,11 @@ global.config = { | |
}, | ||
|
||
maliciousNpcUsernames: ['Invader', 'Source Keeper'], | ||
structureSpawn: { | ||
leastStructureSpawnToDestroyStructureSpawn: 3, | ||
otherRoomCreepComeHelpBuildStructureHelperCount: 5 | ||
}, | ||
|
||
}; | ||
|
||
try { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,7 +75,10 @@ Room.prototype.creepMem = function(role, targetId, targetRoom, level, base) { | |
*/ | ||
Room.prototype.getPriority = function(object) { | ||
const priority = config.priorityQueue; | ||
const target = object.routing && object.routing.targetRoom; | ||
let target = object.routing && object.routing.targetRoom; | ||
if (target && target.name) { | ||
target = target.name; | ||
} | ||
const age = Game.time - (object.role.time || Game.time); | ||
const ageTerm = age / CREEP_LIFE_TIME * 20; | ||
if (target === this.name) { | ||
|
@@ -106,6 +109,8 @@ Room.prototype.spawnCheckForCreate = function() { | |
creep.ttl = creep.ttl || config.creep.queueTtl; | ||
if (this.findSpawnsNotSpawning().length === 0) { | ||
creep.ttl--; | ||
} else if (this.energyAvailable === this.energyCapacityAvailable) { | ||
creep.ttl = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why |
||
} | ||
return false; | ||
}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -416,8 +416,7 @@ roles.carry.action = function(creep) { | |
// End of path, can't harvest, suicide (otherwise the sourcer gets stuck) | ||
if (!reverse && creep.body.filter((part) => part.type === WORK).length === 0) { | ||
// creep.log('Suiciding because end of path, no energy, do not want to get in the way of the sourcer (better recycle?)'); | ||
creep.memory.killed = true; | ||
creep.suicide(); | ||
creep.moveRandom(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thats not a good idea? why don't they have a plan where from where to go |
||
} | ||
|
||
return true; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,7 +118,7 @@ function harvest(creep) { | |
if (returnCode === ERR_NO_BODYPART) { | ||
creep.room.checkRoleToSpawn('defender', 2, undefined, creep.room.name); | ||
creep.respawnMe(); | ||
creep.suicide(); | ||
creep.memory.role = 'scout'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this thing is dying, why make it to scout? |
||
return false; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?