aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
index 01a6d3827..75fd7e9d2 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt
@@ -51,6 +51,7 @@ object GardenAPI {
private var inBarn = false
val onBarnPlot get() = inBarn && inGarden()
val storage get() = ProfileStorageData.profileSpecific?.garden
+ var totalAmountVisitorsExisting = 0
var gardenExp: Long?
get() = storage?.experience
set(value) {
@@ -239,6 +240,7 @@ object GardenAPI {
fun onRepoReload(event: RepositoryReloadEvent) {
val data = event.getConstant<GardenJson>("Garden")
gardenExperience = data.garden_exp
+ totalAmountVisitorsExisting = data.visitors.size
}
private var gardenExperience = listOf<Int>()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt
index 4e06ee1cb..44beaca34 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/OverviewPage.kt
@@ -1,5 +1,6 @@
package at.hannibal2.skyhanni.features.garden.fortuneguide.pages
+import at.hannibal2.skyhanni.features.garden.GardenAPI
import at.hannibal2.skyhanni.features.garden.fortuneguide.FFGuideGUI
import at.hannibal2.skyhanni.features.garden.fortuneguide.FFGuideGUI.Companion.currentArmor
import at.hannibal2.skyhanni.features.garden.fortuneguide.FFGuideGUI.Companion.currentEquipment
@@ -204,10 +205,11 @@ class OverviewPage: FFGuideGUI.FFGuidePage() {
if (currentEquipment == 0) 60 else 15,
FFGuideGUI.guiLeft + 255, FFGuideGUI.guiTop + 105, 90, mouseX, mouseY, FFGuideGUI.tooltipToDisplay)
+ val maxGreenThumbFortune = GardenAPI.totalAmountVisitorsExisting.toDouble() / 4
line = if (currentEquipment == 0) "§7§2The fortune from all of your equipment's enchantments\n§2Select a piece for more info"
else "§7§2Total enchantment fortune from your\n${equipmentItem.getItem().displayName}"
GuiRenderUtils.drawFarmingBar("§2$word Enchantment", line, equipmentFF[FFTypes.GREEN_THUMB] ?: 0,
- if (currentEquipment == 0) 78 else 19.5,
+ if (currentEquipment == 0) maxGreenThumbFortune * 4 else maxGreenThumbFortune,
FFGuideGUI.guiLeft + 255, FFGuideGUI.guiTop + 130, 90, mouseX, mouseY, FFGuideGUI.tooltipToDisplay)
}
-} \ No newline at end of file
+}