Skip to content

Commit

Permalink
V7 payload WindTurbine fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Slava0135 committed Dec 1, 2021
1 parent 082582b commit 69fa3ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mod.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ displayName: "reVision"
author: "Slava0135"
main: "revision.ReVision"
description: "The other way around"
version: "12.3"
version: "12.4"
minGameVersion: 120

2 changes: 1 addition & 1 deletion src/revision/world/blocks/power/WindTurbine.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ open class WindTurbine(name: String) : PowerGenerator(name) {
arrayOf(Point2(bot-1, bot-1), Point2(bot-1, top+1), Point2(top+1, top+1), Point2(top+1, bot-1))
val base = edges.size
val occupied = edges.count {
Vars.world.tile(tile.x + it.x, tile.y + it.y).solid()
Vars.world.tile(tile.x + it.x, tile.y + it.y)?.solid() ?: false
}
productionEfficiency = if (enabled) 1f - occupied.toFloat() / base else 0f
}
Expand Down

0 comments on commit 69fa3ae

Please sign in to comment.