aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-08-08 02:38:12 +0200
committerLinnea Gräf <nea@nea.moe>2024-08-08 02:38:12 +0200
commit71d0db252641a5cefa55c6af133d7a3631b06b88 (patch)
tree26db2d62ec0bc4cb0859393599c3d700200caba2 /src/main/kotlin/moe/nea
parent325ea569894695186a69d5db2bcded25b1cf705a (diff)
downloadFirmament-71d0db252641a5cefa55c6af133d7a3631b06b88.tar.gz
Firmament-71d0db252641a5cefa55c6af133d7a3631b06b88.tar.bz2
Firmament-71d0db252641a5cefa55c6af133d7a3631b06b88.zip
Fix pet numbers not showing in item list
Diffstat (limited to 'src/main/kotlin/moe/nea')
-rw-r--r--src/main/kotlin/moe/nea/firmament/rei/SBItemEntryDefinition.kt8
-rw-r--r--src/main/kotlin/moe/nea/firmament/repo/RepoManager.kt2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/rei/SBItemEntryDefinition.kt b/src/main/kotlin/moe/nea/firmament/rei/SBItemEntryDefinition.kt
index 780fd78..5c6740e 100644
--- a/src/main/kotlin/moe/nea/firmament/rei/SBItemEntryDefinition.kt
+++ b/src/main/kotlin/moe/nea/firmament/rei/SBItemEntryDefinition.kt
@@ -54,7 +54,7 @@ data class PetData(
val levelData by lazy { ExpLadders.getExpLadder(petId, rarity).getPetLevel(exp) }
}
-data class SBItemStack(
+data class SBItemStack constructor(
val skyblockId: SkyblockId,
val neuItem: NEUItem?,
private var stackSize: Int,
@@ -133,7 +133,8 @@ data class SBItemStack(
return@run ItemCache.coinItem(stackSize).also { it.appendLore(extraLore) }
val replacementData = mutableMapOf<String, String>()
injectReplacementDataForPets(replacementData)
- return@run neuItem.asItemStack(idHint = skyblockId, replacementData).copyWithCount(stackSize)
+ return@run neuItem.asItemStack(idHint = skyblockId, replacementData)
+ .copyWithCount(stackSize)
.also { it.appendLore(extraLore) }
.also { enhanceStatsByStars(it, stars) }
}
@@ -212,7 +213,8 @@ object SBItemEntryDefinition : EntryDefinition<SBItemStack> {
}
override fun wildcard(entry: EntryStack<SBItemStack>?, value: SBItemStack): SBItemStack {
- return value.copy(stackSize = 1, petData = null, stars = 0, extraLore = listOf())
+ return value.copy(stackSize = 1, petData = RepoManager.getPotentialStubPetData(value.skyblockId),
+ stars = 0, extraLore = listOf())
}
override fun normalize(entry: EntryStack<SBItemStack>?, value: SBItemStack): SBItemStack {
diff --git a/src/main/kotlin/moe/nea/firmament/repo/RepoManager.kt b/src/main/kotlin/moe/nea/firmament/repo/RepoManager.kt
index fb33802..f0da397 100644
--- a/src/main/kotlin/moe/nea/firmament/repo/RepoManager.kt
+++ b/src/main/kotlin/moe/nea/firmament/repo/RepoManager.kt
@@ -1,5 +1,3 @@
-
-
package moe.nea.firmament.repo
import io.github.moulberry.repo.NEURepository