Skip to content

Commit

Permalink
Merge branch 'fossil-profit-tracker' into hide-not-clickable-itesm-mi…
Browse files Browse the repository at this point in the history
…ning-v3
  • Loading branch information
hannibal002 committed Apr 13, 2024
2 parents 3375c39 + e54690b commit 7c0208d
Show file tree
Hide file tree
Showing 67 changed files with 1,730 additions and 530 deletions.
1 change: 1 addition & 0 deletions .github/workflows/illegal-imports.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
# <directory without src/main/java prefix> <illegal import>

at/hannibal2/skyhanni/ scala.
at/hannibal2/skyhanni/ io.github.moulberry.notenoughupdates.util.Constants
at/hannibal2/skyhanni/ io.github.moulberry.notenoughupdates.events.SlotClickEvent
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ plugins {
}

group = "at.hannibal2.skyhanni"
version = "0.25.Beta.5"
version = "0.25.Beta.6"

val gitHash by lazy {
val baos = ByteArrayOutputStream()
Expand Down
24 changes: 24 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
+ Works inside the menus Jacob's Farming Contest, Your Contests, and SkyBlock Calendar.
+ Added Visitor's Logbook Stats. - HiZe (https://github.com/hannibal002/SkyHanni/pull/1287)
+ Show all your visited/accepted/denied visitors stats in a display.
+ Added Stereo Harmony Display. - Empa (https://github.com/hannibal002/SkyHanni/pull/1324)
+ Options to show/hide boosted crop and pest icons.

#### Diana Features

Expand All @@ -23,6 +25,8 @@
+ Added Area Walls. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1266)
+ Show walls between the main areas of the Crystal Hollows.
+ Option to show the walls also when inside the Nucleus.
+ Fossil Excavator Solver. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1427)
+ Shows where to next click for optimal chance of solving the fossil. If there is a fossil this will find it within 18 moves.

#### Dungeon Features

