Skip to content

Commit

Permalink
Merge branch 'hannibal002:beta' into wherewillibe
Browse files Browse the repository at this point in the history
  • Loading branch information
RayDeeUx authored May 26, 2024
2 parents b8bef53 + e78e440 commit c9ab14b
Show file tree
Hide file tree
Showing 48 changed files with 302 additions and 74 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.idea/*
!.idea/icon.svg
!.idea/dictionaries/default_user.xml
.vscode/
run/
build/
Expand Down
190 changes: 190 additions & 0 deletions .idea/dictionaries/default_user.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/main/java/at/hannibal2/skyhanni/config/ConfigManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class ConfigManager {
}
}

// Some position elements dont need config links as they dont have a config option.
// Some position elements don't need config links as they don't have a config option.
private val ignoredMissingConfigLinks = listOf(
// commands
"features.garden.GardenConfig.cropSpeedMeterPos",
Expand Down Expand Up @@ -292,7 +292,7 @@ class ConfigManager {
run()
} catch (e: Throwable) {
e.printStackTrace()
LorenzUtils.shutdownMinecraft("Config is corrupt inside developement enviroment.")
LorenzUtils.shutdownMinecraft("Config is corrupt inside development environment.")
}
} else {
run()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ public class FilterTypesConfig {
@FeatureToggle
public boolean factoryUpgrade = false;

@Expose
@ConfigOption(name = "Sacrifice", desc = "Hide sacrifice messages of other players.")
@ConfigEditorBoolean
@FeatureToggle
public boolean sacrifice = false;


//TODO remove
@Expose
@ConfigOption(name = "Others", desc = "Hide other annoying messages.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
import io.github.notenoughupdates.moulconfig.annotations.ConfigOption;

public class MessageFilterConfig {
@Expose
@ConfigOption(name = "Rare Drops", desc = "Hides the chat message when other players get rare drops from chests.")
@ConfigEditorBoolean
@FeatureToggle
public boolean rareDrops = false;

@Expose
@ConfigOption(name = "Keys and Doors", desc = "Hides the chat message when picking up keys or opening doors in Dungeons.")
@ConfigEditorBoolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class BarnTimerConfig {
public boolean wormLimitAlert = true;

@Expose
@ConfigOption(name = "Reset Timer Hotkey", desc = "Press this key to reset the timer manualy")
@ConfigOption(name = "Reset Timer Hotkey", desc = "Press this key to reset the timer manually.")
@ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE)
public int manualResetTimer = Keyboard.KEY_NONE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ public class ChocolateFactoryConfig {
public Position position = new Position(163, 160, false, true);

@Expose
@ConfigOption(name = "Compact On Click", desc = "Compact the item toolip when clicking on the chocolate.")
@ConfigOption(name = "Compact On Click", desc = "Compact the item tooltip when clicking on the chocolate.")
@ConfigEditorBoolean
@FeatureToggle
public boolean compactOnClick = true;

@Expose
@ConfigOption(name = "Always Compact", desc = "Always Compact the item toolip on the chocolate. Requires the above option to be enabled.")
@ConfigOption(name = "Always Compact", desc = "Always Compact the item tooltip on the chocolate. Requires the above option to be enabled.")
@ConfigEditorBoolean
public boolean compactOnClickAlways = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
public class TiaRelayConfig {

@Expose
@ConfigOption(name = "Sound Puzzle Helper", desc = "Helps with solving the sound puzzle for Tia (The 9 Operator Chips to do maintainance for the Abiphone Network).")
@ConfigOption(name = "Sound Puzzle Helper", desc = "Helps with solving the sound puzzle for Tia (The 9 Operator Chips to do maintenance for the Abiphone Network).")
@ConfigEditorBoolean
@FeatureToggle
public boolean soundHelper = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public class ChickenHeadConfig {

@Expose
@ConfigOption(name = "Checken Head Timer", desc = "Show the cooldown until the next time you can lay an egg with the Chicken Head.")
@ConfigOption(name = "Chicken Head Timer", desc = "Show the cooldown until the next time you can lay an egg with the Chicken Head.")
@ConfigEditorBoolean
@FeatureToggle
public boolean displayTimer = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public String toString() {
public boolean useLevelColorForName = false;

@Expose
@ConfigOption(name = "Bingo Rank Number", desc = "Show the number of the bingo rank next to the icon. Useful if you are not so familar with bingo.")
@ConfigOption(name = "Bingo Rank Number", desc = "Show the number of the bingo rank next to the icon. Useful if you are not so familiar with bingo.")
@ConfigEditorBoolean
public boolean showBingoRankNumber = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class ArrowTrailConfig {
public boolean enabled = false;

@Expose
@ConfigOption(name = "Hide Nonplayer Arrows", desc = "Only shows for arrows the player has shot.")
@ConfigOption(name = "Hide Non-player Arrows", desc = "Only shows for arrows the player has shot.")
@ConfigEditorBoolean
public boolean hideOtherArrows = true;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ object QuiverAPI {
"(?:§.)*You've added (?:§.)*(?<type>.*) x(?<amount>.*) (?:§.)*to your quiver!"
)

// Bows that don't use the players arrows, checked using the SkyBlock Id
// Bows that don't use the players arrows, checked using the SkyBlock ID
private val fakeBowsPattern by group.pattern("fakebows", "^(BOSS_SPIRIT_BOW|CRYPT_BOW)$")
private val quiverInventoryNamePattern by group.pattern("quivername", "^Quiver$")
private val quiverInventoryPattern by group.pattern(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ object HypixelBazaarFetcher {
}

if (internalName.getItemStackOrNull() == null) {
// Items that exist in Hypixel's Bazaar API, but not in NEU repo (not visible in in the ingame bazaar).
// Items that exist in Hypixel's Bazaar API, but not in NEU repo (not visible in the ingame bazaar).
// Should only include Enchants
if (LorenzUtils.debug)
println("Unknown bazaar product: $key/$internalName")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ object BingoAPI {
add(" guide: '${goal.guide}'")
add(" done: '${goal.done}'")
add(" highlight: '${goal.highlight}'")
add(" communtyGoalPercentage: '${goal.communtyGoalPercentage}'")
add(" communityGoalPercentage: '${goal.communtyGoalPercentage}'")
val hiddenGoalData = goal.hiddenGoalData
add(" hiddenGoalData")
add(" unknownTip: '${hiddenGoalData.unknownTip}'")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class BingoGoal {
lateinit var hiddenGoalData: HiddenGoalData

@Expose
var communtyGoalPercentage: Double? = null
var communtyGoalPercentage: Double? = null // TODO fix typo (Needs changes inside of storage)

override fun toString(): String = displayName
}
19 changes: 19 additions & 0 deletions src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,14 @@ class ChatFilter {
"§7You will now produce §r§6.* Chocolate §r§7per click!".toPattern(),
"§7You upgraded to §r§d.*?§r§7!".toPattern(),
)
/**
* REGEX-TEST: §c§lSACRIFICE! §r§6[MVP§r§d++§r§6] Mikecraft1224§r§f §r§eturned §r§6Young Dragon Boots §r§einto §r§d40 Dragon Essence§r§e!
* REGEX-TEST: §c§lBONUS LOOT! §r§eThey also received §r§5Ritual Residue §r§efrom their sacrifice!
*/
private val sacrificePatterns = listOf(
"§c§lSACRIFICE! (.*) §r§eturned (.*) §r§einto (.*) Dragon Essence§r§e!".toPattern(),
"§c§lBONUS LOOT! §r§eThey also received (.*) §r§efrom their sacrifice!".toPattern()
)
private val powderMiningMessages = listOf(
"§aYou uncovered a treasure chest!",
"§aYou received §r§f1 §r§aWishing Compass§r§a.",
Expand All @@ -372,6 +380,13 @@ class ChatFilter {
"▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬",
)

/**
* REGEX-TEST: §6§lRARE REWARD! §r§bLeebys §r§efound a §r§6Recombobulator 3000 §r§ein their Obsidian Chest§r§e!
*/
private val rareDropsMessages = listOf(
"§6§lRARE REWARD! (.*) §r§efound a (.*) §r§ein their (.*) Chest§r§e!".toPattern()
)

// &r&6Your &r&aMage &r&6stats are doubled because you are the only player using this class!&r
private val soloClassPatterns = listOf(
"§6Your §r§a(Healer|Mage|Berserk|Archer|Tank) §r§6stats are doubled because you are the only player using this class!".toPattern()
Expand Down Expand Up @@ -405,6 +420,8 @@ class ChatFilter {
"fire_sale" to fireSalePatterns,
"event" to eventPatterns,
"factory_upgrade" to factoryUpgradePatterns,
"sacrifice" to sacrificePatterns,
"rare_drops" to rareDropsMessages,
"solo_class" to soloClassPatterns,
"solo_stats" to soloStatsPatterns,
"fairy" to fairyPatterns,
Expand Down Expand Up @@ -465,8 +482,10 @@ class ChatFilter {
config.eventLevelUp && (message.isPresent("event") || StringUtils.isEmpty(message)) -> "event"
config.fireSale && (fireSalePattern.matches(message) || message.isPresent("fire_sale")) -> "fire_sale"
config.factoryUpgrade && message.isPresent("factory_upgrade") -> "factory_upgrade"
config.sacrifice && message.isPresent("sacrifice") -> "sacrifice"
generalConfig.hideJacob && !GardenAPI.inGarden() && anitaFortunePattern.matches(message) -> "jacob_event"
generalConfig.hideSkyMall && !LorenzUtils.inMiningIsland() && skymallPerkPattern.matches(message) -> "skymall"
dungeonConfig.rareDrops && message.isPresent("rare_drops") -> "rare_drops"
dungeonConfig.soloClass && DungeonAPI.inDungeon() && message.isPresent("solo_class") -> "solo_class"
dungeonConfig.soloStats && DungeonAPI.inDungeon() && message.isPresent("solo_stats") -> "solo_stats"
dungeonConfig.fairy && DungeonAPI.inDungeon() && message.isPresent("fairy") -> "fairy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.net.URLDecoder
import java.net.URLEncoder

// TODO split into two classes: TranslatorCommand and GoogleTransaltor. only communicates via getTranslationFromEnglish and getTranslationToEnglish
// TODO split into two classes: TranslatorCommand and GoogleTranslator. only communicates via getTranslationFromEnglish and getTranslationToEnglish
class Translator {

private val messageContentRegex = Regex(".*: (.*)")
Expand Down
Loading

0 comments on commit c9ab14b

Please sign in to comment.