Skip to content

Comments

Z gen migration#1

Open
MatthewARoy wants to merge 6 commits intozGResetfrom
zGenMigration
Open

Z gen migration#1
MatthewARoy wants to merge 6 commits intozGResetfrom
zGenMigration

Conversation

@MatthewARoy
Copy link
Owner

Pull request summary

Description:

Added:

  • None

Changed:

  • None

Removed:

  • None

Fixed:

  • None

Testing checklist:

  • Changes are backward-compatible OR version migration code is included
  • Codebase compiles with current tsconfig configuration
  • Tested changes on {choose PUBLIC/PRIVATE} server OR changes are trivial (e.g. typos)

let colonies = getAllColonies().filter(colony => colony.level > 6);
for (let colony of colonies) {
let route = Game.map.findRoute(colony.room, room);
if (room.name != 'W24N31' && route != -2 && route.length <= 8) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name

Copy link
Owner Author

@MatthewARoy MatthewARoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

V1 review

Comment on lines +497 to +508
// Order more power if needed
if (Game.market.credits > TraderJoe.settings.market.energyCredits) {
const averageEnergy = _.sum(this.terminals, terminal => colonyOf(terminal).assets[RESOURCE_POWER] || 0)
/ this.terminals.length;
if (averageEnergy < 10000) {
const poorestTerminal = minBy(this.terminals, terminal => colonyOf(terminal).assets[RESOURCE_POWER] || 0);
if (poorestTerminal) {
const amount = 10000;
Overmind.tradeNetwork.maintainBuyOrder(poorestTerminal, RESOURCE_POWER, amount, 5);
}
}
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

Comment on lines +58 to +60
else if(RoomIntel.roomReservedBy(this.pos.roomName) == 'Invader') {
reserver.goTo(this.room.controller!.pos);
reserver.attackController(this.room.controller!);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this a task please, same as reserve below

Comment on lines -190 to -196
let fortifyTicks = 0;
let shouldFortify = this.colony.assets.energy > (Game.map.getRoomLinearDistance(this.room.name, 'W16N48') * 15000);
if (shouldFortify) {
fortifyTicks = 0.25 * _.sum(this.fortifyBarriers, barrier =>
Math.max(0, WorkerOverlord.settings.barrierHits[this.colony.level]
- barrier.hits)) / REPAIR_POWER;
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please leave this part here, I think this was you trying to rampart up even with no energy

Comment on lines -208 to +204
if (this.colony.name == 'W14N57') {
//if (this.colony.name == 'W14N57') {
//numWorkers = 8;
}
//}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can just deleted all this

Comment on lines +31 to +42
// OutpostDefenseOverlord can be used to harass low RCL rooms., stomp csites codes
if(this.room.name == zerg.room.name && zerg.hits == zerg.hitsMax){
const enemyConstructionSites = zerg.room.find(FIND_HOSTILE_CONSTRUCTION_SITES, {
filter: function(csite: ConstructionSite) {
return csite.progress > 0;
}
});
if (enemyConstructionSites.length > 0 && enemyConstructionSites[0].pos.isWalkable(true)) {
zerg.goTo(enemyConstructionSites[0].pos);
return;
}
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets not use the outpost defense for a harass op, should rework it. remove please

private registerOutputRequests(): void {
if (this.container) {
if (_.sum(this.container.store) > 0.5 * this.container.storeCapacity ||
if (_.sum(this.container.store) > 0.25 * this.container.storeCapacity || // changed from 0.5 to 0.25
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too general, if you're going to do that have it be only for SK rooms. I haven't had any issues with mineral pickup though

Comment on lines +490 to +508
if(miner.getActiveBodyparts(HEAL) > 0){
if(miner.hits < miner.hitsMax){
miner.heal(miner);
} else {
const target = CombatTargeting.findClosestHurtFriendly(miner);
if (target) {
// Approach the target
const range = miner.pos.getRangeTo(target);
// Heal or ranged-heal the target
if (range <= 1) {
miner.heal(target);
}
else if (range <= 3) {
miner.rangedHeal(target);
}
}

}
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very cpu expensive thing to do be doing. Constantly looking around you for hurt people and healing with one heal part? I don't want the miner heal tech I think.

STRUCTURE_TERMINAL,
STRUCTURE_RAMPART,
STRUCTURE_WALL,
STRUCTURE_INVADER_CORE,
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically I don't think this is a buildable structure, should redefine constant tbh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant