Skip to content

Commit 69fa3ae

Browse files
author
slava0135
committed
V7 payload WindTurbine fix
1 parent 082582b commit 69fa3ae

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mod.hjson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ displayName: "reVision"
33
author: "Slava0135"
44
main: "revision.ReVision"
55
description: "The other way around"
6-
version: "12.3"
6+
version: "12.4"
77
minGameVersion: 120
88

src/revision/world/blocks/power/WindTurbine.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ open class WindTurbine(name: String) : PowerGenerator(name) {
6161
arrayOf(Point2(bot-1, bot-1), Point2(bot-1, top+1), Point2(top+1, top+1), Point2(top+1, bot-1))
6262
val base = edges.size
6363
val occupied = edges.count {
64-
Vars.world.tile(tile.x + it.x, tile.y + it.y).solid()
64+
Vars.world.tile(tile.x + it.x, tile.y + it.y)?.solid() ?: false
6565
}
6666
productionEfficiency = if (enabled) 1f - occupied.toFloat() / base else 0f
6767
}

0 commit comments

Comments
 (0)