Expand All @@ -49,6 +53,10 @@
+ SkyMart and Anita Medal prices are now perfectly aligned in the displays. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1376)
+ Clear plot sprays when Portable Washer is used. - Alexia Luna (https://github.com/hannibal002/SkyHanni/pull/1178)
+ Added option to show atmospheric filter display outside SB. - Obsidian (https://github.com/hannibal002/SkyHanni/pull/1131)
+ Improved visitor reward blocking. - Obsidian (https://github.com/hannibal002/SkyHanni/pull/1417)
+ Added option to block accepting/refusing expensive/cheap copper.
+ Added option to prevent blocking never accepted visitors.
+ Reworked visitor blocking logic to make it more like not clickable items.

#### Diana Improvements

Expand Down Expand Up @@ -76,6 +84,7 @@
#### Inventory Improvements

+ Items that cannot be salvaged because you have donated them to the Museum are now greyed out in the Salvage menu. - Alexia Luna (https://github.com/hannibal002/SkyHanni/pull/1384)
+ Added support for Glacial Cave gemstones in Estimated Item Value. - Fix3dll (https://github.com/hannibal002/SkyHanni/pull/1416)

#### Slayer Improvements

Expand All @@ -84,6 +93,7 @@
#### Misc Improvements

+ Improved mod performance. - CalMWolfs, ThatGravyBoat (https://github.com/hannibal002/SkyHanni/pull/1342)
+ Added option to toggle No Bits Warning sound. - Empa (https://github.com/hannibal002/SkyHanni/pull/1425)

### Fixes

Expand Down Expand Up @@ -124,10 +134,12 @@
+ Fixed Crystal Hollows Island size being 26 instead of 24 in Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1389)
+ Fixed "unknown lines" error with an objective line in Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1394)
+ Fixed Powder not being shown in the Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1414)
+ Fixed the skill tab list pattern sometimes not matching. - Alexia Luna (https://github.com/hannibal002/SkyHanni/pull/1419)

#### Dungeon Fixes

+ Dungeon Copilot no longer tells you to enter the nonexistent boss room in The Catacombs - Entrance. - Alexia Luna (https://github.com/hannibal002/SkyHanni/pull/1374)
+ Fixed some area walls overlapping with blocks. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1418)

#### Bingo Fixes

Expand All @@ -143,6 +155,10 @@
+ Fixes skill progress item scale being bigger than intended. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/1413)
+ Fixed modid of SkyHanni classes being wrong, causing various issues, like the gfs queue not working - nea (https://github.com/hannibal002/SkyHanni/pull/1411)
+ Fixed some typos. - Alexia Luna (https://github.com/hannibal002/SkyHanni/pull/1408)
+ Fixed No Bits Warning triggering when spending bits. - Empa (https://github.com/hannibal002/SkyHanni/pull/1425)
+ Clear SkyBlock area on world change. - Alexia Luna (https://github.com/hannibal002/SkyHanni/pull/1421)
+ This fixed the wrong area showing in some cases, such as when guesting on someone's Private Island.
+ Fixed a small issue that caused some features to not work as intended. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1402)

### Technical Details

Expand Down Expand Up @@ -196,6 +212,14 @@
+ Switch from LorenzUtils.inDungeons to DungeonAPI.inDungeon(). - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/1378)
+ Bumped MoulConfig - nea (https://github.com/hannibal002/SkyHanni/pull/1411)
+ Deleted two empty files. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1401)
+ Added BitsGain, BitsSpent and BitsAvailableGained to BitsUpdateEvent. - Empa (https://github.com/hannibal002/SkyHanni/pull/1425)
+ Renamed bitsToClaim to bitsAvailable. - Empa (https://github.com/hannibal002/SkyHanni/pull/1425)
+ Made `HypixelData.skyBlockArea[withSymbol]` and `LorenzUtils.skyBlockArea` nullable. - Alexia Luna (https://github.com/hannibal002/SkyHanni/pull/1421)
+ This replaces the previous `"?"` magic value.
+ Fixed colors in debug messages. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/1423)
+ Code cleanup. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1402)
+ Added function ChatUtils.chatAndOpenConfig(). - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/1396)
+ Allows sending a chat message that will open a given config element in the config editor.

### Removed Features

Expand Down
4 changes: 4 additions & 0 deletions docs/FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,8 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
+ Works inside the menus Jacob's Farming Contest, Your Contests, and SkyBlock Calendar.
+ Visitor's Logbook Stats. - HiZe (https://github.com/hannibal002/SkyHanni/pull/1287)
+ Show all your visited/accepted/denied visitors stats in a display.
+ Stereo Harmony Display. - Empa (https://github.com/hannibal002/SkyHanni/pull/1324)
+ Options to show/hide boosted crop and pest icons.

</details>
<details open><summary>
Expand Down Expand Up @@ -757,6 +759,8 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
+ Area Walls. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/1266)
+ Show walls between the main areas of the Crystal Hollows.
+ Option to show the walls also when inside the Nucleus.
+ Fossil Excavator Solver. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/1427)
+ Shows where to next click for optimal chance of solving the fossil. If there is a fossil this will find it within 18 moves.

</details>
<details open><summary>
Expand Down
18 changes: 13 additions & 5 deletions src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ import at.hannibal2.skyhanni.features.combat.mobs.AreaMiniBossFeatures
import at.hannibal2.skyhanni.features.combat.mobs.AshfangMinisNametagHider
import at.hannibal2.skyhanni.features.combat.mobs.MobHighlight
import at.hannibal2.skyhanni.features.combat.mobs.SpawnTimers
import at.hannibal2.skyhanni.features.commands.PartyChatCommands
import at.hannibal2.skyhanni.features.commands.PartyCommands
import at.hannibal2.skyhanni.features.commands.SendCoordinatedCommand
import at.hannibal2.skyhanni.features.commands.ViewRecipeCommand
Expand Down Expand Up @@ -230,6 +231,8 @@ import at.hannibal2.skyhanni.features.garden.visitor.VisitorListener
import at.hannibal2.skyhanni.features.garden.visitor.VisitorRewardWarning
import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard
import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardPattern
import at.hannibal2.skyhanni.features.gui.quiver.QuiverDisplay
import at.hannibal2.skyhanni.features.gui.quiver.QuiverWarning
import at.hannibal2.skyhanni.features.inventory.AuctionsHighlighter
import at.hannibal2.skyhanni.features.inventory.ChestValue
import at.hannibal2.skyhanni.features.inventory.DojoRankDisplay
Expand All @@ -241,7 +244,6 @@ import at.hannibal2.skyhanni.features.inventory.ItemStars
import at.hannibal2.skyhanni.features.inventory.MaxPurseItems
import at.hannibal2.skyhanni.features.inventory.PowerStoneGuideFeatures
import at.hannibal2.skyhanni.features.inventory.QuickCraftFeatures
import at.hannibal2.skyhanni.features.inventory.QuiverNotification
import at.hannibal2.skyhanni.features.inventory.RngMeterInventory
import at.hannibal2.skyhanni.features.inventory.SackDisplay
import at.hannibal2.skyhanni.features.inventory.ShiftClickBrewing
Expand All @@ -264,12 +266,14 @@ import at.hannibal2.skyhanni.features.itemabilities.abilitycooldown.ItemAbilityC
import at.hannibal2.skyhanni.features.mining.DeepCavernsParkour
import at.hannibal2.skyhanni.features.mining.HighlightMiningCommissionMobs
import at.hannibal2.skyhanni.features.mining.KingTalismanHelper
import at.hannibal2.skyhanni.features.mining.MiningNotifications
import at.hannibal2.skyhanni.features.mining.crystalhollows.CrystalHollowsNamesInCore
import at.hannibal2.skyhanni.features.mining.crystalhollows.CrystalHollowsWalls
import at.hannibal2.skyhanni.features.mining.eventtracker.MiningEventDisplay
import at.hannibal2.skyhanni.features.mining.eventtracker.MiningEventTracker
import at.hannibal2.skyhanni.features.mining.fossilexcavator.ExcavatorProfitTracker
import at.hannibal2.skyhanni.features.mining.fossilexcavator.FossilExcavatorAPI
import at.hannibal2.skyhanni.features.mining.fossilexcavator.solver.FossilExcavator
import at.hannibal2.skyhanni.features.mining.fossilexcavator.solver.FossilSolverDisplay
import at.hannibal2.skyhanni.features.mining.powdertracker.PowderTracker
import at.hannibal2.skyhanni.features.minion.InfernoMinionFeatures
import at.hannibal2.skyhanni.features.minion.MinionCollectLogic
Expand Down Expand Up @@ -434,7 +438,7 @@ import org.apache.logging.log4j.Logger
clientSideOnly = true,
useMetadata = true,
guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop",
version = "0.25.Beta.5",
version = "0.25.Beta.6",
)
class SkyHanniMod {

Expand Down Expand Up @@ -588,6 +592,7 @@ class SkyHanniMod {
loadModule(WarpIsCommand())
loadModule(ViewRecipeCommand)
loadModule(PartyCommands)
loadModule(PartyChatCommands)
loadModule(SummoningMobManager())
loadModule(SkyblockXPInChat())
loadModule(AreaMiniBossFeatures())
Expand Down Expand Up @@ -661,7 +666,8 @@ class SkyHanniMod {
loadModule(GardenCropMilestoneDisplay)
loadModule(GardenCustomKeybinds)
loadModule(ChickenHeadTimer())
loadModule(FossilExcavator)
loadModule(FossilSolverDisplay)
loadModule(ExcavatorProfitTracker())
loadModule(GardenOptimalSpeed())
loadModule(GardenLevelDisplay())
loadModule(FarmingWeightDisplay())
Expand Down Expand Up @@ -817,6 +823,7 @@ class SkyHanniMod {
loadModule(HighlightPlaceableNpcs())
loadModule(PresentWaypoints())
loadModule(MiningEventTracker())
loadModule(MiningNotifications())
loadModule(JyrreTimer())
loadModule(TotemOfCorruption())
loadModule(NewYearCakeReminder())
Expand All @@ -825,7 +832,6 @@ class SkyHanniMod {
loadModule(VerminTracker)
loadModule(SkillProgress)
loadModule(SkillTooltip())
loadModule(QuiverNotification)
loadModule(MaxPurseItems())
loadModule(SuperCraftFeatures())
loadModule(InfernoMinionFeatures())
Expand All @@ -835,6 +841,8 @@ class SkyHanniMod {
loadModule(DungeonShadowAssassinNotification())
loadModule(PestProfitTracker)
loadModule(NoBitsWarning())
loadModule(QuiverDisplay())
loadModule(QuiverWarning())

init()

Expand Down
44 changes: 7 additions & 37 deletions src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
package at.hannibal2.skyhanni.api

import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.ConfigManager
import at.hannibal2.skyhanni.data.jsonobjects.other.NeuSacksJson
import at.hannibal2.skyhanni.data.SackAPI
import at.hannibal2.skyhanni.events.GuiContainerEvent
import at.hannibal2.skyhanni.events.InventoryCloseEvent
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.LorenzToolTipEvent
import at.hannibal2.skyhanni.events.MessageSendToServerEvent
import at.hannibal2.skyhanni.events.NeuRepositoryReloadEvent
import at.hannibal2.skyhanni.features.commands.tabcomplete.GetFromSacksTabComplete
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.ChatUtils
import at.hannibal2.skyhanni.utils.ChatUtils.isCommand
import at.hannibal2.skyhanni.utils.ChatUtils.senderIsSkyhanni
import at.hannibal2.skyhanni.utils.ItemUtils.itemNameWithoutColor
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.NEUInternalName
import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
Expand All @@ -25,9 +22,7 @@ import at.hannibal2.skyhanni.utils.PrimitiveItemStack.Companion.makePrimitiveSta
import at.hannibal2.skyhanni.utils.SimpleTimeMark
import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import at.hannibal2.skyhanni.utils.fromJson
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern
import io.github.moulberry.notenoughupdates.util.Utils
import net.minecraft.inventory.Slot
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.util.Deque
Expand Down Expand Up @@ -75,11 +70,11 @@ object GetFromSackAPI {

private var lastItemStack: PrimitiveItemStack? = null

var sackListInternalNames = emptySet<String>()
private set
@Deprecated("", ReplaceWith("SackAPI.sackListInternalNames"))
val sackListInternalNames get() = SackAPI.sackListInternalNames

var sackListNames = emptySet<String>()
private set
@Deprecated("", ReplaceWith("SackAPI.sackListNames"))
val sackListNames get() = SackAPI.sackListNames

private fun addToQueue(items: List<PrimitiveItemStack>) = queue.addAll(items)

Expand Down Expand Up @@ -179,8 +174,8 @@ object GetFromSackAPI {
val itemString = args.dropLast(1).joinToString(" ").uppercase().replace(':', '-')

val item = when {
sackListInternalNames.contains(itemString) -> itemString.asInternalName()
sackListNames.contains(itemString) -> NEUInternalName.fromItemNameOrNull(itemString) ?: run {
SackAPI.sackListInternalNames.contains(itemString) -> itemString.asInternalName()
SackAPI.sackListNames.contains(itemString) -> NEUInternalName.fromItemNameOrNull(itemString) ?: run {
ErrorManager.logErrorStateWithData(
"Couldn't resolve item name",
"Query failed",
Expand Down Expand Up @@ -222,29 +217,4 @@ object GetFromSackAPI {
WRONG_AMOUNT,
INTERNAL_ERROR
}

@SubscribeEvent
fun onNeuRepoReload(event: NeuRepositoryReloadEvent) {
val data = event.getConstant("sacks") ?: ErrorManager.skyHanniError("NEU sacks data is null.")
try {
val sacksData = ConfigManager.gson.fromJson<NeuSacksJson>(data).sacks
val uniqueSackItems = mutableSetOf<NEUInternalName>()

sacksData.values.forEach { sackInfo ->
sackInfo.contents.forEach { content ->
uniqueSackItems.add(content)
}
}

sackListInternalNames = uniqueSackItems.map { it.asString() }.toSet()
sackListNames = uniqueSackItems.map { it.itemNameWithoutColor.uppercase() }.toSet()

} catch (e: Exception) {
ErrorManager.logErrorWithData(
e, "Error getting NEU sacks data, make sure your neu repo is updated.",
"sacksJson" to data
)
Utils.showOutdatedRepoNotification()
}
}
}
Loading

0 comments on commit 7c0208d

Please sign in to comment.