Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/beta' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
RayDeeUx committed Nov 4, 2023
2 parents c9c7249 + 95e0487 commit 4f041a9
Show file tree
Hide file tree
Showing 21 changed files with 408 additions and 249 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
+ Highlights Visitors outside the Garden.
+ Block Interacting with Visitors. - nea
+ Blocks you from interacting with / unlocking Visitors to allow for Dedication Cycling.
+ Added command /shpumpkin to toggle include/exclude Expired Pumpkin farming fortune in the /ff GUI and in the true ff display. - CalMWolfs
+ Added auto-detection of Expired Pumpkin farming fortune. - CalMWolfs

#### Events

Expand Down Expand Up @@ -138,6 +140,11 @@
+ Makes the Compact Potion message open the Potion effects menu on click. - jani
+ Added option to show King Talisman Helper outside Dwarven Mines. - hannibal2
+ In-Game Date: Adds support for reading the in-game scoreboard, and also allow sun/moon symbol customization. - Erymanthus
+ Added Estimated Item Value support to NEU Profile Viewer - hannibal2
+ Added support to import SBE Visual Words into SkyHanni. - HiZe
+ Add custom keybinds for Harp Helper. - Thunderblade73
+ Show the custom hotkey name in the Harp inventory. - hannibal2
+ Added a GUI element to remind you while /shmouselock is enabled. - CalMWolfs

### Bug Fixes

Expand Down Expand Up @@ -207,6 +214,8 @@
+ Reset mouse sensitivity back to 100% if you log off with lock mouse look enabled. - hannibal2
+ Fixed mouse sensitivity stuck after restarting by storing old sensitivity. - CalMWolfs
+ Fixed tool fortune. - CalMWolfs
+ Fixed Item Ability Cooldown display not activating for Sword of Bad Health. - hannibal2
+ Fixed the crop name gets replaced to internal name in /shwords. - hannibal2

#### Config

Expand All @@ -233,6 +242,7 @@
+ Adding 100 lines to MobFinder.kt and making it better readable in the process. - walker
+ Making ChatFiler.kt way better, storing regex objects for reuse and preparing future repo support. - walker
+ Added command /shkingfix to reset the internal King Talisman Helper offset. - hannibal2
+ Updated dependency version of junixsocket in DiscordIPC so that antivirus websites no longer show false positives. - NetheriteMiner

## Version 0.20

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ folder for how to properly do this. You also may have to disable repo auto updat
### Discord IPC

