Skip to content

Commit

Permalink
Merge branch 'beta' into FixReplaceRomanNumeralv2
Browse files Browse the repository at this point in the history
  • Loading branch information
CalMWolfs authored Dec 14, 2024
2 parents 5a54730 + a19df7d commit 52eee48
Show file tree
Hide file tree
Showing 293 changed files with 1,404 additions and 805 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ for more information and usages.
the main thread.
- When updating a config option variable, use the `ConfigUpdaterMigrator.ConfigFixEvent` with event.move() when moving a value, and event.transform() when updating a value. [For Example](https://github.com/hannibal002/SkyHanni/blob/e88f416c48f9659f89b7047d7629cd9a1d1535bc/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt#L276).
- Use American English spelling conventions (e.g., "color" not "colour").
- Avoid direct function imports. Always access functions or members through their respective namespaces or parent classes to improve readability and maintain encapsulation.

## Additional Useful Development Tools

Expand Down
23 changes: 23 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
+ Displays slots with an active cooldown.
+ Added an option to show the Hoppity Event Card only while on islands where eggs spawn. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2940)
+ Added the ability to recolor chocolate gains from duplicate rabbits when the Time Tower is active. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2805)
+ Added Hitman statistics to Chocolate Factory stats. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2991)
+ Allows to view remaining time for full and 28 claimable slots.

#### Inventory Features

