Skip to content

Commit

Permalink
Rename AutoLog module to AutoDisconnect
Browse files Browse the repository at this point in the history
In most clients this module is called AutoDisconnect so as to avoid
confusion I think renaming it would be very good :)
  • Loading branch information
KazutoXD authored and KazutoXD committed Jan 6, 2023
1 parent c819baa commit a0fab9a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.lambda.client.gui.mc

import com.lambda.client.module.modules.combat.AutoLog
import com.lambda.client.module.modules.combat.AutoDisconnect
import com.lambda.client.util.threads.mainScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
Expand All @@ -15,22 +15,22 @@ class LambdaGuiDisconnected(private val reason: Array<String>, private val scree

buttonList.add(GuiButton(0, width / 2 - 100, 200, "Okay"))
if (!disable) {
buttonList.add(GuiButton(1, width / 2 - 100, 220, "Disable AutoLog"))
buttonList.add(GuiButton(1, width / 2 - 100, 220, "Disable AutoDisconnect"))
} else {
disable()
}
}

override fun drawScreen(mouseX: Int, mouseY: Int, partialTicks: Float) {
drawBackground(0)
drawCenteredString(fontRenderer, "[AutoLog] Logged because:", width / 2, 80, 0x9B90FF)
drawCenteredString(fontRenderer, "[AutoDisconnect] Logged because:", width / 2, 80, 0x9B90FF)
for ((index, reason) in reason.withIndex()) {
drawCenteredString(fontRenderer, reason, width / 2, 94 + (14 * index), 0xFFFFFF)
}

drawCenteredString(fontRenderer, "Logged out at: $logoutTime", width / 2, 140, 0xFFFFFFF)

if (!disable) drawCenteredString(fontRenderer, "Disabled AutoLog", width / 2, 224, 0xDE413C)
if (!disable) drawCenteredString(fontRenderer, "Disabled AutoDisconnect", width / 2, 224, 0xDE413C)
super.drawScreen(mouseX, mouseY, partialTicks)
}

Expand All @@ -47,7 +47,7 @@ class LambdaGuiDisconnected(private val reason: Array<String>, private val scree
private fun disable() {
mainScope.launch {
delay(250L)
AutoLog.disable()
AutoDisconnect.disable()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import com.lambda.client.manager.managers.CombatManager
import com.lambda.client.manager.managers.FriendManager
import com.lambda.client.module.Category
import com.lambda.client.module.Module
import com.lambda.client.module.modules.combat.AutoLog.Reasons.*
import com.lambda.client.module.modules.combat.AutoDisconnect.Reasons.*
import com.lambda.client.util.EntityUtils.isFakeOrSelf
import com.lambda.client.util.combat.CombatUtils.scaledHealth
import com.lambda.client.util.items.allSlots
Expand All @@ -25,9 +25,9 @@ import net.minecraft.util.text.TextComponentString
import net.minecraftforge.fml.common.gameevent.TickEvent
import java.time.LocalTime

object AutoLog : Module(
name = "AutoLog",
description = "Automatically log when in danger or on low health",
object AutoDisconnect : Module(
name = "AutoDisconnect",
description = "Automatically disconnects when in danger or on low health",
category = Category.COMBAT,
alwaysListening = true
) {
Expand Down

0 comments on commit a0fab9a

Please sign in to comment.