DiscordIPC is a service that SkyHanni uses to send information from SkyBlock to Discord in Rich Presence. <br>
Specifically, we use [TirelessTraveler's Fork](https://github.com/ILikePlayingGames/DiscordIPC) of a fork of a fork of
Specifically, we use [NetheriteMiner's Fork](https://github.com/NetheriteMiner/DiscordIPC) of a fork of a fork of a fork of
the [original](https://github.com/jagrosh/DiscordIPC).
For info on usage, look
at [DiscordRPCManager.kt](https://github.com/hannibal002/SkyHanni/blob/beta/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt)
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {
}

group = "at.hannibal2.skyhanni"
version = "0.21.Beta.17"
version = "0.21.Beta.18"

// Toolchains:
java {
Expand Down Expand Up @@ -57,7 +57,7 @@ dependencies {
forge("net.minecraftforge:forge:1.8.9-11.15.1.2318-1.8.9")

// Discord RPC client
shadowImpl("com.github.ILikePlayingGames:DiscordIPC:f91ed4b") {
shadowImpl("com.github.NetheriteMiner:DiscordIPC:3106be5") {
exclude(module = "log4j")
because("Different version conflicts with Minecraft's Log4J")
exclude(module = "gson")
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ import org.apache.logging.log4j.Logger
clientSideOnly = true,
useMetadata = true,
guiFactory = "at.hannibal2.skyhanni.config.ConfigGuiForgeInterop",
version = "0.21.Beta.17",
version = "0.21.Beta.18",
)
class SkyHanniMod {
@Mod.EventHandler
Expand Down Expand Up @@ -607,7 +607,7 @@ class SkyHanniMod {
loadModule(GriffinPetWarning())
loadModule(BestiaryData)
loadModule(KingTalismanHelper())
loadModule(HarpFeatures())
loadModule(HarpFeatures)
loadModule(EnderNodeTracker())
loadModule(CompactBestiaryChatMessage())
loadModule(WatchdogHider())
Expand Down
30 changes: 2 additions & 28 deletions src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package at.hannibal2.skyhanni.config

import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.features.fishing.trophy.TrophyRarity
import at.hannibal2.skyhanni.features.garden.CropType
import at.hannibal2.skyhanni.features.misc.update.UpdateManager
import at.hannibal2.skyhanni.utils.LorenzLogger
import at.hannibal2.skyhanni.utils.LorenzRarity
Expand Down Expand Up @@ -126,16 +125,9 @@ class ConfigManager {
try {
val inputStreamReader = InputStreamReader(FileInputStream(configFile!!), StandardCharsets.UTF_8)
val bufferedReader = BufferedReader(inputStreamReader)
val builder = StringBuilder()
for (line in bufferedReader.lines()) {
val result = fixConfig(line)
builder.append(result)
builder.append("\n")
}


logger.log("load-config-now")
val jsonObject = gson.fromJson(builder.toString(), JsonObject::class.java)
val jsonObject = gson.fromJson(bufferedReader.readText(), JsonObject::class.java)
val newJsonObject = ConfigUpdaterMigrator.fixConfig(jsonObject)
features = gson.fromJson(
newJsonObject,
Expand All @@ -160,16 +152,10 @@ class ConfigManager {
try {
val inputStreamReader = InputStreamReader(FileInputStream(sackFile!!), StandardCharsets.UTF_8)
val bufferedReader = BufferedReader(inputStreamReader)
val builder = StringBuilder()
for (line in bufferedReader.lines()) {
builder.append(line)
builder.append("\n")
}


logger.log("load-sacks-now")
sackData = gson.fromJson(
builder.toString(),
bufferedReader.readText(),
SackData::class.java
)
logger.log("Loaded sacks from file")
Expand Down Expand Up @@ -205,18 +191,6 @@ class ConfigManager {
)
}

private fun fixConfig(line: String): String {
var result = line
for (type in CropType.entries) {
val normal = "\"${type.cropName}\""
val enumName = "\"${type.name}\""
while (result.contains(normal)) {
result = result.replace(normal, enumName)
}
}
return result
}

fun saveConfig(reason: String) {
if (disableSaving) return
logger.log("saveConfig: $reason")
Expand Down
44 changes: 25 additions & 19 deletions src/main/java/at/hannibal2/skyhanni/config/Storage.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public class Storage {
@Expose
public List<VisualWord> modifiedWords = new ArrayList<>();

@Expose
public boolean visualWordsImported = false;

@Expose
public Boolean contestSendingAsked = false;

Expand Down Expand Up @@ -89,9 +92,9 @@ public static class MinionConfig {
@Override
public String toString() {
return "MinionConfig{" +
"displayName='" + displayName + '\'' +
", lastClicked=" + lastClicked +
'}';
"displayName='" + displayName + '\'' +
", lastClicked=" + lastClicked +
'}';
}
}

Expand Down Expand Up @@ -247,6 +250,9 @@ public static class Fortune {
@Expose
public boolean carrotFortune = false;

@Expose
public boolean pumpkinFortune = false;

@Expose
public Map<FarmingItems, ItemStack> farmingItems = new HashMap<>();
}
Expand Down Expand Up @@ -374,22 +380,22 @@ public static class SlayerItemProfit {
@Override
public String toString() {
return "SlayerItemProfit{" +
"internalName='" + internalName + '\'' +
", timesDropped=" + timesDropped +
", totalAmount=" + totalAmount +
", hidden=" + hidden +
'}';
"internalName='" + internalName + '\'' +
", timesDropped=" + timesDropped +
", totalAmount=" + totalAmount +
", hidden=" + hidden +
'}';
}
}

@Override
public String toString() {
return "SlayerProfitList{" +
"items=" + items +
", mobKillCoins=" + mobKillCoins +
", slayerSpawnCost=" + slayerSpawnCost +
", slayerCompletedCount=" + slayerCompletedCount +
'}';
"items=" + items +
", mobKillCoins=" + mobKillCoins +
", slayerSpawnCost=" + slayerSpawnCost +
", slayerCompletedCount=" + slayerCompletedCount +
'}';
}
}

Expand All @@ -413,11 +419,11 @@ public static class SlayerRngMeterStorage {
@Override
public String toString() {
return "SlayerRngMeterStorage{" +
"currentMeter=" + currentMeter +
", gainPerBoss=" + gainPerBoss +
", goalNeeded=" + goalNeeded +
", itemGoal='" + itemGoal + '\'' +
'}';
"currentMeter=" + currentMeter +
", gainPerBoss=" + gainPerBoss +
", goalNeeded=" + goalNeeded +
", itemGoal='" + itemGoal + '\'' +
'}';
}
}

Expand Down Expand Up @@ -448,7 +454,7 @@ public static class TrapperData {
public int selfKillingAnimals;

@Expose
public Map<TrevorTracker.TrapperMobRarity, Integer> animalRarities= new HashMap<>();
public Map<TrevorTracker.TrapperMobRarity, Integer> animalRarities = new HashMap<>();
}

@Expose
Expand Down
13 changes: 9 additions & 4 deletions src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ object Commands {
registerCommand(
"shcopytranslation",
"<language code (2 letters)> <messsage to translate>\n" +
"Requires the Chat > Translator feature to be enabled.\n" +
"Copies the translation for a given message to your clipboard. " +
"Language codes are at the end of the translation when you click on a message."
"Requires the Chat > Translator feature to be enabled.\n" +
"Copies the translation for a given message to your clipboard. " +
"Language codes are at the end of the translation when you click on a message."
) { Translator.fromEnglish(it) }
registerCommand(
"shmouselock",
Expand Down Expand Up @@ -215,6 +215,10 @@ object Commands {
"shcarrot",
"Toggles receiving the 12 fortune from carrots"
) { CaptureFarmingGear.reverseCarrotFortune() }
registerCommand(
"shpumpkin",
"Toggles receiving the 12 fortune from pumpkins"
) { CaptureFarmingGear.reversePumpkinFortune() }
registerCommand(
"shrepostatus",
"Shows the status of all the mods constants"
Expand Down Expand Up @@ -368,6 +372,7 @@ object Commands {
if (!LorenzUtils.onHypixel) {
LorenzUtils.chat("§cYou need to join Hypixel to use this feature!")
} else {
if (VisualWordGui.sbeConfigPath.exists()) VisualWordGui.drawImport = true
SkyHanniMod.screenToOpen = VisualWordGui()
}
}
Expand All @@ -388,7 +393,7 @@ object Commands {
name: String,
description: String,
function: (Array<String>) -> Unit,
autoComplete: ((Array<String>) -> List<String>) = { listOf() }
autoComplete: ((Array<String>) -> List<String>) = { listOf() },
) {
val command = SimpleCommand(
name,
Expand Down
Loading

0 comments on commit 4f041a9

Please sign in to comment.