-
-
Notifications
You must be signed in to change notification settings - Fork 163
Profile Viewer Rework #1555
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: master
Are you sure you want to change the base?
Profile Viewer Rework #1555
Conversation
1572d18 to
19b58ba
Compare
|
TODO:
|
| public Map<String, ClassStats> classStats = Map.of(); | ||
|
|
||
| public ClassStats getClassData(Class dungeonClass) { | ||
| return classStats.getOrDefault(dungeonClass.getName().toLowerCase(), new ClassStats()); |
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.
Should use Locale.ENGLISH
| return classStats.getOrDefault(dungeonClass.getName().toLowerCase(), new ClassStats()); | ||
| } | ||
|
|
||
| public enum Class { |
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.
While these models are meant to be separate, we already have a DungeonClass enum in the dungeon package and its pretty much the exact same as this so I would make an exception and use it instead to avoid duplication.
| public String cuteName; | ||
| public Events events = new Events(); | ||
| public Bestiary bestiary = new Bestiary(); | ||
| // TODO: mining_core (which is broken right now) |
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.
This TODO should probably be moved somewhere else since the data isn't in this model.
| public class CommunityUpgrades { | ||
| // @Nullable | ||
| // @SerializedName("currently_upgrading") | ||
| // public String currentlyUpgrading = null; |
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.
Example data I found on my friend's profile:
"currently_upgrading":{"upgrade":"coins_allowance","new_tier":1,"start_ms":1753150988337,"who_started":"00104f77085443018d4e886a477346b8"}}
There might be more possible fields but this should be a good place to start.
|
|
||
| public Map<String, Integer> completions; | ||
| @SerializedName("bop_bonus") | ||
| public String bookOfProgressionBonus; |
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.
Could maybe be an enum
|
|
||
| @SerializedName("contact_data") | ||
| public Map<String, ContactData> contactData = new HashMap<>(); | ||
| public static class ContactData { |
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.
Some of these fields could perhaps be marked as nullable
| * Gets a submap of the map with only entries prefixed with the prefix. Assumes that the prefix is always followed by an {@code _} and no non underscore separated values exist. | ||
| */ | ||
| private static Map<String, Integer> getPrefixMap(NavigableMap<String, Integer> map, String prefix) { | ||
| return map.subMap(prefix + '_', prefix + ('_' + 1)); |
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.
'_' + 1 does not concatenate the both but rather results in 96 since chars are integers on the stack and can be added with them. Some mobs also go above level 199 but I assume this will also work for them too.
|
🙂 |
Hi vic |
Uh oh!
There was an error while loading. Please reload this page.