blob: 0e276ce5fcab595c55bcb04f56b54fdaa5e9a8d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
package moe.nea.firmament.repo
import io.github.moulberry.repo.IReloadable
import io.github.moulberry.repo.NEURepository
import moe.nea.firmament.util.SkyblockId
import moe.nea.firmament.util.removeColorCodes
import moe.nea.firmament.util.skyblockId
class EnchantedBookCache : IReloadable {
var byName: Map<String, SkyblockId> = mapOf()
override fun reload(repo: NEURepository) {
byName = repo.items.items.values
.filter { it.displayName.endsWith("Enchanted Book") }
.associate { it.lore.first().removeColorCodes() to it.skyblockId }
}
}
|