Skip to content

Commit 7cc7212

Browse files
committed
config
1 parent a59be17 commit 7cc7212

File tree

10 files changed

+164
-17
lines changed

10 files changed

+164
-17
lines changed

src/main/kotlin/cc/pe3epwithyou/trident/config/Config.kt

Lines changed: 141 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,30 @@ class Config {
3232
@SerialEntry
3333
var raritySlotDisplayType: DisplayType = DisplayType.OUTLINE
3434

35+
@SerialEntry
36+
var fishingUpgradesModule: Boolean = true
37+
38+
@SerialEntry
39+
var fishingSpotModule: Boolean = true
40+
3541
@SerialEntry
3642
var fishingSuppliesModule: Boolean = true
3743

44+
@SerialEntry
45+
var fishingHookChancesModule: Boolean = true
46+
47+
@SerialEntry
48+
var fishingMagnetChancesModule: Boolean = true
49+
50+
@SerialEntry
51+
var fishingRodChancesModule: Boolean = true
52+
53+
@SerialEntry
54+
var fishingPotChancesModule: Boolean = true
55+
56+
@SerialEntry
57+
var fishingChancePerksModule: Boolean = true
58+
3859
@SerialEntry
3960
var fishingWayfinderModule: Boolean = true
4061

@@ -127,6 +148,20 @@ class Config {
127148
object Fishing {
128149
val suppliesModule: Boolean
129150
get() = handler.instance().fishingSuppliesModule
151+
val upgradesModule: Boolean
152+
get() = handler.instance().fishingUpgradesModule
153+
val spotModule: Boolean
154+
get() = handler.instance().fishingSpotModule
155+
val hookChancesModule: Boolean
156+
get() = handler.instance().fishingHookChancesModule
157+
val magnetChancesModule: Boolean
158+
get() = handler.instance().fishingMagnetChancesModule
159+
val rodChancesModule: Boolean
160+
get() = handler.instance().fishingRodChancesModule
161+
val potChancesModule: Boolean
162+
get() = handler.instance().fishingPotChancesModule
163+
val chancePerksModule: Boolean
164+
get() = handler.instance().fishingChancePerksModule
130165
val wayfinderModule: Boolean
131166
get() = handler.instance().fishingWayfinderModule
132167
val flashIfDepleted: Boolean
@@ -430,21 +465,118 @@ class Config {
430465
controller(tickBox())
431466
}
432467

468+
options.register<Boolean>("upgrades_module") {
469+
name(Component.translatable("config.trident.fishing.upgrades_module.name"))
470+
description(
471+
OptionDescription.createBuilder()
472+
.text(Component.translatable("config.trident.fishing.upgrades_module.description"))
473+
.image(
474+
ResourceLocation.fromNamespaceAndPath("trident", "textures/config/upgrades_module.png"),
475+
598,
476+
234
477+
).build()
478+
)
479+
binding(handler.instance()::fishingUpgradesModule, true)
480+
controller(tickBox())
481+
}
482+
483+
options.register<Boolean>("spot_module") {
484+
name(Component.translatable("config.trident.fishing.spot_module.name"))
485+
description(
486+
OptionDescription.createBuilder()
487+
.text(Component.translatable("config.trident.fishing.spot_module.description"))
488+
.image(
489+
ResourceLocation.fromNamespaceAndPath("trident", "textures/config/spot_module.png"),
490+
367,
491+
225
492+
).build()
493+
)
494+
binding(handler.instance()::fishingSpotModule, true)
495+
controller(tickBox())
496+
}
497+
498+
options.register<Boolean>("hook_chances_module") {
499+
name(Component.translatable("config.trident.fishing.hook_chances_module.name"))
500+
description(
501+
OptionDescription.createBuilder()
502+
.text(Component.translatable("config.trident.fishing.hook_chances_module.description"))
503+
.image(
504+
ResourceLocation.fromNamespaceAndPath("trident", "textures/config/hook_module.png"),
505+
440,
506+
287
507+
).build()
508+
)
509+
binding(handler.instance()::fishingHookChancesModule, true)
510+
controller(tickBox())
511+
}
512+
513+
options.register<Boolean>("magnet_chances_module") {
514+
name(Component.translatable("config.trident.fishing.magnet_chances_module.name"))
515+
description(
516+
OptionDescription.createBuilder()
517+
.text(Component.translatable("config.trident.fishing.magnet_chances_module.description"))
518+
.image(
519+
ResourceLocation.fromNamespaceAndPath("trident", "textures/config/magnet_module.png"),
520+
485,
521+
292
522+
).build()
523+
)
524+
binding(handler.instance()::fishingMagnetChancesModule, true)
525+
controller(tickBox())
526+
}
527+
528+
options.register<Boolean>("rod_chances_module") {
529+
name(Component.translatable("config.trident.fishing.rod_chances_module.name"))
530+
description(
531+
OptionDescription.createBuilder()
532+
.text(Component.translatable("config.trident.fishing.rod_chances_module.description"))
533+
.image(
534+
ResourceLocation.fromNamespaceAndPath("trident", "textures/config/rod_module.png"),
535+
323,
536+
268
537+
).build()
538+
)
539+
binding(handler.instance()::fishingRodChancesModule, true)
540+
controller(tickBox())
541+
}
542+
543+
/*options.register<Boolean>("pot_chances_module") {
544+
name(Component.translatable("config.trident.fishing.pot_chances_module.name"))
545+
description(OptionDescription.of(Component.translatable("config.trident.fishing.pot_chances_module.description")))
546+
binding(handler.instance()::fishingPotChancesModule, true)
547+
controller(tickBox())
548+
}*/
549+
550+
options.register<Boolean>("chance_perks_module") {
551+
name(Component.translatable("config.trident.fishing.chance_perks_module.name"))
552+
description(
553+
OptionDescription.createBuilder()
554+
.text(Component.translatable("config.trident.fishing.chance_perks_module.description"))
555+
.image(
556+
ResourceLocation.fromNamespaceAndPath("trident", "textures/config/chance_module.png"),
557+
507,
558+
333
559+
).build()
560+
)
561+
binding(handler.instance()::fishingChancePerksModule, true)
562+
controller(tickBox())
563+
}
564+
433565
options.register<Boolean>("flash_if_depleted") {
434566
name(Component.translatable("config.trident.fishing.flash_if_depleted.name"))
435567
description(OptionDescription.of(Component.translatable("config.trident.fishing.flash_if_depleted.description")))
436568
binding(handler.instance()::fishingFlashIfDepleted, true)
437569
controller(tickBox())
438570
}
439-
// options.register<Boolean>("wayfinder_module") {
440-
// name(Component.translatable("config.trident.fishing.wayfinder_module.name"))
441-
// description(OptionDescription.createBuilder()
442-
// .text(Component.translatable("config.trident.fishing.wayfinder_module.description"))
443-
// .build()
444-
// )
445-
// binding(handler.instance()::fishingWayfinderModule, true)
446-
// controller(tickBox())
447-
// }
571+
/*options.register<Boolean>("wayfinder_module") {
572+
name(Component.translatable("config.trident.fishing.wayfinder_module.name"))
573+
description(OptionDescription.createBuilder()
574+
.text(Component.translatable("config.trident.fishing.wayfinder_module.description"))
575+
.build()
576+
)
577+
binding(handler.instance()::fishingWayfinderModule, true)
578+
controller(tickBox())
579+
}*/
448580
}
449581
}
450582

src/main/kotlin/cc/pe3epwithyou/trident/utils/NoxesiumUtils.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,31 +54,31 @@ object NoxesiumUtils {
5454
val k = "supplies"
5555
DialogCollection.open(k, SuppliesDialog(10, 10, k))
5656
}
57-
if (currentGame == Game.FISHING) {
57+
if (currentGame == Game.FISHING && Config.Fishing.spotModule) {
5858
val k = "spot"
5959
DialogCollection.open(k, SpotDialog(10, 10, k))
6060
}
61-
if (currentGame == Game.FISHING) {
61+
if (currentGame == Game.FISHING && Config.Fishing.upgradesModule) {
6262
val k = "upgrades"
6363
DialogCollection.open(k, UpgradesDialog(10, 20, k))
6464
}
65-
if (currentGame == Game.FISHING) {
65+
if (currentGame == Game.FISHING && Config.Fishing.hookChancesModule) {
6666
val k = "hookchances"
6767
DialogCollection.open(k, HookChanceDialog(10, 30, k))
6868
}
69-
if (currentGame == Game.FISHING) {
69+
if (currentGame == Game.FISHING && Config.Fishing.magnetChancesModule) {
7070
val k = "magnetchances"
7171
DialogCollection.open(k, MagnetChanceDialog(10, 30, k))
7272
}
73-
if (currentGame == Game.FISHING) {
73+
if (currentGame == Game.FISHING && Config.Fishing.rodChancesModule) {
7474
val k = "rodchances"
7575
DialogCollection.open(k, RodChanceDialog(10, 30, k))
7676
}
77-
if (currentGame == Game.FISHING) {
77+
if (currentGame == Game.FISHING && Config.Fishing.potChancesModule) {
7878
val k = "potchances"
7979
DialogCollection.open(k, PotChanceDialog(10, 30, k))
8080
}
81-
if (currentGame == Game.FISHING) {
81+
if (currentGame == Game.FISHING && Config.Fishing.chancePerksModule) {
8282
val k = "chanceperks"
8383
DialogCollection.open(k, ChancePerksDialog(10, 30, k))
8484
}

src/main/resources/assets/trident/lang/en_us.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,22 @@
2525
"config.trident.fishing.name": "Fishing Modules",
2626
"config.trident.fishing.description": "Modules that apply to the Fishing game",
2727
"config.trident.fishing.supplies_module.name": "Supplies Module",
28-
"config.trident.fishing.supplies_module.description": "Shows a window that displays your current Bait, Line durability, your equipped Augments and your active Overclocks.",
28+
"config.trident.fishing.supplies_module.description": "Shows a window that displays your current Bait, Line durability, your equipped Augments (with durability), and your active Overclocks.",
29+
"config.trident.fishing.upgrades_module.name": "Upgrades Module",
30+
"config.trident.fishing.upgrades_module.description": "Shows your current upgrade totals with sources (Augments, Overclocks, Equipment, Pylons).",
31+
"config.trident.fishing.spot_module.name": "Spot Module",
32+
"config.trident.fishing.spot_module.description": "Shows active spot effects: Hook and Magnet bonuses, Chance bonuses, and Wayfinder Data.",
33+
34+
"config.trident.fishing.hook_chances_module.name": "Hook Chances Module",
35+
"config.trident.fishing.hook_chances_module.description": "Displays hook multipliers and resulting odds per type (Base vs Real).",
36+
"config.trident.fishing.magnet_chances_module.name": "Magnet Chances Module",
37+
"config.trident.fishing.magnet_chances_module.description": "Displays magnet chance per catch by type, showing guaranteed count and extra percent.",
38+
"config.trident.fishing.rod_chances_module.name": "Rod Chances Module",
39+
"config.trident.fishing.rod_chances_module.description": "Displays rod trigger chances per type.",
40+
"config.trident.fishing.pot_chances_module.name": "Pot Chances Module",
41+
"config.trident.fishing.pot_chances_module.description": "Displays pot bonus chances. (Coming soon)",
42+
"config.trident.fishing.chance_perks_module.name": "Chance Perks Module",
43+
"config.trident.fishing.chance_perks_module.description": "Displays Elusive, Wayfinder Data, Pearl, Treasure and Spirit chances with breakdowns.",
2944
"config.trident.fishing.flash_if_depleted.name": "Flash if Depleted",
3045
"config.trident.fishing.flash_if_depleted.description": "Makes Minecraft's taskbar/dock icon flash when your current spot depletes.",
3146
"config.trident.fishing.wayfinder_module.name": "Wayfinder Module",
79.5 KB
Loading
7.52 KB
Loading
10.3 KB
Loading
8.07 KB
Loading
5.37 KB
Loading
-37.9 KB
Loading
11.9 KB
Loading

0 commit comments

Comments
 (0)