Skip to content

Commit ad54aff

Browse files
committed
use module command names for commands and spaces for separate words in module names
1 parent 7903f33 commit ad54aff

Some content is hidden

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

45 files changed

+63
-57
lines changed

common/src/main/kotlin/com/lambda/command/commands/ModuleCommand.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ object ModuleCommand : LambdaCommand(
7676
required(string("module name")) { moduleName ->
7777
suggests { _, builder ->
7878
ModuleRegistry.modules.map {
79-
it.name
79+
it.commandName
8080
}.forEach {
8181
builder.suggest(it)
8282
}
@@ -86,7 +86,7 @@ object ModuleCommand : LambdaCommand(
8686
executeWithResult {
8787
val name = moduleName().value()
8888
val module = ModuleRegistry.modules.find {
89-
it.name.equals(name, true)
89+
it.commandName.equals(name, true)
9090
} ?: return@executeWithResult failure(buildText {
9191
styled(Color.RED) {
9292
literal("Module ")
@@ -97,7 +97,7 @@ object ModuleCommand : LambdaCommand(
9797
}
9898
val similarModules = StringUtils.findSimilarStrings(
9999
name,
100-
ModuleRegistry.moduleNames,
100+
ModuleRegistry.moduleCommandNames,
101101
3
102102
)
103103
if (similarModules.isEmpty()) return@buildText

common/src/main/kotlin/com/lambda/module/ModuleRegistry.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ object ModuleRegistry : Loadable {
3030
val moduleNames: Set<String>
3131
get() = modules.map { it.name }.toSet()
3232

33+
val moduleCommandNames: Set<String>
34+
get() = modules.map { it.commandName }.toSet()
35+
3336
override fun load(): String {
3437
return "Loaded ${modules.size} modules with ${modules.sumOf { it.settings.size }} settings"
3538
}

common/src/main/kotlin/com/lambda/module/modules/client/ClickGui.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import java.awt.Color
4040
import kotlin.math.hypot
4141

4242
object ClickGui : Module(
43-
name = "ClickGui",
43+
name = "Click Gui",
4444
description = "sexy again",
4545
defaultTags = setOf(ModuleTag.CLIENT),
4646
defaultKeybind = KeyCode.Y

common/src/main/kotlin/com/lambda/module/modules/client/GuiSettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import com.lambda.module.tag.ModuleTag
2929
import java.awt.Color
3030

3131
object GuiSettings : Module(
32-
name = "GuiSettings",
32+
name = "Gui Settings",
3333
description = "Visual behaviour configuration",
3434
defaultTags = setOf(ModuleTag.CLIENT)
3535
) {

common/src/main/kotlin/com/lambda/module/modules/client/LambdaMoji.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import java.awt.Color
3232

3333
// This is the worst code I have ever wrote in my life
3434
object LambdaMoji : Module(
35-
name = "LambdaMoji",
35+
name = "Lambda-Moji",
3636
description = "",
3737
defaultTags = setOf(ModuleTag.CLIENT, ModuleTag.RENDER),
3838
enabledByDefault = true,

common/src/main/kotlin/com/lambda/module/modules/client/RenderSettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import com.lambda.module.tag.ModuleTag
2424
import java.awt.Color
2525

2626
object RenderSettings : Module(
27-
name = "RenderSettings",
27+
name = "Render Settings",
2828
description = "Renderer configuration",
2929
defaultTags = setOf(ModuleTag.CLIENT)
3030
) {

common/src/main/kotlin/com/lambda/module/modules/client/TaskFlowModule.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import com.lambda.module.tag.ModuleTag
2626
import com.lambda.util.world.raycast.InteractionMask
2727

2828
object TaskFlowModule : Module(
29-
name = "TaskFlow",
29+
name = "Task Flow",
3030
description = "Settings for task automation",
3131
defaultTags = setOf(ModuleTag.CLIENT, ModuleTag.AUTOMATION)
3232
) {

common/src/main/kotlin/com/lambda/module/modules/combat/AutoDisconnect.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import net.minecraft.text.Text
4444
import java.awt.Color
4545

4646
object AutoDisconnect : Module(
47-
name = "AutoDisconnect",
47+
name = "Auto Disconnect",
4848
description = "Automatically disconnects when in danger or on low health",
4949
defaultTags = setOf(ModuleTag.COMBAT)
5050
) {

common/src/main/kotlin/com/lambda/module/modules/combat/AutoTotem.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import net.minecraft.entity.player.PlayerEntity
3838
import net.minecraft.item.Items
3939

4040
object AutoTotem : Module(
41-
name = "AutoTotem",
41+
name = "Auto Totem",
4242
description = "Swaps the your off-hand item to a totem",
4343
defaultTags = setOf(ModuleTag.COMBAT, ModuleTag.PLAYER),
4444
) {

common/src/main/kotlin/com/lambda/module/modules/combat/CrystalAura.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ import kotlin.math.max
6262
import kotlin.time.Duration.Companion.milliseconds
6363

6464
object CrystalAura : Module(
65-
name = "CrystalAura",
65+
name = "Crystal Aura",
6666
description = "Automatically attacks entities with crystals",
6767
defaultTags = setOf(ModuleTag.COMBAT),
6868
) {

0 commit comments

Comments
 (0)