Expand Down Expand Up @@ -112,12 +114,17 @@
+ Added a setting to adjust the expiration warning time.
+ Improved Slayer Miniboss features. - Empa (https://github.com/hannibal002/SkyHanni/pull/2081)
+ Added the ability to remove people from the Carry Tracker. - Empa (https://github.com/hannibal002/SkyHanni/pull/2829)
+ Added Venom Shot attacks to the Arachne chat filter. - BearySuperior (https://github.com/hannibal002/SkyHanni/pull/3032)

#### Mining Improvements

+ Made the "You need a stronger tool to mine ..." chat filter hide every such message, not just Crystal Hollows gemstones. - Luna (https://github.com/hannibal002/SkyHanni/pull/2724)
+ Added an option to draw a line to your golden or diamond goblin. - Thunderblade73 (https://github.com/hannibal002/SkyHanni/pull/2717)
+ Added the Mining Event Display to Outside Skyblock Features. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2947)
+ Added an option to disable sharing mining event data. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3055)
+ Improved accuracy when more users share mining event data.
+ Data shared includes current event type, start, and end times.
+ Limited the "Mining Event Data can't be loaded from the server" error message to once in chat. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3055)

#### Diana Improvements

Expand Down Expand Up @@ -162,6 +169,7 @@
+ The optimal speed for Rancher's Boots is now automatically set when clicking on the wrong speed message in chat, eliminating the need to enter it manually. - Luna (https://github.com/hannibal002/SkyHanni/pull/2963)
+ Added an option to send the optimal speed warning even when not wearing Rancher's Boots. - Obsidian (https://github.com/hannibal002/SkyHanni/pull/2859)
+ Added a Pest Traps tab widget to the Tab Widget Display. - Luna (https://github.com/hannibal002/SkyHanni/pull/2984)
+ Updated Pest chat and GUI to indicate Pests Widget is disabled when displaying pests. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3022)

#### Event Improvements

Expand All @@ -183,6 +191,7 @@
+ You can change this option using `/sh tracker search`.
+ Added the Minecraft version to the mod file name. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2941)
+ Added a warning for empty messages left behind by Stash Compact. - Daveed (https://github.com/hannibal002/SkyHanni/pull/3009)
+ Added option to hide seconds in the Real Time GUI. - Obsidian (https://github.com/hannibal002/SkyHanni/pull/2979)

### Fixes

Expand Down Expand Up @@ -217,6 +226,7 @@
+ Fixed an error in the Personal Compactor Overlay. - Empa (https://github.com/hannibal002/SkyHanni/pull/2888)
+ Fixed AH Price Website feature not URL encoding the search. - Obsidian (https://github.com/hannibal002/SkyHanni/pull/2952)
+ Fixed the Fisherman Attribute abbreviation being incorrect. - Empa (https://github.com/hannibal002/SkyHanni/pull/2950)
+ Fixed background colors for UltraRareBook & Guardian Reminder. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/3050)

#### Combat Fixes

Expand All @@ -239,6 +249,8 @@
+ Fixed Mineshaft RoomId missing in the Custom Scoreboard. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/2946)
+ Potentially fixed Custom Scoreboard sometimes not showing Kuudra Lines. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/3006)
+ Fixed a Custom Scoreboard error while waiting for the Mineshaft Queue. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/3036)
+ Fixed Custom Scoreboard errors from the new Rift update. - j10a1n15 (https://github.com/hannibal002/SkyHanni/pull/3046)
+ Fixed Custom Scoreboard's player count to exclude offline players in co-ops and guest islands. - Chissl (https://github.com/hannibal002/SkyHanni/pull/3026)

#### Hoppity Fixes

Expand Down Expand Up @@ -285,6 +297,7 @@
+ Fixed Anita's medal display appearing in the Visitor inventory. - Daveed (https://github.com/hannibal002/SkyHanni/pull/3007)
+ Specified in visitor config that Maeve's dialogue is not hidden in the "Hide Chat" option. - Chissl (https://github.com/hannibal002/SkyHanni/pull/3002)
+ Fixed the next visitor timer not decreasing on pest kills. - Chissl (https://github.com/hannibal002/SkyHanni/pull/3027)
+ Fixed chat error spam from Garden Composter Overlay. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3037)

#### Crimson Isle Fixes

Expand Down Expand Up @@ -377,6 +390,8 @@
+ Fixed incorrect personal best gain calculations. - Chissl (https://github.com/hannibal002/SkyHanni/pull/2996)
+ Fixed the `/playtimedetailed` breakdown being sorted incorrectly. - martimavocado (https://github.com/hannibal002/SkyHanni/pull/3021)
+ Fixed an issue where item and material stashes together would break Stash Compact. - Daveed (https://github.com/hannibal002/SkyHanni/pull/3009)
+ Fixed intermittent NEU rendering issues. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/3053)
+ Fixed collection tracker to recognize the current collection. - nopo (https://github.com/hannibal002/SkyHanni/pull/3049)

### Technical Details

Expand Down Expand Up @@ -480,6 +495,14 @@
+ Converted some `LorenzEvents` into `SkyHanniEvents`. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/3025)
+ Converted some events to `GenericSkyHanniEvent`. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2753)
+ The auto updater now searches for JAR files that include the correct Minecraft version in their names. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2941)
+ Changed `TimeLimitedCache` to extend `MutableMap` instead of `Iterator`. - Empa (https://github.com/hannibal002/SkyHanni/pull/2729)
+ Optimized sulphur skitter performance by caching `AxisAlignedBB` calculations and using more `LorenzVec`. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3038)
+ Added option to send a chat message only once. - hannibal2 (https://github.com/hannibal002/SkyHanni/pull/3055)
+ Introduced "Island" widget type. - Chissl (https://github.com/hannibal002/SkyHanni/pull/3026)
+ Added more preprocessing for version 1.12. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/3043)
+ Enhanced `InventoryUtils.clickSlot` to support click type and mode. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/2962)
+ Relocated some events to specific sub-packages. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/3041)
+ Converted additional `LorenzEvents` to `SkyHanniEvents`. - CalMWolfs (https://github.com/hannibal002/SkyHanni/pull/3039)

## Version 0.27

Expand Down
2 changes: 2 additions & 0 deletions docs/FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,8 @@ Use `/sh` or `/skyhanni` to open the SkyHanni config in game.
+ Displays slots with an active cooldown.
+ Added an option to show the Hoppity Event Card only while on islands where eggs spawn. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2940)
+ Added the ability to recolor chocolate gains from duplicate rabbits when the Time Tower is active. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2805)
+ Added Hitman statistics to Chocolate Factory stats. - Daveed (https://github.com/hannibal002/SkyHanni/pull/2991)
+ Allows to view remaining time for full and 28 claimable slots.

### The Carnival

Expand Down
2 changes: 1 addition & 1 deletion root.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {

allprojects {
group = "at.hannibal2.skyhanni"
version = "0.28.Beta.18"
version = "0.28.Beta.19"
repositories {
mavenCentral()
mavenLocal()
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ object CollectionAPI {

/**
* REGEX-TEST: §7Total collected: §e261,390
* REGEX-TEST: §7Total Collected: §e2,012,418
*/
private val singleCounterPattern by patternGroup.pattern(
"singlecounter",
"§7Total collected: §e(?<amount>.*)",
"§7Total [c|C]ollected: §e(?<amount>.*)",
)

/**
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ object SkillAPI {
}
}

@SubscribeEvent
fun onDebugDataCollect(event: DebugDataCollectEvent) {
@HandleEvent
fun onDebug(event: DebugDataCollectEvent) {
event.title("Skills")
val storage = storage
if (storage == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ object SkyHanniEvents {
disabledHandlerInvokers = data.disabledInvokers
}

@SubscribeEvent
@HandleEvent
fun onDebug(event: DebugDataCollectEvent) {
event.title("Events")
event.addIrrelevant {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package at.hannibal2.skyhanni.config

import at.hannibal2.skyhanni.events.LorenzEvent
import at.hannibal2.skyhanni.api.event.SkyHanniEvent
import at.hannibal2.skyhanni.features.misc.limbo.LimboTimeTracker
import at.hannibal2.skyhanni.utils.LorenzLogger
import at.hannibal2.skyhanni.utils.LorenzUtils.asIntOrNull
Expand Down Expand Up @@ -30,7 +30,7 @@ object ConfigUpdaterMigrator {
val oldVersion: Int,
var movesPerformed: Int,
val dynamicPrefix: Map<String, List<String>>,
) : LorenzEvent() {
) : SkyHanniEvent() {

init {
dynamicPrefix.entries
Expand Down Expand Up @@ -141,7 +141,7 @@ object ConfigUpdaterMigrator {
it.add("lastVersion", JsonPrimitive(i + 1))
},
i, 0, dynamicPrefix
).also { it.postAndCatch() }
).also { it.post() }
logger.log("Transformations scheduled: ${migration.new}")
val mergesPerformed = merge(migration.old, migration.new)
logger.log("Migration done with $mergesPerformed merges and ${migration.movesPerformed} moves performed")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ public class GUIConfig {
@ConfigEditorBoolean
public boolean realTimeFormatToggle = false;

@Expose
@ConfigOption(name = "Real Time Show Seconds", desc = "Include the current seconds in the Real Time display.")
@ConfigEditorBoolean
public boolean realTimeShowSeconds = true;

@Expose
@ConfigLink(owner = GUIConfig.class, field = "realTime")
public Position realTimePosition = new Position(10, 10, false, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ public class ChocolateFactoryConfig {
));

@Expose
@ConfigOption(name = "Rabbit Warning", desc = "")
@ConfigOption(name = "Stray Rabbit Warning", desc = "")
@Accordion
public ChocolateFactoryRabbitWarningConfig rabbitWarning = new ChocolateFactoryRabbitWarningConfig();
public ChocolateFactoryStrayRabbitWarningConfig rabbitWarning = new ChocolateFactoryStrayRabbitWarningConfig();

@Expose
@ConfigOption(name = "Upgrade Warnings", desc = "")
@Accordion
public ChocolateUpgradeWarningsConfig chocolateUpgradeWarnings = new ChocolateUpgradeWarningsConfig();
public ChocolateFactoryUpgradeWarningsConfig chocolateUpgradeWarnings = new ChocolateFactoryUpgradeWarningsConfig();

@Expose
@ConfigOption(name = "Chocolate Shop Price", desc = "")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
package at.hannibal2.skyhanni.config.features.inventory.chocolatefactory;

import at.hannibal2.skyhanni.utils.LorenzColor;
import at.hannibal2.skyhanni.utils.OSUtils;
import com.google.gson.annotations.Expose;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorButton;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorColour;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDropdown;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider;
import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorText;
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
import io.github.notenoughupdates.moulconfig.observer.Property;
import org.jetbrains.annotations.NotNull;

public class ChocolateFactoryRabbitWarningConfig {
public class ChocolateFactoryStrayRabbitWarningConfig {

@Expose
@ConfigOption(name = "Rabbit Warning", desc = "Warn when stray rabbits of a certain tier appear.")
@ConfigOption(name = "Warning Level", desc = "Warn when stray rabbits of a certain tier appear.")
@ConfigEditorDropdown
public StrayTypeEntry rabbitWarningLevel = StrayTypeEntry.ALL;

@Expose
@ConfigOption(name = "Highlight Color", desc = "Choose the color that stray rabbits should be highlighted as.")
@ConfigEditorColour
public String inventoryHighlightColor = LorenzColor.RED.toConfigColor();

@Expose
@ConfigOption(name = "Warning Sound", desc = "The sound that plays for a special rabbit.\n" +
"§eYou can use custom sounds, put it in the §bskyhanni/sounds §efolder in your resource pack.\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;
import io.github.notenoughupdates.moulconfig.observer.Property;

public class ChocolateUpgradeWarningsConfig {
public class ChocolateFactoryUpgradeWarningsConfig {
@Expose
@ConfigOption(name = "Upgrade Warning", desc = "Chat notification when you have a chocolate factory upgrade available to purchase.")
@ConfigEditorBoolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,9 @@ public String toString() {
@Expose
@ConfigLink(owner = MiningEventConfig.class, field = "enabled")
public Position position = new Position(200, 60, false, true);

@Expose
@ConfigOption(name = "Sharing Event Data", desc = "Sending Mining Event data to a server. This allows everyone to see more precise mining event timings. Thanks for your help!")
@ConfigEditorBoolean
public boolean allowDataSharing = true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public HotspotRabbitStorage(@Nullable Integer year) {
public static class HitmanStatsStorage {
@Expose
@Nullable
public Integer availableEggs;
public Integer availableEggs = null;

@Expose
@Nullable
Expand All @@ -231,6 +231,10 @@ public static class HitmanStatsStorage {
@Expose
@Nullable
public SimpleTimeMark allSlotsCooldown = null;

@Expose
@Nullable
public Integer purchasedSlots = null;
}

@Expose
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ object BitsAPI {

fun isEnabled() = LorenzUtils.inSkyBlock && !LorenzUtils.isOnAlphaServer && profileStorage != null

@SubscribeEvent
@HandleEvent
fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
event.move(35, "#profile.bits.bitsToClaim", "#profile.bits.bitsAvailable")
}
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/at/hannibal2/skyhanni/data/ElectionAPI.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.data

import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.config.ConfigManager
import at.hannibal2.skyhanni.data.ElectionCandidate.Companion.getMayorFromPerk
import at.hannibal2.skyhanni.data.ElectionCandidate.Companion.setAssumeMayorJson
Expand Down Expand Up @@ -242,8 +243,8 @@ object ElectionAPI {

private fun List<MayorCandidate>.bestCandidate() = maxBy { it.votes }

@SubscribeEvent
fun onConfigReload(event: ConfigLoadEvent) {
@HandleEvent
fun onConfigLoad(event: ConfigLoadEvent) {
val config = SkyHanniMod.feature.dev.debug.assumeMayor
config.onToggle {
val mayor = config.get()
Expand All @@ -257,8 +258,8 @@ object ElectionAPI {
}
}

@SubscribeEvent
fun onDebugDataCollect(event: DebugDataCollectEvent) {
@HandleEvent
fun onDebug(event: DebugDataCollectEvent) {
event.title("Mayor")
event.addIrrelevant {
add("Current Mayor: ${currentMayor?.name ?: "Unknown"}")
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package at.hannibal2.skyhanni.data

import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.api.event.HandleEvent
import at.hannibal2.skyhanni.config.core.config.Position
import at.hannibal2.skyhanni.config.core.config.gui.GuiPositionEditor
import at.hannibal2.skyhanni.events.GuiPositionMovedEvent
import at.hannibal2.skyhanni.events.GuiRenderEvent
import at.hannibal2.skyhanni.events.LorenzKeyPressEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
import at.hannibal2.skyhanni.events.minecraft.KeyPressEvent
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule
import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests
import at.hannibal2.skyhanni.utils.ChatUtils
Expand Down Expand Up @@ -38,8 +39,8 @@ object GuiEditManager {
private val currentBorderSize = mutableMapOf<String, Pair<Int, Int>>()
private var lastMovedGui: String? = null

@SubscribeEvent
fun onKeyClick(event: LorenzKeyPressEvent) {
@HandleEvent
fun onKeyPress(event: KeyPressEvent) {
if (event.keyCode != SkyHanniMod.feature.gui.keyBindOpen) return
if (event.keyCode == Keyboard.KEY_RETURN) {
ChatUtils.chat("You can't use Enter as a keybind to open the gui editor!")
Expand Down Expand Up @@ -94,7 +95,7 @@ object GuiEditManager {
@JvmStatic
fun openGuiPositionEditor(hotkeyReminder: Boolean) {
SkyHanniMod.screenToOpen = GuiPositionEditor(
currentPositions.values().toList(),
currentPositions.values.toList(),
2,
Minecraft.getMinecraft().currentScreen as? GuiContainer,
)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/at/hannibal2/skyhanni/data/HotmData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ enum class HotmData(
}
}

@SubscribeEvent
@HandleEvent
fun onDebug(event: DebugDataCollectEvent) {
event.title("HotM")
event.addIrrelevant {
Expand Down
Loading

0 comments on commit 52eee48

Please sign in to comment.