Skip to content

Commit e20cc60

Browse files
authored
Merge pull request #2 from Frostzie/PowderHUD-Feature
Added Powder and Whisper features for detecting powder till next perk level. Added basic powder events from tablist.
2 parents 81ebec5 + 97a2bb8 commit e20cc60

File tree

8 files changed

+1132
-0
lines changed

8 files changed

+1132
-0
lines changed

src/main/kotlin/io/github/frostzie/skyfall/config/Features.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ import io.github.frostzie.skyfall.api.feature.FeatureManager
66
import io.github.frostzie.skyfall.config.features.chat.ChatConfig
77
import io.github.frostzie.skyfall.config.features.dev.DevConfig
88
import io.github.frostzie.skyfall.config.features.dungeon.DungeonConfig
9+
import io.github.frostzie.skyfall.config.features.foraging.ForagingConfig
910
import io.github.frostzie.skyfall.config.features.garden.GardenConfig
1011
import io.github.frostzie.skyfall.config.features.gui.GuiConfig
1112
import io.github.frostzie.skyfall.config.features.inventory.InventoryConfig
13+
import io.github.frostzie.skyfall.config.features.mining.MiningConfig
1214
import io.github.frostzie.skyfall.config.features.misc.MiscConfig
1315
import io.github.notenoughupdates.moulconfig.Config
1416
import io.github.notenoughupdates.moulconfig.Social
@@ -50,10 +52,18 @@ class Features : Config() {
5052
@Category(name = "Dungeon", desc = "Dungeon related features")
5153
var dungeon: DungeonConfig = DungeonConfig()
5254

55+
@Expose
56+
@Category(name = "Foraging", desc = "Foraging related features")
57+
var foraging: ForagingConfig = ForagingConfig()
58+
5359
@Expose
5460
@Category(name = "Garden", desc = "Garden related features")
5561
var garden: GardenConfig = GardenConfig()
5662

63+
@Expose
64+
@Category(name = "Mining", desc = "Mining related features")
65+
var mining: MiningConfig = MiningConfig()
66+
5767
@Expose
5868
@Category(name = "Inventory", desc = "Inventory related features")
5969
var inventory: InventoryConfig = InventoryConfig()
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package io.github.frostzie.skyfall.config.features.foraging
2+
3+
import com.google.gson.annotations.Expose
4+
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean
5+
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorInfoText
6+
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption
7+
8+
class ForagingConfig {
9+
10+
@Expose
11+
@ConfigOption(name = "", desc = "")
12+
@ConfigEditorInfoText(infoTitle = "§fMiddle Click the perk to add it to the HUD!")
13+
var infoText: String = ""
14+
15+
@Expose
16+
@ConfigOption(name = "Whisper HUD", desc = "Shows amount of whispers needed to level up a HOTF perk.\n§eMake sure whisper widget is enabled in tab!")
17+
@ConfigEditorBoolean
18+
var neededWhisperHud: Boolean = true
19+
20+
@Expose
21+
@ConfigOption(name = "One Perk at a Time", desc = "Shows the whispers you need for 1 perk at a time.\nThis doesn't mean only 1 perk can be Selected!")
22+
@ConfigEditorBoolean
23+
var onePerkAtATime: Boolean = true
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package io.github.frostzie.skyfall.config.features.mining
2+
3+
import com.google.gson.annotations.Expose
4+
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean
5+
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorInfoText
6+
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption
7+
8+
class MiningConfig {
9+
10+
@Expose
11+
@ConfigOption(name = "", desc = "")
12+
@ConfigEditorInfoText(infoTitle = "§fMiddle Click the perk to add it to the HUD!")
13+
var infoText: String = ""
14+
15+
@Expose
16+
@ConfigOption(name = "Whisper HUD", desc = "Shows amount of power needed to level up a HOTM perk.")
17+
@ConfigEditorBoolean
18+
var neededPowderHud: Boolean = true
19+
20+
@Expose
21+
@ConfigOption(name = "One Perk at a Time", desc = "Shows the powder you need for 1 perk at a time.\nThis doesn't mean only 1 perk can be Selected!")
22+
@ConfigEditorBoolean
23+
var onePerkAtATime: Boolean = true
24+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package io.github.frostzie.skyfall.events.mining
2+
3+
import io.github.frostzie.skyfall.events.core.Event
4+
5+
/**
6+
* Data class to hold all powder amounts.
7+
*/
8+
data class PowderAmounts(
9+
val mithril: String?,
10+
val gemstone: String?,
11+
val glacite: String?
12+
)
13+
14+
/**
15+
* Event fired when any powder amount changes.
16+
*/
17+
data class PowderChangeEvent(
18+
val powderAmounts: PowderAmounts
19+
) : Event()
20+
21+
/**
22+
* Event fired when whisper amount changes.
23+
*/
24+
data class WhisperChangeEvent(
25+
val oldAmount: String?,
26+
val newAmount: String?
27+
) : Event()

0 commit comments

Comments
 (0)