Skip to content

Commit

Permalink
weird for behavior?
Browse files Browse the repository at this point in the history
  • Loading branch information
stevinus73 committed Nov 1, 2024
1 parent 6a60796 commit 861d60c
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/logic/buildings.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,16 @@ BModify._Initialize = function(en) {
return 'RS_Manager';
}

BModify.Recalculate = function() {
for (const mn in this.rsManagers) {
mn.recalculate();
}
}

BModify.Harvest = function() {
for (const mn in this.rsManagers) {
//mn.harvest();
}
}
BModify.Recalculate = function() { this.rsManagers.forEach(mn => mn.recalculate()) }
BModify.Harvest = function() { this.rsManagers.forEach(mn => mn.harvest()) }


//this.en.injectCode(Game.CalculateGains, "var mult=1;", "mod.bModify.Recalculate();", "after");
Game.registerHook('cps', function(cps) {
BModify.Recalculate();
return cps;
})
Game.registerHook('logic', this.Harvest);
//Game.registerHook('logic', this.Harvest);

// testing, for farms, mines
new BModify.RS_Manager(2, 8, 40000);
Expand Down

0 comments on commit 861d60c

Please sign in to comment.