-
-
Notifications
You must be signed in to change notification settings - Fork 307
Feature: Mining Profit Tracker #5260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: beta
Are you sure you want to change the base?
Changes from all commits
7d774f1
8dbe3c1
c1e8027
b83a30b
9e77157
5875d8a
c6d5712
d0bcde1
6871249
d909092
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| package at.hannibal2.skyhanni.config.features.mining | ||
|
|
||
| import at.hannibal2.skyhanni.config.FeatureToggle | ||
| import at.hannibal2.skyhanni.config.core.config.Position | ||
| import com.google.gson.annotations.Expose | ||
| import at.hannibal2.skyhanni.config.features.misc.tracker.IndividualItemTrackerConfig | ||
| import io.github.notenoughupdates.moulconfig.annotations.Accordion | ||
| import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean | ||
| import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDropdown | ||
| import io.github.notenoughupdates.moulconfig.annotations.ConfigLink | ||
| import io.github.notenoughupdates.moulconfig.annotations.ConfigOption | ||
|
|
||
| class MiningProfitTrackerConfig { | ||
| @Expose | ||
| @ConfigOption(name = "Enabled", desc = "Enable the mining profit tracker. Use §e/shresetminingtracker §7to manually reset it.") | ||
| @ConfigEditorBoolean | ||
| @FeatureToggle | ||
| var enabled: Boolean = false | ||
|
|
||
| @Expose | ||
| @ConfigOption( | ||
| name = "Gemstone Calculation Type", | ||
| desc = "Use a different tier gemstone price in case of highly manipulated bazaar prices." | ||
| ) | ||
| @ConfigEditorDropdown | ||
| var gemstoneType: GemstoneType = GemstoneType.FLAWLESS | ||
|
|
||
| enum class GemstoneType(val displayName: String) { | ||
| ROUGH("Rough"), | ||
| FLAWED("Flawed"), | ||
| FINE("Fine"), | ||
| FLAWLESS("Flawless"), | ||
| DEFAULT("Default") | ||
| ; | ||
|
|
||
| override fun toString() = displayName | ||
| } | ||
|
|
||
| @Expose | ||
| @ConfigOption( | ||
| name = "Tracker Time settings", | ||
| desc = "Choose how the tracker behaves when you stop mining.\n" + | ||
| "§ePause: Pauses the timer after timeout.\n" + | ||
| "§eReset: Resets the data after timeout.\n" + | ||
| "§eAlways On: Timer keeps running even if you stop mining." | ||
| ) | ||
| @Accordion | ||
| val perTrackerConfig: IndividualItemTrackerConfig = IndividualItemTrackerConfig() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are the default config options for the tracker, not what the name/description says. You can control timeout in the way that you have described, but that is by setting customItemTracker to true on tracker initialization and then writing a custom control class for the tracker. |
||
|
|
||
| @Expose | ||
| @ConfigLink(owner = MiningProfitTrackerConfig::class, field = "enabled") | ||
| val position: Position = Position(100, 50) | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,6 +55,7 @@ import at.hannibal2.skyhanni.features.mining.fossilexcavator.ExcavatorProfitTrac | |
| import at.hannibal2.skyhanni.features.mining.glacitemineshaft.CorpseTracker | ||
| import at.hannibal2.skyhanni.features.mining.glacitemineshaft.MineshaftDetection | ||
| import at.hannibal2.skyhanni.features.mining.powdertracker.PowderTracker | ||
| import at.hannibal2.skyhanni.features.mining.tracker.MiningTracker | ||
| import at.hannibal2.skyhanni.features.misc.DraconicSacrificeTracker | ||
| import at.hannibal2.skyhanni.features.misc.EnchantedClockHelper | ||
| import at.hannibal2.skyhanni.features.misc.trevor.TrevorTracker.TrapperMobRarity | ||
|
|
@@ -805,6 +806,10 @@ class ProfileSpecificStorage( | |
|
|
||
| @Expose | ||
| var flowstatePersonalBest = 0 | ||
|
|
||
| @Expose | ||
| var miningTracker: at.hannibal2.skyhanni.features.mining.tracker.MiningTracker.Data = | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove redundant import here |
||
| MiningTracker.Data() | ||
| } | ||
|
|
||
| @Expose | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,11 @@ | ||
| package at.hannibal2.skyhanni.data.jsonobjects.repo | ||
|
|
||
| import at.hannibal2.skyhanni.utils.NeuInternalName | ||
| import com.google.gson.annotations.Expose | ||
| import com.google.gson.annotations.SerializedName | ||
|
|
||
| data class MiningJson( | ||
| @Expose @SerializedName("block_strengths") val blockStrengths: Map<String, Int>, | ||
|
|
||
| @Expose @SerializedName("allowed_blocks") val categories: Map<String, List<NeuInternalName>> | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a category can not be a feature toggle