forked from hannibal002/SkyHanni
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvement: Custom Scoreboard Refactor (hannibal002#2162)
Co-authored-by: CalMWolfs <[email protected]> Co-authored-by: J10a1n15 <[email protected]> Co-authored-by: Empa <[email protected]> Co-authored-by: Cal <[email protected]> Co-authored-by: hannibal2 <[email protected]> Co-authored-by: ItsEmpa <[email protected]>
- Loading branch information
1 parent
ead1f9e
commit 83efbb3
Showing
94 changed files
with
2,403 additions
and
1,883 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
package at.hannibal2.skyhanni.data | ||
|
||
import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland | ||
import at.hannibal2.skyhanni.utils.TimeUtils | ||
import java.time.Month | ||
|
||
object WinterAPI { | ||
|
||
fun inWorkshop() = IslandType.WINTER.isInIsland() | ||
|
||
fun isDecember() = TimeUtils.getCurrentLocalDate().month == Month.DECEMBER | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 18 additions & 3 deletions
21
src/main/java/at/hannibal2/skyhanni/features/combat/SpidersDenAPI.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,26 @@ | ||
package at.hannibal2.skyhanni.features.combat | ||
|
||
import at.hannibal2.skyhanni.data.IslandType | ||
import at.hannibal2.skyhanni.data.ScoreboardData | ||
import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardPattern | ||
import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule | ||
import at.hannibal2.skyhanni.utils.RegexUtils.matches | ||
import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland | ||
import at.hannibal2.skyhanni.utils.RegexUtils.anyMatches | ||
import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern | ||
|
||
@SkyHanniModule | ||
object SpidersDenAPI { | ||
fun isAtTopOfNest(): Boolean = ScoreboardData.sidebarLinesFormatted.any { ScoreboardPattern.broodmotherPattern.matches(it) } | ||
|
||
private val repoGroup = RepoPattern.group("combat.spidersden") | ||
|
||
/** | ||
* REGEX-TEST: §4Broodmother§7: §6Soon | ||
*/ | ||
val broodmotherPattern by repoGroup.pattern( | ||
"broodmother", | ||
"§4Broodmother§7: §[e64](?:Slain|Dormant|Soon|Awakening|Imminent|Alive!)", | ||
) | ||
|
||
fun inSpidersDen() = IslandType.SPIDER_DEN.isInIsland() | ||
|
||
fun isAtTopOfNest() = inSpidersDen() && broodmotherPattern.anyMatches(ScoreboardData.sidebarLinesFormatted) | ||
} |
Oops, something went wrong.