diff options
| author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2022-09-23 23:33:16 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-23 15:33:16 +0200 |
| commit | 61c53c0054431e75826d071dfb363406b5763195 (patch) | |
| tree | f55192c8e45e7871614a19d611159badac596552 /src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java | |
| parent | 21a353f09edc1623d339dd9f7eea639b35891d57 (diff) | |
| download | notenoughupdates-61c53c0054431e75826d071dfb363406b5763195.tar.gz notenoughupdates-61c53c0054431e75826d071dfb363406b5763195.tar.bz2 notenoughupdates-61c53c0054431e75826d071dfb363406b5763195.zip | |
Pet overlay fixes (#290)
* fixed pet overlay going to level 100
* fixed transparent pet and equip overlay not using the special texture
fixed pet overlay showing a pet when you remove your pet
* made pet overlay show the current stats of your pet
* Fixed pet overlay showing Until level 100.0
* Fixed pet stats not showing decimal
* Made pet overlay show xp to next level
* 2.1.md slight smile
* Try to generify pet lore replacements a tiny bit
Also move pets page to use the same code as the pet overlay
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Co-authored-by: nea <romangraef@gmail.com>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java index 14a136a2..499448fa 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/PetInfoOverlay.java @@ -133,10 +133,11 @@ public class PetInfoOverlay extends TextOverlay { public String petXpType; public String petItem; public String skin; + public int candyUsed; public String getPetId(boolean withoutBoost) { - return petType + ";" + (withoutBoost ? rarity.petId - 1 : rarity.petId); - + boolean shouldDecreaseRarity = withoutBoost && "PET_ITEM_TIER_BOOST".equals(petItem); + return petType + ";" + (shouldDecreaseRarity ? rarity.petId - 1 : rarity.petId); } } @@ -466,10 +467,10 @@ public class PetInfoOverlay extends TextOverlay { float remainingMax = currentPet.petLevel.maxXP - currentPet.petLevel.totalXp; if (remaining > 0) { if (xpGain < 1000) { - etaMaxStr = EnumChatFormatting.AQUA + "Until L" + currentPet.petLevel.maxLevel + ": " + + etaMaxStr = EnumChatFormatting.AQUA + "Until L" + (int) currentPet.petLevel.maxLevel + ": " + EnumChatFormatting.YELLOW + "N/A"; } else { - etaMaxStr = EnumChatFormatting.AQUA + "Until L" + currentPet.petLevel.maxLevel + ": " + + etaMaxStr = EnumChatFormatting.AQUA + "Until L" + (int) currentPet.petLevel.maxLevel + ": " + EnumChatFormatting.YELLOW + Utils.prettyTime((long) (remainingMax) * 1000 * 60 * 60 / (long) xpGain); } } |
