Skip to content

Commit 37077cc

Browse files
authored
Introduce unit suffix for metric based setting parameter (#335)
1 parent 0cb284c commit 37077cc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+83
-70
lines changed

src/main/kotlin/com/lambda/client/commons/extension/Enum.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package com.lambda.client.commons.extension
33
import com.lambda.client.commons.interfaces.DisplayEnum
44
import com.lambda.client.util.text.capitalize
55

6-
fun <E : Enum<E>> E.next(): E = declaringClass.enumConstants.run {
6+
fun <E : Enum<E>> E.next(): E = declaringJavaClass.enumConstants.run {
77
get((ordinal + 1) % size)
88
}
99

src/main/kotlin/com/lambda/client/manager/managers/PlayerInventoryManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ object PlayerInventoryManager : Manager {
6060
fun isDone() = actionQueue.isEmpty()
6161

6262
/**
63-
* Adds a new task to the inventory manager
63+
* Adds a new task to the inventory manager respecting the module origin.
6464
*
6565
* @param clickInfo group of the click info in this task
6666
*

src/main/kotlin/com/lambda/client/module/modules/chat/AntiSpam.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ object AntiSpam : Module(
3636
/* Page Two */
3737
private val aggressiveFiltering by setting("Aggressive Filtering", true, { page == Page.SETTINGS })
3838
private val duplicates by setting("Duplicates", true, { page == Page.SETTINGS })
39-
private val duplicatesTimeout by setting("Duplicates Timeout", 30, 1..600, 5, { duplicates && page == Page.SETTINGS })
39+
private val duplicatesTimeout by setting("Duplicates Timeout", 30, 1..600, 5, { duplicates && page == Page.SETTINGS }, unit = "s")
4040
private val filterOwn by setting("Filter Own", false, { page == Page.SETTINGS })
4141
private val filterDMs by setting("Filter DMs", false, { page == Page.SETTINGS })
4242
private val filterServer by setting("Filter Server", false, { page == Page.SETTINGS })

src/main/kotlin/com/lambda/client/module/modules/chat/AutoQMain.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ object AutoQMain : Module(
1818
category = Category.CHAT,
1919
showOnArray = false
2020
) {
21-
private val delay by setting("Delay", 30, 1..120, 5)
21+
private val delay by setting("Delay", 30, 1..120, 5, unit = "s")
2222
private val twoBeeCheck by setting("2B Check", true)
2323
private val command by setting("Command", "/queue main")
2424

src/main/kotlin/com/lambda/client/module/modules/chat/Spammer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ object Spammer : Module(
2525
modulePriority = 100
2626
) {
2727
private val modeSetting by setting("Order", Mode.RANDOM_ORDER)
28-
private val delay by setting("Delay", 10, 1..600, 1, description = "Delay between messages, in seconds")
28+
private val delay by setting("Delay", 10, 1..600, 1, description = "Delay between messages", unit = "s")
2929
private val loadRemote by setting("Load From URL", false)
3030
private val remoteURL by setting("Remote URL", "Unchanged", { loadRemote })
3131

src/main/kotlin/com/lambda/client/module/modules/client/Baritone.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ object Baritone : Module(
3131
private val allowParkourPlace by setting("Allow Parkour Place", true)
3232
private val avoidPortals by setting("Avoid Portals", false)
3333
private val renderGoal by setting("Render Goals", true)
34-
private val failureTimeout by setting("Fail Timeout", 2, 1..20, 1)
34+
private val failureTimeout by setting("Fail Timeout", 2, 1..20, 1, unit = "s")
3535
private val blockReachDistance by setting("Reach Distance", 4.5f, 1.0f..10.0f, 0.5f)
3636

3737
init {

src/main/kotlin/com/lambda/client/module/modules/client/ChatSetting.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ object ChatSetting : Module(
1010
showOnArray = false,
1111
alwaysEnabled = true
1212
) {
13-
val delay by setting("Message Speed Limit", 0.5f, 0.1f..20.0f, 0.1f, description = "Delay between each message in seconds")
13+
val delay by setting("Message Speed Limit", 0.5f, 0.1f..20.0f, 0.1f, description = "Delay between each message", unit = "s")
1414
val maxMessageQueueSize by setting("Max Message Queue Size", 50, 10..200, 5)
1515
}

src/main/kotlin/com/lambda/client/module/modules/client/ClickGUI.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ object ClickGUI : Module(
1919
alwaysListening = true
2020
) {
2121
private val scaleSetting = setting("Scale", 100, 50..400, 5)
22-
val radius by setting("Corner Radius", 2.0, 0.0..10.0, 0.2)
22+
val radius by setting("Corner Radius", 2.0, 0.0..10.0, 0.2, unit = "px")
2323
val blur by setting("Blur", 0.0f, 0.0f..1.0f, 0.05f)
2424
val windowOutline by setting("Window Outline", false)
2525
val buttonOutline by setting("Button Outline", false)
2626
val outlineWidth by setting("Outline Width", 2.5f, 0.5f..3.5f, 0.5f, { windowOutline || buttonOutline })
27-
val entryMargin by setting("Margin", 0.0f, 0.0f..10.0f, 0.5f)
27+
val entryMargin by setting("Margin", 0.0f, 0.0f..10.0f, 0.5f, unit = "px")
2828
val darkness by setting("Darkness", 0.25f, 0.0f..1.0f, 0.05f)
29-
val fadeInTime by setting("Fade In Time", 0.25f, 0.0f..1.0f, 0.05f)
30-
val fadeOutTime by setting("Fade Out Time", 0.1f, 0.0f..1.0f, 0.05f)
29+
val fadeInTime by setting("Fade In Time", 0.25f, 0.0f..1.0f, 0.05f, unit = "s")
30+
val fadeOutTime by setting("Fade Out Time", 0.1f, 0.0f..1.0f, 0.05f, unit = "s")
3131
val showModifiedInBold by setting("Show Modified In Bold", false, description = "Display modified settings in a bold font")
3232
private val resetComponents = setting("Reset Positions", false)
3333
private val resetScale = setting("Reset Scale", false)

src/main/kotlin/com/lambda/client/module/modules/client/Configurations.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ internal object Configurations : AbstractModule(
4141

4242
private val autoSaving by setting("Auto Saving", true)
4343
private val savingFeedBack by setting("Log autosaves in chat", false, { autoSaving })
44-
private val savingInterval by setting("Interval", 10, 1..30, 1, { autoSaving }, description = "Frequency of auto saving in minutes")
44+
private val savingInterval by setting("Interval", 10, 1..30, 1, { autoSaving }, description = "Frequency of auto saving", unit = "m")
4545
val serverPreset by setting("Server Preset", false)
4646
private val guiPresetSetting = setting("Gui Preset", defaultPreset)
4747
private val modulePresetSetting = setting("Module Preset", defaultPreset)

src/main/kotlin/com/lambda/client/module/modules/combat/AutoArmor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ object AutoArmor : Module(
2323
category = Category.COMBAT,
2424
modulePriority = 500
2525
) {
26-
private val delay by setting("Delay", 5, 1..10, 1)
26+
private val delay by setting("Delay", 5, 1..10, 1, unit = " ticks")
2727

2828
private val timer = TickTimer(TimeUnit.TICKS)
2929
private var lastTask = TaskState(true)

0 commit comments

Comments
 (0)