aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorefefury <69400149+efefury@users.noreply.github.com>2023-08-27 17:52:02 +0200
committerGitHub <noreply@github.com>2023-08-27 17:52:02 +0200
commit94a5760c419628f7b5a07c284880569e4149cd12 (patch)
treebc9ac531167aab8c4551e73fcd6e7e3b5812752c /src
parenta144bcb626000e6648164624cb63b7968d05966a (diff)
downloadNotEnoughUpdates-94a5760c419628f7b5a07c284880569e4149cd12.tar.gz
NotEnoughUpdates-94a5760c419628f7b5a07c284880569e4149cd12.tar.bz2
NotEnoughUpdates-94a5760c419628f7b5a07c284880569e4149cd12.zip
added new stuff to level page (#799)
* update * fix pets in rift page not displaying
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/MiscTaskLevel.java38
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/rift/RiftPage.java2
2 files changed, 29 insertions, 11 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/MiscTaskLevel.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/MiscTaskLevel.java
index 992b2609..291bf4cf 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/MiscTaskLevel.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/level/task/MiscTaskLevel.java
@@ -166,12 +166,28 @@ public class MiscTaskLevel extends GuiTaskLevel {
}
int sbXpTimeCharm = 0;
- if (object.has("rift") &&
- object.getAsJsonObject("rift").has("gallery") &&
- object.getAsJsonObject("rift").getAsJsonObject("gallery").has("secured_trophies")) {
- JsonArray timeCharms = object.getAsJsonObject("rift").getAsJsonObject("gallery").getAsJsonArray(
- "secured_trophies");
- sbXpTimeCharm += timeCharms.size() * miscellaneousTask.get("timecharm_xp").getAsInt();
+ int sbXpBurger = 0;
+ if (object.has("rift")) {
+ JsonObject rift = object.getAsJsonObject("rift");
+ if (rift.has("gallery") &&
+ rift.getAsJsonObject("gallery").has("secured_trophies")) {
+ JsonArray timeCharms = rift.getAsJsonObject("gallery").getAsJsonArray(
+ "secured_trophies");
+ sbXpTimeCharm += timeCharms.size() * miscellaneousTask.get("timecharm_xp").getAsInt();
+ }
+
+
+ if (rift.has("castle") && rift.getAsJsonObject("castle").has("grubber_stacks") && miscellaneousTask.has("mcgrubber_burger_xp")) {
+ sbXpBurger = miscellaneousTask.get("mcgrubber_burger_xp").getAsInt()
+ * rift.getAsJsonObject("castle").get("grubber_stacks").getAsInt();
+ }
+ }
+
+ int sbXpSerum = 0;
+ if (object.has("experimentation") &&
+ object.getAsJsonObject("experimentation").has("serums_drank")
+ && miscellaneousTask.has("metaphysical_serum_xp")) {
+ sbXpSerum = miscellaneousTask.get("metaphysical_serum_xp").getAsInt() * object.getAsJsonObject("experimentation").get("serums_drank").getAsInt();
}
List<String> lore = new ArrayList<>();
@@ -179,8 +195,9 @@ public class MiscTaskLevel extends GuiTaskLevel {
lore.add(levelPage.buildLore("Accessory Bag Upgrades",
sbXpAccessoryUpgrade, 0, true
));
- lore.add(levelPage.buildLore("Reaper Peppers",
- sbXpReaperPeppers, miscellaneousTask.get("reaper_peppers").getAsInt(), false
+ int xpConsumableItems = sbXpReaperPeppers + sbXpBurger + sbXpSerum;
+ lore.add(levelPage.buildLore("Consumable Items",
+ xpConsumableItems, miscellaneousTask.get("consumable_items").getAsInt(), false
));
lore.add(levelPage.buildLore("Timecharms",
sbXpTimeCharm, miscellaneousTask.get("timecharm").getAsInt(), false
@@ -208,8 +225,9 @@ public class MiscTaskLevel extends GuiTaskLevel {
sbXpRelays, miscellaneousTask.get("unlocking_relays").getAsInt(), false
));
- int totalXp = sbXpReaperPeppers + sbXpDojo + sbXpGainedHarp + sbXpAbiphone +
- sbXpCommunityUpgrade + sbXpPersonalBank + sbXpTimeCharm + sbXpRelays;
+
+ int totalXp =sbXpDojo + sbXpGainedHarp + sbXpAbiphone +
+ sbXpCommunityUpgrade + sbXpPersonalBank + sbXpTimeCharm + sbXpRelays + xpConsumableItems;
levelPage.renderLevelBar(
"Misc. Task",
new ItemStack(Items.map),
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/rift/RiftPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/rift/RiftPage.java
index bff6834c..9dc1ea8d 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/rift/RiftPage.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/rift/RiftPage.java
@@ -121,7 +121,7 @@ public class RiftPage extends GuiProfileViewerPage {
Utils.drawTexturedRect(guiLeft + 35, guiTop + 156, 20, 20, 0, 20 / 256f, 0, 20 / 256f, GL11.GL_NEAREST);
JsonObject deadCats = riftData.getAsJsonObject("dead_cats");
- if (!deadCats.entrySet().isEmpty() && deadCats.has("found_cata")) {
+ if (!deadCats.entrySet().isEmpty() && deadCats.has("found_cats")) {
JsonArray foundCats = deadCats.getAsJsonArray("found_cats");
int size = foundCats.size();