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 Score improvements (on another branch) #490

Open
wants to merge 34 commits into
base: 2.x-legacyfabricexp
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a469fbe
refactor the class for clarity
Desco1 Jun 11, 2024
dd9c0fa
sorta functional min and can skip secrets
Desco1 Jun 27, 2024
c26cfe3
fix for max secrets and rerolled puzzles
Desco1 Jun 29, 2024
2bb3de4
chest profit render fix
Desco1 Jun 29, 2024
dc548ec
sa boots fix (and maybe others)
Desco1 Jun 30, 2024
a108b41
feat: make all dungeon solver colors customizable (#487)
Coccocoahelper Jul 6, 2024
309dcc2
puzzle display
Desco1 Jul 11, 2024
4886594
reset blaze done on puzzle reroll
Desco1 Jul 11, 2024
70867d7
remove unused setting
Desco1 Jul 11, 2024
7cb8751
only marginally more readable
Desco1 Jul 11, 2024
941a1d7
Merge branch 'Skytils:dev' into dev
Desco1 Jul 11, 2024
17c6efe
Merge branch 'refs/heads/dev' into 2.x-legacyfabricexp
Desco1 Jul 13, 2024
132c3d5
migrate ScoreCalculation to custom event system
Desco1 Jul 15, 2024
eb88d6c
Merge branch 'Skytils:2.x-legacyfabricexp' into 2.x-legacyfabricexp
Desco1 Jul 15, 2024
13c5152
refactor the class for clarity
Desco1 Jun 11, 2024
d4aed9c
sorta functional min and can skip secrets
Desco1 Jun 27, 2024
bfeabe4
fix for max secrets and rerolled puzzles
Desco1 Jun 29, 2024
2dfe29d
chest profit render fix
Desco1 Jun 29, 2024
ab6adc5
sa boots fix (and maybe others)
Desco1 Jun 30, 2024
87c2388
puzzle display
Desco1 Jul 11, 2024
dd8193d
reset blaze done on puzzle reroll
Desco1 Jul 11, 2024
4d6d7bf
remove unused setting
Desco1 Jul 11, 2024
f0f6742
only marginally more readable
Desco1 Jul 11, 2024
e24f73d
feat: make all dungeon solver colors customizable (#487)
Coccocoahelper Jul 6, 2024
42207b2
migrate ScoreCalculation to custom event system
Desco1 Jul 15, 2024
60b03f2
delay paul check
Desco1 Jul 22, 2024
f0fec1e
Merge branch 'Skytils:2.x-legacyfabricexp' into 2.x-legacyfabricexp
Desco1 Jul 22, 2024
a8fb3f9
Merge remote-tracking branch 'origin/2.x-legacyfabricexp' into 2.x-le…
Desco1 Jul 22, 2024
7d9becc
enable dungeon status/breakdown by default
Desco1 Aug 11, 2024
d1c033d
improve readability again
Desco1 Aug 11, 2024
ac6d6bb
Merge branch '2.x-legacyfabricexp' into 2.x-legacyfabricexp
Desco1 Aug 11, 2024
29ae4ba
actually resolve conflict
Desco1 Aug 11, 2024
183f54e
fix wrong event on blaze done
Desco1 Aug 11, 2024
6313b4c
don't detect reset puzzles twice
Desco1 Aug 11, 2024
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
2 changes: 1 addition & 1 deletion mod/src/main/kotlin/gg/skytils/skytilsmod/Skytils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ object Skytils : CoroutineScope, EventSubscriber {
NamespacedCommands,
DamageSplash,
Funny,
ScoreCalculation,
).forEach(MinecraftForge.EVENT_BUS::register)

arrayOf(
Expand Down Expand Up @@ -365,6 +364,7 @@ object Skytils : CoroutineScope, EventSubscriber {
RandomStuff,
RelicWaypoints,
ScamCheck,
ScoreCalculation,
SelectAllColorSolver,
ServerPayloadInterceptor,
ShootTheTargetSolver,
Expand Down
21 changes: 14 additions & 7 deletions mod/src/main/kotlin/gg/skytils/skytilsmod/core/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,18 @@ object Config : Vigilant(
var showScoreCalculation = false

@Property(
type = PropertyType.SWITCH, name = "Minimized Dungeon Score Estimate",
description = "Only shows the dungeon score.",
category = "Dungeons", subcategory = "Score Calculation",
i18nName = "skytils.config.dungeons.score_calculation.minimized_dungeon_score_estimate",
i18nCategory = "skytils.config.dungeons",
i18nSubcategory = "skytils.config.dungeons.score_calculation"
type = PropertyType.SWITCH, name = "Show Dungeon Status",
description = "Shows information about the current dungeon run that affects its score. Disabling this will minimize the dungeon score.",
category = "Dungeons", subcategory = "Score Calculation"
)
var minimizedScoreCalculation = false
var showDungeonStatus = true

@Property(
type = PropertyType.SWITCH, name = "Dungeon Score Breakdown",
description = "Shows every score category as opposed to only total score.",
category = "Dungeons", subcategory = "Score Calculation"
)
var showScoreBreakdown = true

@Property(
type = PropertyType.SWITCH, name = "Score Calculation Party Assist",
Expand Down Expand Up @@ -4370,6 +4374,9 @@ object Config : Vigilant(
addDependency("kuudraChestProfitIncludesEssence", "kuudraChestProfit")
addDependency("kuudraChestProfitCountsKey", "kuudraChestProfit")

addDependency("showDungeonStatus", "showScoreCalculation")
addDependency("showScoreBreakdown", "showScoreCalculation")

addDependency("message270Score", "sendMessageOn270Score")
addDependency("messageTitle270Score", "createTitleOn270Score")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,8 @@ object DungeonChestProfit : EventSubscriber {
GlStateManager.pushMatrix()
GlStateManager.translate(
(-(event.gui as AccessorGuiContainer).guiLeft).toDouble(),
-(event.gui as AccessorGuiContainer).guiTop.toDouble(),
299.0
)
-(event.gui as AccessorGuiContainer).guiTop.toDouble() + DungeonChest.entries.count { it.items.isNotEmpty() } * ScreenRenderer.fontRenderer.FONT_HEIGHT,
299.0)
drawChestProfit(chestType)
GlStateManager.popMatrix()
} else if (croesusChestRegex.matches(event.chestName)) {
Expand Down Expand Up @@ -181,7 +180,7 @@ object DungeonChestProfit : EventSubscriber {
} else {
val unformatted = name.stripControlCodes().replace("Shiny ", "")
ItemFeatures.itemIdToNameLookup.entries.find {
it.value == unformatted && !it.value.contains("STARRED")
it.value == unformatted && !it.key.contains("STARRED")
}?.key
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ import gg.skytils.event.register
import gg.skytils.skytilsmod.Skytils
import gg.skytils.skytilsmod.Skytils.mc
import gg.skytils.skytilsmod.Skytils.prefix
import gg.skytils.skytilsmod._event.DungeonPuzzleResetEvent
import gg.skytils.skytilsmod._event.MainThreadPacketReceiveEvent
import gg.skytils.skytilsmod._event.PacketReceiveEvent
import gg.skytils.skytilsmod._event.PacketSendEvent
import gg.skytils.skytilsmod.core.GuiManager
import gg.skytils.skytilsmod.core.structure.GuiElement
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 @@ -104,7 +104,7 @@ object DungeonFeatures : EventSubscriber {
private var lastLitUpTime = -1L
private val lastBlockPos = BlockPos(7, 77, 34)
private var startWithoutFullParty = false
private var blazes = 0
var blazes = 0
var hasClearedText = false
private var terracottaSpawns = hashMapOf<BlockPos, Long>()
private val dungeonMobSpawns = setOf(
Expand Down Expand Up @@ -342,7 +342,7 @@ object DungeonFeatures : EventSubscriber {
}
}

fun onPuzzleReset(event: DungeonEvent.PuzzleEvent.Reset) {
fun onPuzzleReset(event: DungeonPuzzleResetEvent) {
if (!Utils.inDungeons) return
if (event.puzzle == "Higher Or Lower") {
blazes = 0
Expand Down
Loading
Loading