Skip to content
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

Feature: Ghost Profit Tracker #1753

Merged
merged 43 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7c3390c
start
ItsEmpa May 9, 2024
5ee365f
add support for roman levels in tablist
ItsEmpa May 10, 2024
19fbda9
more fixes
ItsEmpa May 10, 2024
a7051c7
Merge branch 'refs/heads/beta' into ghost-counter-rework
ItsEmpa May 31, 2024
52526b2
fix merge
ItsEmpa May 31, 2024
081b546
use skill exp event
ItsEmpa May 31, 2024
dcc50d0
Merge branch 'refs/heads/beta' into fork/ItsEmpa/ghost-counter-rework
CalMWolfs Jun 5, 2024
029ea4c
fix merge
CalMWolfs Jun 5, 2024
b6a6030
Merge branch 'refs/heads/beta' into ghost-counter-rework
ItsEmpa Oct 2, 2024
ef1789c
update stuff, make it work again, remove ghost counter code and confi…
ItsEmpa Oct 2, 2024
a405a5f
remove hardcoded allowed drops
ItsEmpa Oct 2, 2024
07275a2
Merge branch 'beta' into ghost-counter-rework
ItsEmpa Oct 11, 2024
1453416
Merge branch 'beta' into ghost-counter-rework
ItsEmpa Oct 13, 2024
86b6b85
fix merge
ItsEmpa Oct 13, 2024
302969b
Merge branch 'refs/heads/beta' into fork/ItsEmpa/ghost-counter-rework
CalMWolfs Oct 14, 2024
c1f569e
Merge branch 'beta' into ghost-counter-rework
ItsEmpa Oct 19, 2024
36b5316
use graph area change event for ghost tracker
ItsEmpa Oct 19, 2024
7b5b54b
Merge branch 'refs/heads/beta' into fork/ItsEmpa/ghost-counter-rework
CalMWolfs Oct 22, 2024
fd5ed0a
serialize ghost drops name
ItsEmpa Oct 22, 2024
4cbcf1d
Merge remote-tracking branch 'origin/ghost-counter-rework' into ghost…
ItsEmpa Oct 22, 2024
bc9b712
i hate detekt grr
ItsEmpa Oct 22, 2024
f68502b
another fix detekt, awesome!
ItsEmpa Oct 22, 2024
04db16c
Rename .java to .kt
CalMWolfs Oct 22, 2024
abceeb0
update baseline, move command, convert repo file to kotlin
CalMWolfs Oct 22, 2024
a050ac6
bye bye neu import
CalMWolfs Oct 22, 2024
9985e96
should work :pray:
CalMWolfs Oct 22, 2024
d675489
make detekt happy and move over total magic find
CalMWolfs Oct 22, 2024
368a681
make migrateItem a local function
ItsEmpa Oct 22, 2024
498a7ef
finish migrating
CalMWolfs Oct 23, 2024
5f7c7f0
add regex tests and change ghost drops constant to set instead of list
ItsEmpa Oct 25, 2024
6ab3ed6
Merge remote-tracking branch 'origin/ghost-counter-rework' into ghost…
ItsEmpa Oct 25, 2024
b4e0401
Merge branch 'refs/heads/beta' into fork/ItsEmpa/ghost-counter-rework
CalMWolfs Nov 12, 2024
5bdb30d
Merge branch 'refs/heads/beta' into fork/ItsEmpa/ghost-counter-rework
CalMWolfs Nov 12, 2024
788c579
Merge branch 'beta' into ghost-counter-rework
CalMWolfs Nov 16, 2024
d32dd25
config version
CalMWolfs Nov 16, 2024
f7fed81
fix regex test
CalMWolfs Nov 16, 2024
da076fc
Merge branch 'refs/heads/beta' into fork/ItsEmpa/ghost-counter-rework
CalMWolfs Nov 19, 2024
ad6a013
Merge branch 'refs/heads/beta' into fork/ItsEmpa/ghost-counter-rework
hannibal002 Nov 24, 2024
8d7261b
code cleanup
hannibal002 Nov 24, 2024
a1ba805
add warnings when bestiary widget empty
ItsEmpa Nov 24, 2024
5fc3a60
Merge branch 'refs/heads/beta' into fork/ItsEmpa/ghost-counter-rework
hannibal002 Nov 24, 2024
2692d0b
make detekt happy
hannibal002 Nov 24, 2024
7c51994
fix formatting, typos and don't show both tab error messages at once,
hannibal002 Nov 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions detekt/baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<ID>CyclomaticComplexMethod:GardenBestCropTime.kt$GardenBestCropTime$fun drawBestDisplay(currentCrop: CropType?): List&lt;List&lt;Any&gt;&gt;</ID>
<ID>CyclomaticComplexMethod:GardenCropMilestoneDisplay.kt$GardenCropMilestoneDisplay$private fun drawProgressDisplay(crop: CropType): List&lt;Renderable&gt;</ID>
<ID>CyclomaticComplexMethod:GardenVisitorFeatures.kt$GardenVisitorFeatures$private fun readToolTip(visitor: VisitorAPI.Visitor, itemStack: ItemStack?, toolTip: MutableList&lt;String&gt;)</ID>
<ID>CyclomaticComplexMethod:GhostCounter.kt$GhostCounter$private fun drawDisplay()</ID>
<ID>CyclomaticComplexMethod:GraphEditor.kt$GraphEditor$private fun input()</ID>
<ID>CyclomaticComplexMethod:ItemDisplayOverlayFeatures.kt$ItemDisplayOverlayFeatures$private fun getStackTip(item: ItemStack): String?</ID>
<ID>CyclomaticComplexMethod:ItemNameResolver.kt$ItemNameResolver$internal fun getInternalNameOrNull(itemName: String): NEUInternalName?</ID>
Expand All @@ -36,7 +35,6 @@
<ID>InjectDispatcher:MayorAPI.kt$MayorAPI$IO</ID>
<ID>LongMethod:CopyNearbyEntitiesCommand.kt$CopyNearbyEntitiesCommand$fun command(args: Array&lt;String&gt;)</ID>
<ID>LongMethod:CropMoneyDisplay.kt$CropMoneyDisplay$private fun drawDisplay(): List&lt;List&lt;Any&gt;&gt;</ID>
<ID>LongMethod:GhostCounter.kt$GhostCounter$private fun drawDisplay()</ID>
<ID>LongMethod:GraphEditor.kt$GraphEditor$private fun input()</ID>
<ID>LongMethod:ItemDisplayOverlayFeatures.kt$ItemDisplayOverlayFeatures$private fun getStackTip(item: ItemStack): String?</ID>
<ID>LongMethod:MinecraftConsoleFilter.kt$MinecraftConsoleFilter$override fun filter(event: LogEvent?): Filter.Result</ID>
Expand Down Expand Up @@ -152,7 +150,6 @@
<ID>UnsafeCallOnNullableType:CollectionUtils.kt$CollectionUtils$this.merge(key, number, Float::plus)!!</ID>
<ID>UnsafeCallOnNullableType:CollectionUtils.kt$CollectionUtils$this.merge(key, number, Int::plus)!!</ID>
<ID>UnsafeCallOnNullableType:CollectionUtils.kt$CollectionUtils$this.merge(key, number, Long::plus)!!</ID>
<ID>UnsafeCallOnNullableType:CombatUtils.kt$CombatUtils$a!!</ID>
<ID>UnsafeCallOnNullableType:CompactBestiaryChatMessage.kt$CompactBestiaryChatMessage$it.groups[1]!!</ID>
<ID>UnsafeCallOnNullableType:ConfigManager.kt$ConfigManager$file!!</ID>
<ID>UnsafeCallOnNullableType:CorpseTracker.kt$CorpseTracker$applicableKeys.first().key!!</ID>
Expand Down Expand Up @@ -187,7 +184,6 @@
<ID>UnsafeCallOnNullableType:GardenCropMilestoneDisplay.kt$GardenCropMilestoneDisplay$cultivatingData[crop]!!</ID>
<ID>UnsafeCallOnNullableType:GardenCropMilestonesCommunityFix.kt$GardenCropMilestonesCommunityFix$map[crop]!!</ID>
<ID>UnsafeCallOnNullableType:GardenPlotIcon.kt$GardenPlotIcon$originalStack[index]!!</ID>
<ID>UnsafeCallOnNullableType:GhostCounter.kt$GhostCounter$storage?.totalMF!!</ID>
<ID>UnsafeCallOnNullableType:Graph.kt$Graph.Companion$position!!</ID>
<ID>UnsafeCallOnNullableType:Graph.kt$distances.distances[end]!!</ID>
<ID>UnsafeCallOnNullableType:GriffinBurrowHelper.kt$GriffinBurrowHelper$particleBurrows[targetLocation]!!</ID>
Expand Down Expand Up @@ -270,7 +266,6 @@
<ID>VarCouldBeVal:GardenPlotIcon.kt$GardenPlotIcon$private var originalStack = mutableMapOf&lt;Int, ItemStack&gt;()</ID>
<ID>VarCouldBeVal:GardenPlotMenuHighlighting.kt$GardenPlotMenuHighlighting$private var highlightedPlots = mutableMapOf&lt;GardenPlotAPI.Plot, PlotStatusType&gt;()</ID>
<ID>VarCouldBeVal:GardenVisitorColorNames.kt$GardenVisitorColorNames$private var visitorColors = mutableMapOf&lt;String, String&gt;() // name -&gt; color code</ID>
<ID>VarCouldBeVal:GhostData.kt$GhostData$private var session = mutableMapOf( Option.KILLS to 0.0, Option.SORROWCOUNT to 0.0, Option.VOLTACOUNT to 0.0, Option.PLASMACOUNT to 0.0, Option.GHOSTLYBOOTS to 0.0, Option.BAGOFCASH to 0.0, Option.TOTALDROPS to 0.0, Option.SCAVENGERCOINS to 0.0, Option.MAXKILLCOMBO to 0.0, Option.SKILLXPGAINED to 0.0 )</ID>
<ID>VarCouldBeVal:GraphEditor.kt$GraphEditor$var vector = LocationUtils.calculatePlayerFacingDirection()</ID>
<ID>VarCouldBeVal:HoppityCollectionStats.kt$HoppityCollectionStats$private var highlightMap = mutableMapOf&lt;String, LorenzColor&gt;()</ID>
<ID>VarCouldBeVal:HoppityEggLocations.kt$HoppityEggLocations$// TODO add gui/command to show total data/missing islands private var collectedEggStorage: MutableMap&lt;IslandType, MutableSet&lt;LorenzVec&gt;&gt; get() = ChocolateFactoryAPI.profileStorage?.collectedEggLocations ?: mutableMapOf() set(value) { ChocolateFactoryAPI.profileStorage?.collectedEggLocations = value }</ID>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import com.google.gson.JsonPrimitive
object ConfigUpdaterMigrator {

val logger = LorenzLogger("ConfigMigration")
const val CONFIG_VERSION = 63
const val CONFIG_VERSION = 64
fun JsonElement.at(chain: List<String>, init: Boolean): JsonElement? {
if (chain.isEmpty()) return this
if (this !is JsonObject) return null
Expand Down
11 changes: 0 additions & 11 deletions src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import at.hannibal2.skyhanni.features.bingo.card.nextstephelper.BingoNextStepHel
import at.hannibal2.skyhanni.features.chat.ColorFormattingHelper
import at.hannibal2.skyhanni.features.chat.translation.Translator
import at.hannibal2.skyhanni.features.combat.endernodetracker.EnderNodeTracker
import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostUtil
import at.hannibal2.skyhanni.features.commands.HelpCommand
import at.hannibal2.skyhanni.features.commands.PartyChatCommands
import at.hannibal2.skyhanni.features.commands.PartyCommands
Expand Down Expand Up @@ -169,11 +168,6 @@ object Commands {

@Suppress("LongMethod")
private fun usersNormal(event: CommandRegistrationEvent) {
event.register("shimportghostcounterdata") {
description = "Manually importing the ghost counter data from GhostCounterV3"
category = CommandCategory.USERS_ACTIVE
callback { GhostUtil.importCTGhostCounterData() }
}
event.register("shcroptime") {
description =
"Calculates with your current crop per second speed " + "how long you need to farm a crop to collect this amount of items"
Expand Down Expand Up @@ -400,11 +394,6 @@ object Commands {
}

// non trackers
event.register("shresetghostcounter") {
description = "Resets the ghost counter"
category = CommandCategory.USERS_RESET
callback { GhostUtil.reset() }
}
event.register("shresetcropspeed") {
description = "Resets garden crop speed data and best crop time data"
category = CommandCategory.USERS_RESET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import at.hannibal2.skyhanni.config.features.combat.broodmother.BroodmotherConfig;
import at.hannibal2.skyhanni.config.features.combat.damageindicator.DamageIndicatorConfig;
import at.hannibal2.skyhanni.config.features.combat.end.EndIslandConfig;
import at.hannibal2.skyhanni.config.features.combat.ghostcounter.GhostCounterConfig;
import at.hannibal2.skyhanni.config.features.combat.ghostcounter.GhostProfitTrackerConfig;
import com.google.gson.annotations.Expose;
import io.github.notenoughupdates.moulconfig.annotations.Accordion;
import io.github.notenoughupdates.moulconfig.annotations.Category;
Expand All @@ -19,7 +19,7 @@ public class CombatConfig {

@Expose
@Category(name = "Ghost Counter", desc = "Ghost Counter settings")
public GhostCounterConfig ghostCounter = new GhostCounterConfig();
public GhostProfitTrackerConfig ghostCounter = new GhostProfitTrackerConfig();

@Expose
@Category(name = "End Island", desc = "Features for the End Island")
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package at.hannibal2.skyhanni.config.features.combat.ghostcounter;

import at.hannibal2.skyhanni.config.FeatureToggle;
import at.hannibal2.skyhanni.config.core.config.Position;
import at.hannibal2.skyhanni.features.combat.ghosttracker.GhostTracker;
import com.google.gson.annotations.Expose;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDraggableList;
import io.github.notenoughupdates.moulconfig.annotations.ConfigLink;
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class GhostProfitTrackerConfig {

@Expose
@ConfigOption(name = "Enabled", desc = "Enables the Ghost Profit Tracker.")
@ConfigEditorBoolean
@FeatureToggle
public boolean enabled = true;

@Expose
@ConfigOption(
name = "Display Text",
desc = "Drag text to change the appearance of the overlay."
)
@ConfigEditorDraggableList
public List<GhostTracker.GhostTrackerLines> ghostTrackerText = new ArrayList<>(Arrays.asList(
GhostTracker.GhostTrackerLines.KILLS,
GhostTracker.GhostTrackerLines.GHOSTS_SINCE_SORROW,
GhostTracker.GhostTrackerLines.MAX_KILL_COMBO,
GhostTracker.GhostTrackerLines.COMBAT_XP_GAINED,
GhostTracker.GhostTrackerLines.AVERAGE_MAGIC_FIND,
GhostTracker.GhostTrackerLines.BESTIARY_KILLS
));

@Expose
@ConfigLink(owner = GhostProfitTrackerConfig.class, field = "enabled")
public Position position = new Position(50, 50, false, true);
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading