-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Corpse profit tracker #1152
base: master
Are you sure you want to change the base?
Corpse profit tracker #1152
Conversation
Some considerations for the future:
Also, the amounts in the initial picture are bugged. The issue causing that was fixed and is in the initial PR but the data was saved when it happened so I cba to reset and mine more. |
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.
Looks like good code. Few translations and a unused setting. Would also be nice to be able to open the summary page when clicking on the profit message.
...va/de/hysky/skyblocker/skyblock/dwarven/profittrackers/corpse/CorpseProfitHistoryScreen.java
Outdated
Show resolved
Hide resolved
...va/de/hysky/skyblocker/skyblock/dwarven/profittrackers/corpse/CorpseProfitHistoryScreen.java
Outdated
Show resolved
Hide resolved
...va/de/hysky/skyblocker/skyblock/dwarven/profittrackers/corpse/CorpseProfitHistoryScreen.java
Outdated
Show resolved
Hide resolved
...ain/java/de/hysky/skyblocker/skyblock/dwarven/profittrackers/corpse/CorpseProfitTracker.java
Outdated
Show resolved
Hide resolved
9860304
to
1e4baab
Compare
The changes at 1e4baab need testing. I can't do this since, well, I am banned from Hypixel. |
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.
LGTM. I have tested it as well and it seams to work fine.
- Extract `CorpseLoot` and `Reward` inner classes into separate classes - Use translatables where it makes sense - Add config option to toggle corpse profit tracker (can't believe I forgot this on corpse tracker as well) - Some minor command adjustments and fixes to both `PowderMiningTracker` and `CorpseProfitTracker` - Refactored `CorpseProfitHistoryScreen` into `CorpseProfitScreen`. The button that switched from one to the other is now a view switch button that changes the displayed list, and functionality of both screens is combined in one. - Add hover/click events to the profit text sent when a corpse is looted that opens the screen
This way, they don't display the price per unit when the amount is 1.
15b1d47
to
4477573
Compare
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.
Looks like a simple rebase so I'll approve.
Adds a corpse profit tracker for the glacite mineshafts. The screen is accessed with a command:
/skyblocker rewardTrackers corpse list
.Technical changes
Extracts
CorpseType
from the corpse finder into a separate file, with an extra field and some methods to make it easier for the tracker.I also changed the color of the types according to the color of the text that appears when you loot a corpse.
Refactored some code from the
PowderMiningTracker
intoAbstractProfitTracker
andPowderMiningTracker
, along with the newCorpseProfitTracker
inherit from the said abstract class. There's not much inheritance magic other than some utility methods.Moved the
PowderMiningTracker
into a separate packageAlso refactored the commands in
PowderMiningTracker
to not clutter the first level of subcommands on the namespace, so it goes like/skyblocker rewardTrackers powderMining <actual subcommand>
nowAdded a toggle config for
PowderMiningTracker
. I can't believe I forgot this on the initial PR...Added 2 new screens and 2 lists for displaying the relevant data for those screens:
CorpseProfitScreen
&RewardList
for summaryCorpseProfitHistoryScreen
&CorpseList
for historyThe summary screen shows the total of all rewards while the history screen shows each individual corpse's rewards, along with timestamps.
Summary Screen
History Screen