Skip to content

Commit

Permalink
Minor logging improvements to deck management view
Browse files Browse the repository at this point in the history
  • Loading branch information
4Ply committed Dec 28, 2024
1 parent f669727 commit 389a80e
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ open class DeckInventoryView : DeckManagementView() {
.filterNot { it.preventRemoval() } // Keep these items in the shulker
.filter { it.getDeckId() != deckId || (!it.canTakeIntoDungeon() && !it.isDeckedOutCard()) }
.forEach { item: ItemStack ->
plugin[event].logger.info("Inventory contains: ${item.type}x${item.amount} - returning it to player")
plugin[event].logger.info("Inventory contains: ${item.type}x${item.amount} - returning it to ${player.name}")
player.inventory.addItem(item)
}

Expand All @@ -73,7 +73,7 @@ open class DeckInventoryView : DeckManagementView() {
.onEach { pair: Pair<Cards.Companion.Card, Int> ->
val card = pair.first
val amount = pair.second
plugin[event].logger.info("Player's inventory contains ${amount}x${card.name} - hiding it from Deck $deckId")
plugin[event].logger.info("${player.name}'s inventory contains ${amount}x${card.name} - hiding it from Deck $deckId")
}
.associate {
it.first.key to it.second
Expand All @@ -92,14 +92,14 @@ open class DeckInventoryView : DeckManagementView() {
.onEach { pair: Pair<String, Int> ->
val tradeId = pair.first
val amount = pair.second
plugin[event].logger.info("Player's inventory contains ${amount}x${tradeId} - hiding it from Deck $deckId")
plugin[event].logger.info("${player.name}'s inventory contains ${amount}x${tradeId} - hiding it from Deck $deckId")
}
.associate {
it.first to it.second
}
cardsToHide = cardsToHide.plus(itemsToHide)

plugin[event].logger.info("Updating deck visibility for Deck ID #${deckId}, hiding: ${cardsToHide.map { "${it.value}x${it.key.uppercase()}" }}")
plugin[event].logger.info("Updating deck visibility for Deck ID #${deckId} for ${player.name}, hiding: ${cardsToHide.map { "${it.value}x${it.key.uppercase()}" }}")
updateCardVisibilityFunc[event].accept(deckId, cardsToHide)
}

Expand Down

0 comments on commit 389a80e

Please sign in to comment.