Skip to content

Commit ea464e2

Browse files
simplify code on simon says rework
1 parent 18bc89b commit ea464e2

File tree

1 file changed

+4
-7
lines changed
  • src/main/kotlin/gg/skytils/skytilsmod/features/impl/dungeons/solvers/terminals

1 file changed

+4
-7
lines changed

src/main/kotlin/gg/skytils/skytilsmod/features/impl/dungeons/solvers/terminals/SimonSaysSolver.kt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,25 +90,22 @@ object SimonSaysSolver {
9090
if (Skytils.config.simonSaysSolver && clickNeeded < clickInOrder.size) {
9191
val matrixStack = UMatrixStack()
9292

93-
clickInOrder.forEachIndexed { index, pos ->
94-
95-
var alpha = 0.5f
93+
for (i in clickNeeded until clickInOrder.size) {
94+
val pos = clickInOrder[i]
9695
val x = pos.x - viewerX
9796
val y = pos.y - viewerY + .372
9897
val z = pos.z - viewerZ + .308
99-
val color = when (index) {
98+
val color = when (i) {
10099
clickNeeded -> Color.GREEN
101100
clickNeeded + 1 -> Color.YELLOW
102101
else -> Color.RED
103102
}
104103

105-
if (index < clickNeeded) alpha = 0f
106-
107104
RenderUtil.drawFilledBoundingBox(
108105
matrixStack,
109106
AxisAlignedBB(x, y, z, x - .13, y + .26, z + .382),
110107
color,
111-
alpha * Funny.alphaMult
108+
0.5f * Funny.alphaMult
112109
)
113110
}
114111
GlStateManager.enableCull()

0 commit comments

Comments
 (0)