blob: 844ac0227da438883ffba40372eb6d5c7ef2adf0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
package at.hannibal2.skyhanni.features.rift
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.config.features.rift.RiftConfig
import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.NEUInternalName
import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName
import net.minecraft.item.ItemStack
object RiftAPI {
fun inRift() = IslandType.THE_RIFT.isInIsland()
val config: RiftConfig get() = SkyHanniMod.feature.rift
// internal name -> motes
var motesPrice = emptyMap<NEUInternalName, Double>()
val farmingTool by lazy { "FARMING_WAND".asInternalName() }
fun ItemStack.motesNpcPrice(): Double? {
val baseMotes = motesPrice[getInternalName()] ?: return null
val burgerStacks = config.motes.burgerStacks
val pricePer = baseMotes + (burgerStacks * 5) * baseMotes / 100
return pricePer * stackSize
}
fun inLivingCave() = LorenzUtils.skyBlockArea == "Living Cave"
fun inLivingStillness() = LorenzUtils.skyBlockArea == "Living Stillness"
fun inStillgoreChateau() = LorenzUtils.skyBlockArea.let { it == "Stillgore Château" || it == "Oubliette" }
fun inDreadfarm() = LorenzUtils.skyBlockArea == "Dreadfarm"
}
|