Skip to content

Commit

Permalink
Let miners use speed modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
KirkMcDonald committed Oct 16, 2024
1 parent 3c1d333 commit cc81cea
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions building.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,14 @@ class Miner extends Building {
return zero
}
getRecipeRate(spec, recipe) {
// XXX: Speed effect
return this.miningSpeed.div(recipe.miningTime)
let modules = spec.getModuleSpec(recipe)
let speedEffect
if (modules) {
speedEffect = modules.speedEffect()
} else {
speedEffect = one
}
return this.miningSpeed.div(recipe.miningTime).mul(speedEffect)
}
prodEffect(spec) {
return spec.miningProd
Expand Down

0 comments on commit cc81cea

Please sign in to comment.