From a7d9fd3854afc79b9bef65339ec0f228131286fd Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sat, 2 Mar 2024 23:32:56 +0100 Subject: Added bingo card data to /shdebug. --- .../hannibal2/skyhanni/features/bingo/BingoAPI.kt | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt index 037233772..fc884c91d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt @@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.config.Storage.PlayerSpecific.BingoSession import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.data.jsonobjects.repo.BingoJson import at.hannibal2.skyhanni.data.jsonobjects.repo.BingoRanksJson +import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.features.bingo.card.goals.BingoGoal import at.hannibal2.skyhanni.features.bingo.card.goals.GoalType @@ -32,6 +33,37 @@ object BingoAPI { " §.Ⓑ §.Bingo" ) + @SubscribeEvent + fun onDebugDataCollect(event: DebugDataCollectEvent) { + event.title("Bingo Card") + + if (!LorenzUtils.isBingoProfile) { + event.addIrrelevant("not on bingo") + return + } + + event.addData { + add("bingoGoals: ${bingoGoals.size}") + for (bingoGoal in bingoGoals) { + val goal = bingoGoal.value + add(" type: '${goal.type}'") + add(" displayName: '${goal.displayName}'") + add(" description: '${goal.description}'") + add(" guide: '${goal.guide}'") + add(" done: '${goal.done}'") + add(" highlight: '${goal.highlight}'") + add(" communtyGoalPercentage: '${goal.communtyGoalPercentage}'") + val hiddenGoalData = goal.hiddenGoalData + add(" hiddenGoalData") + add(" unknownTip: '${hiddenGoalData.unknownTip}'") + add(" nextHintTime: '${hiddenGoalData.nextHintTime}'") + add(" tipNote: '${hiddenGoalData.tipNote}'") + add(" ") + + } + } + } + @SubscribeEvent fun onRepoReload(event: RepositoryReloadEvent) { ranks = event.getConstant("BingoRanks").ranks -- cgit