aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorCalMWolfs <94038482+CalMWolfs@users.noreply.github.com>2023-07-04 22:46:39 +1000
committerGitHub <noreply@github.com>2023-07-04 14:46:39 +0200
commit138f5294776704123138d1a2206e53d392fdd5e8 (patch)
tree289bc76cbe791027dcb464f2fb311ac276a617df /src/main/java/at
parent0a29213e7b22dd3673138a7283a8ac97fc133aed (diff)
downloadskyhanni-138f5294776704123138d1a2206e53d392fdd5e8.tar.gz
skyhanni-138f5294776704123138d1a2206e53d392fdd5e8.tar.bz2
skyhanni-138f5294776704123138d1a2206e53d392fdd5e8.zip
Merge pull request #288
* stop excessive warnings
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/Storage.java3
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt13
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/UpgradePage.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenDeskInSBMenu.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt19
9 files changed, 17 insertions, 36 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/Storage.java b/src/main/java/at/hannibal2/skyhanni/config/Storage.java
index d720b0211..a1f9fbfb1 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/Storage.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/Storage.java
@@ -35,9 +35,6 @@ public class Storage {
@Expose
public long nextCityProjectParticipationTime = 0L;
-
- @Expose
- public String lastRepoIssueVersion = "";
}
public static class ProfileSpecific {
diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
index 4bfa37ede..b41ec2227 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
@@ -5,7 +5,6 @@ import at.hannibal2.skyhanni.config.ConfigGuiManager
import at.hannibal2.skyhanni.config.commands.SimpleCommand.ProcessCommandRunnable
import at.hannibal2.skyhanni.data.ApiDataLoader
import at.hannibal2.skyhanni.data.GuiEditManager
-import at.hannibal2.skyhanni.data.ProfileStorageData
import at.hannibal2.skyhanni.features.bingo.BingoCardDisplay
import at.hannibal2.skyhanni.features.bingo.BingoNextStepHelper
import at.hannibal2.skyhanni.features.event.diana.BurrowWarpHelper
@@ -88,7 +87,6 @@ object Commands {
registerCommand("shtestcomposter") { ComposterOverlay.onCommand(it) }
registerCommand("shtestinquisitor") { InquisitorWaypointShare.test() }
registerCommand("shshowcropmoneycalculation") { CropMoneyDisplay.toggleShowCalculation() }
- registerCommand("shstoprepowarnings") { stopRepoWarnings() }
// for developers - coding help
registerCommand("shreloadlocalrepo") { SkyHanniMod.repo.reloadLocalRepo() }
@@ -116,17 +114,6 @@ object Commands {
}
}
- private fun stopRepoWarnings() {
- val hidden = ProfileStorageData.playerSpecific?.lastRepoIssueVersion
- if (hidden == SkyHanniMod.version) {
- ProfileStorageData.playerSpecific?.lastRepoIssueVersion = ""
- LorenzUtils.chat("§e[SkyHanni] Re-enabled repo warnings.")
- } else {
- ProfileStorageData.playerSpecific?.lastRepoIssueVersion = SkyHanniMod.version
- LorenzUtils.chat("§e[SkyHanni] Disabled repo warnings until next update.")
- }
- }
-
private fun clearFarmingItems() {
val config = GardenAPI.config?.fortune ?: return
LorenzUtils.chat("§e[SkyHanni] clearing farming items")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt
index db4e5d4c8..9b06240ad 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterDisplay.kt
@@ -31,7 +31,7 @@ class ComposterDisplay {
STORED_COMPOST(" Stored Compost: §r(.*)", "COMPOST");
val displayItem by lazy {
- NEUItems.getItemStack(icon)
+ NEUItems.getItemStack(icon, true)
}
val pattern by lazy { rawPattern.toPattern() }
@@ -100,7 +100,7 @@ class ComposterDisplay {
val millis = emptyTime.toDouble(DurationUnit.MILLISECONDS).toLong()
GardenAPI.config?.composterEmptyTime = System.currentTimeMillis() + millis
val format = TimeUtils.formatDuration(millis, maxUnits = 2)
- listOf(NEUItems.getItemStack("BUCKET"), "§b$format")
+ listOf(NEUItems.getItemStack("BUCKET", true), "§b$format")
} else {
listOf("§cOpen Composter Upgrades!")
}
@@ -188,7 +188,7 @@ class ComposterDisplay {
} else "?"
if (!GardenAPI.inGarden() && config.composterDisplayOutsideGarden) {
- val list = Collections.singletonList(listOf(NEUItems.getItemStack("BUCKET"), "§b$format"))
+ val list = Collections.singletonList(listOf(NEUItems.getItemStack("BUCKET", true), "§b$format"))
config.composterOutsideGardenPos.renderStringsAndItems(list, posLabel = "Composter Outside Garden Display")
}
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt
index 32ce790ab..e7f8e41f7 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropMoneyDisplay.kt
@@ -153,13 +153,13 @@ object CropMoneyDisplay {
try {
if (isSeeds(internalName)) {
- list.add(NEUItems.getItemStack("BOX_OF_SEEDS"))
+ list.add(NEUItems.getItemStack("BOX_OF_SEEDS", true))
} else {
list.add(NEUItems.getItemStack(internalName))
}
if (cropNames[internalName] == CropType.WHEAT && config.moneyPerHourMergeSeeds) {
- list.add(NEUItems.getItemStack("BOX_OF_SEEDS"))
+ list.add(NEUItems.getItemStack("BOX_OF_SEEDS", true))
}
} catch (e: NullPointerException) {
e.printStackTrace()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/UpgradePage.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/UpgradePage.kt
index e04c0dc54..27dfc6a33 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/UpgradePage.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/pages/UpgradePage.kt
@@ -33,7 +33,7 @@ class UpgradePage: FFGuideGUI.FFGuidePage() {
for ((index, upgrade) in upgradeList.withIndex()) {
if (adjustedY + 25 * index < FFGuideGUI.guiTop + 20) continue
if (adjustedY + 25 * index > FFGuideGUI.guiTop + 160) continue
- val upgradeItem = upgrade.requiredItem.let { NEUItems.getItemStack(it) }
+ val upgradeItem = upgrade.requiredItem.let { NEUItems.getItemStack(it, true) }
var formattedUpgrade = upgradeItem.nameWithEnchantment ?: return
if (adjustedY + 25 * index - 5 < FFGuideGUI.lastClickedHeight && FFGuideGUI.lastClickedHeight < adjustedY + 25 * index + 10) {
FFGuideGUI.lastClickedHeight = 0
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenDeskInSBMenu.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenDeskInSBMenu.kt
index ca8e4dbe3..0bf96463a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenDeskInSBMenu.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenDeskInSBMenu.kt
@@ -19,7 +19,7 @@ class GardenDeskInSBMenu {
private var showItem = false
private val item by lazy {
- val neuItem = NEUItems.getItemStack("DOUBLE_PLANT")
+ val neuItem = NEUItems.getItemStack("DOUBLE_PLANT", true)
Utils.createItemStack(neuItem.item, "§bDesk", "§7Click here to", "§7run §e/desk")
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
index bbd3fce29..fef655811 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt
@@ -127,7 +127,7 @@ object GardenVisitorDropStatistics {
for (reward in VisitorReward.values()) {
val count = rewardsCount[reward] ?: 0
if (config.displayIcons) {// Icons
- val stack = NEUItems.getItemStack(reward.internalName)
+ val stack = NEUItems.getItemStack(reward.internalName, true)
if (config.displayNumbersFirst)
add(listOf("§b${count.addSeparators()} ", stack))
else add(listOf(stack, " §b${count.addSeparators()}"))
diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt
index bf70e8b8d..6ea866311 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/rift/EnigmaSoulWaypoints.kt
@@ -32,7 +32,7 @@ object EnigmaSoulWaypoints {
private var adding = true
private val item by lazy {
- val neuItem = NEUItems.getItemStack("SKYBLOCK_ENIGMA_SOUL")
+ val neuItem = NEUItems.getItemStack("SKYBLOCK_ENIGMA_SOUL", true)
Utils.createItemStack(
neuItem.item,
"§5Toggle Missing",
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
index 848acd0ff..30424593c 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUItems.kt
@@ -1,8 +1,6 @@
package at.hannibal2.skyhanni.utils
-import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.ConfigManager
-import at.hannibal2.skyhanni.data.ProfileStorageData
import at.hannibal2.skyhanni.test.command.CopyErrorCommand
import at.hannibal2.skyhanni.utils.ItemBlink.checkBlinkItem
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
@@ -37,7 +35,6 @@ object NEUItems {
private val enchantmentNamePattern = Pattern.compile("^(?<format>(?:§.)+)(?<name>[^§]+) (?<level>[IVXL]+)$")
var allItemsCache = mapOf<String, String>() // item name -> internal name
var allInternalNames = mutableListOf<String>()
- private var warnedAlready = false
private val fallbackItem by lazy {
Utils.createItemStack(
@@ -156,16 +153,16 @@ object NEUItems {
.withKnownInternalName(internalName)
.resolveToItemStack()?.copy()
- fun getItemStack(internalName: String): ItemStack = getItemStackOrNull(internalName) ?: run {
- if (ProfileStorageData.playerSpecific?.lastRepoIssueVersion != SkyHanniMod.version || !warnedAlready) {
+ fun getItemStack(internalName: String, definite: Boolean = false): ItemStack = getItemStackOrNull(internalName) ?: run {
+ if (definite) {
Utils.showOutdatedRepoNotification()
- CopyErrorCommand.logError(
- IllegalStateException("Something went wrong!"),
- "Encountered an error getting the item for §7$internalName§c. " +
- "This is probably because your NEU repo is outdated"
- )
}
- warnedAlready = true
+ CopyErrorCommand.logError(
+ IllegalStateException("Something went wrong!"),
+ "Encountered an error getting the item for §7$internalName§c. " +
+ "This may be because your NEU repo is outdated. Please ask in the SkyHanni" +
+ "Discord if this is the case"
+ )
fallbackItem
}