Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dungeon fixes + Enchantments small fix #488

Merged
merged 6 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import gg.skytils.skytilsmod.core.structure.GuiElement
import gg.skytils.skytilsmod.events.impl.*
import gg.skytils.skytilsmod.events.impl.GuiContainerEvent.SlotClickEvent
import gg.skytils.skytilsmod.events.impl.PacketEvent.ReceiveEvent
import gg.skytils.skytilsmod.events.impl.skyblock.DungeonEvent
import gg.skytils.skytilsmod.features.impl.dungeons.catlas.handlers.DungeonInfo
import gg.skytils.skytilsmod.features.impl.handlers.MayorInfo
import gg.skytils.skytilsmod.listeners.DungeonListener
Expand Down Expand Up @@ -331,6 +332,14 @@ object DungeonFeatures {
}
}

@SubscribeEvent
fun onPuzzleReset(event: DungeonEvent.PuzzleEvent.Reset) {
if (!Utils.inDungeons) return
if (event.puzzle == "Higher Or Lower") {
blazes = 0
}
}

@SubscribeEvent(priority = EventPriority.HIGHEST, receiveCanceled = true)
fun onChat(event: ClientChatReceivedEvent) {
if (!Utils.inSkyblock || event.type == 2.toByte()) return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import gg.skytils.skytilsmod.core.GuiManager
import gg.skytils.skytilsmod.core.structure.GuiElement
import gg.skytils.skytilsmod.core.tickTimer
import gg.skytils.skytilsmod.events.impl.MainReceivePacketEvent
import gg.skytils.skytilsmod.events.impl.skyblock.DungeonEvent
import gg.skytils.skytilsmod.features.impl.dungeons.DungeonFeatures.dungeonFloorNumber
import gg.skytils.skytilsmod.features.impl.handlers.MayorInfo
import gg.skytils.skytilsmod.listeners.DungeonListener
Expand Down Expand Up @@ -453,6 +454,12 @@ object ScoreCalculation {
}
}

@SubscribeEvent
fun onPuzzleReset(event: DungeonEvent.PuzzleEvent.Reset) {
missingPuzzles.set(missingPuzzles.get() + 1)
failedPuzzles.set((failedPuzzles.get() - 1).coerceAtLeast(0))
}

@SubscribeEvent(priority = EventPriority.LOWEST)
fun canYouPleaseStopCryingThanks(event: ClientChatReceivedEvent) {
if (!Utils.inDungeons || event.type != 0.toByte()) return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -601,9 +601,13 @@ object ItemFeatures {
val enchant = EnchantUtil.enchants.find { it.nbtName == name }
val prefix: String = if (enchant != null) {
val parts = enchant.loreName.split(" ")
val joined = if (parts.size > 1) parts.joinToString("") { it[0].uppercase() } else "${
parts[0].take(3).toTitleCase()
}."
val joined = if (parts.size > 1) parts.joinToString("") { it[0].uppercase() }
else if (parts[0].startsWith("Turbo-")) "${
zealerker22 marked this conversation as resolved.
Show resolved Hide resolved
parts[0].split("-")[1].take(3).toTitleCase()
}."
else "${
parts[0].take(3).toTitleCase()
}."
if (enchant.nbtName.startsWith("ultimate")) {
"§d§l${joined}"
} else joined
Expand Down
Binary file modified src/main/resources/assets/catlas/default/green_check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/assets/catlas/default/white_check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading