aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/ledger/modules
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-12-30 22:01:15 +0100
committerLinnea Gräf <nea@nea.moe>2024-12-30 22:01:15 +0100
commit00aadb43fcf8d9557987f60f476a44f4b22a0c45 (patch)
tree5762122614144d247ec6a22126635f35200170d6 /src/main/kotlin/moe/nea/ledger/modules
parent1c0090ec301b87edebc29453287e585f88de2c4f (diff)
downloadLocalTransactionLedger-00aadb43fcf8d9557987f60f476a44f4b22a0c45.tar.gz
LocalTransactionLedger-00aadb43fcf8d9557987f60f476a44f4b22a0c45.tar.bz2
LocalTransactionLedger-00aadb43fcf8d9557987f60f476a44f4b22a0c45.zip
refactor: Add more item ids
Diffstat (limited to 'src/main/kotlin/moe/nea/ledger/modules')
-rw-r--r--src/main/kotlin/moe/nea/ledger/modules/BitsDetection.kt5
-rw-r--r--src/main/kotlin/moe/nea/ledger/modules/BitsShopDetection.kt5
-rw-r--r--src/main/kotlin/moe/nea/ledger/modules/DragonEyePlacementDetection.kt3
-rw-r--r--src/main/kotlin/moe/nea/ledger/modules/DragonSacrificeDetection.kt3
-rw-r--r--src/main/kotlin/moe/nea/ledger/modules/DungeonChestDetection.kt3
-rw-r--r--src/main/kotlin/moe/nea/ledger/modules/EyedropsDetection.kt3
-rw-r--r--src/main/kotlin/moe/nea/ledger/modules/GambleDetection.kt2
-rw-r--r--src/main/kotlin/moe/nea/ledger/modules/GodPotionDetection.kt3
8 files changed, 17 insertions, 10 deletions
diff --git a/src/main/kotlin/moe/nea/ledger/modules/BitsDetection.kt b/src/main/kotlin/moe/nea/ledger/modules/BitsDetection.kt
index e4c3c98..44a0050 100644
--- a/src/main/kotlin/moe/nea/ledger/modules/BitsDetection.kt
+++ b/src/main/kotlin/moe/nea/ledger/modules/BitsDetection.kt
@@ -9,6 +9,7 @@ import moe.nea.ledger.LedgerLogger
import moe.nea.ledger.SHORT_NUMBER_PATTERN
import moe.nea.ledger.ScoreboardUtil
import moe.nea.ledger.TransactionType
+import moe.nea.ledger.gen.ItemIds
import moe.nea.ledger.parseShortNumber
import moe.nea.ledger.unformattedString
import moe.nea.ledger.useMatcher
@@ -33,7 +34,7 @@ class BitsDetection @Inject constructor(val ledger: LedgerLogger) {
TransactionType.BITS_PURSE_STATUS,
Instant.now(),
listOf(
- ItemChange(ItemId.BITS, bits.toDouble(), ItemChange.ChangeDirection.SYNC)
+ ItemChange(ItemIds.SKYBLOCK_BIT, bits.toDouble(), ItemChange.ChangeDirection.SYNC)
)
)
)
@@ -52,7 +53,7 @@ class BitsDetection @Inject constructor(val ledger: LedgerLogger) {
TransactionType.BOOSTER_COOKIE_ATE,
Instant.now(),
listOf(
- ItemChange.lose(ItemId.BOOSTER_COOKIE, 1)
+ ItemChange.lose(ItemIds.BOOSTER_COOKIE, 1)
)
)
)
diff --git a/src/main/kotlin/moe/nea/ledger/modules/BitsShopDetection.kt b/src/main/kotlin/moe/nea/ledger/modules/BitsShopDetection.kt
index d7e0a0d..553bebf 100644
--- a/src/main/kotlin/moe/nea/ledger/modules/BitsShopDetection.kt
+++ b/src/main/kotlin/moe/nea/ledger/modules/BitsShopDetection.kt
@@ -8,6 +8,7 @@ import moe.nea.ledger.LedgerEntry
import moe.nea.ledger.LedgerLogger
import moe.nea.ledger.SHORT_NUMBER_PATTERN
import moe.nea.ledger.TransactionType
+import moe.nea.ledger.gen.ItemIds
import moe.nea.ledger.getInternalId
import moe.nea.ledger.getLore
import moe.nea.ledger.parseShortNumber
@@ -54,8 +55,8 @@ class BitsShopDetection @Inject constructor(val ledger: LedgerLogger) {
TransactionType.COMMUNITY_SHOP_BUY,
Instant.now(),
listOf(
- ItemChange.lose(ItemId.BITS, lastBit.bitPrice.toDouble()),
- ItemChange.gain(lastBit.id, lastBit.stackSize)
+ ItemChange.lose(ItemIds.SKYBLOCK_BIT, lastBit.bitPrice.toDouble()),
+ ItemChange.gain(lastBit.id, lastBit.stackSize)
)
)
)
diff --git a/src/main/kotlin/moe/nea/ledger/modules/DragonEyePlacementDetection.kt b/src/main/kotlin/moe/nea/ledger/modules/DragonEyePlacementDetection.kt
index b9f70c4..e389ffb 100644
--- a/src/main/kotlin/moe/nea/ledger/modules/DragonEyePlacementDetection.kt
+++ b/src/main/kotlin/moe/nea/ledger/modules/DragonEyePlacementDetection.kt
@@ -7,6 +7,7 @@ import moe.nea.ledger.LedgerLogger
import moe.nea.ledger.TransactionType
import moe.nea.ledger.events.ChatReceived
import moe.nea.ledger.events.WorldSwitchEvent
+import moe.nea.ledger.gen.ItemIds
import moe.nea.ledger.useMatcher
import moe.nea.ledger.utils.di.Inject
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -34,7 +35,7 @@ class DragonEyePlacementDetection {
TransactionType.WYRM_EVOKED,
event.timestamp,
listOf(
- ItemChange.lose(ItemId.SUMMONING_EYE, eyeCount)
+ ItemChange.lose(ItemIds.SUMMONING_EYE, eyeCount)
)
))
eyeCount = 0
diff --git a/src/main/kotlin/moe/nea/ledger/modules/DragonSacrificeDetection.kt b/src/main/kotlin/moe/nea/ledger/modules/DragonSacrificeDetection.kt
index 20934d2..574cfcf 100644
--- a/src/main/kotlin/moe/nea/ledger/modules/DragonSacrificeDetection.kt
+++ b/src/main/kotlin/moe/nea/ledger/modules/DragonSacrificeDetection.kt
@@ -9,6 +9,7 @@ import moe.nea.ledger.LedgerLogger
import moe.nea.ledger.SHORT_NUMBER_PATTERN
import moe.nea.ledger.TransactionType
import moe.nea.ledger.events.ChatReceived
+import moe.nea.ledger.gen.ItemIds
import moe.nea.ledger.parseShortNumber
import moe.nea.ledger.useMatcher
import moe.nea.ledger.utils.di.Inject
@@ -43,7 +44,7 @@ class DragonSacrificeDetection {
event.timestamp,
listOf(
ItemChange.lose(sacrifice, 1),
- ItemChange.gain(ItemId.DRAGON_ESSENCE, lootEssence)
+ ItemChange.gain(ItemIds.ESSENCE_DRAGON, lootEssence)
)
))
}
diff --git a/src/main/kotlin/moe/nea/ledger/modules/DungeonChestDetection.kt b/src/main/kotlin/moe/nea/ledger/modules/DungeonChestDetection.kt
index feb452e..d61e386 100644
--- a/src/main/kotlin/moe/nea/ledger/modules/DungeonChestDetection.kt
+++ b/src/main/kotlin/moe/nea/ledger/modules/DungeonChestDetection.kt
@@ -9,6 +9,7 @@ import moe.nea.ledger.TransactionType
import moe.nea.ledger.events.ChatReceived
import moe.nea.ledger.events.ExtraSupplyIdEvent
import moe.nea.ledger.events.GuiClickEvent
+import moe.nea.ledger.gen.ItemIds
import moe.nea.ledger.getDisplayNameU
import moe.nea.ledger.unformattedString
import moe.nea.ledger.useMatcher
@@ -30,7 +31,7 @@ class DungeonChestDetection @Inject constructor(val logger: LedgerLogger) : Ches
TransactionType.KISMET_REROLL,
Instant.now(),
listOf(
- ItemChange.lose(ItemId.KISMET_FEATHER, 1)
+ ItemChange.lose(ItemIds.KISMET_FEATHER, 1)
)
)
)
diff --git a/src/main/kotlin/moe/nea/ledger/modules/EyedropsDetection.kt b/src/main/kotlin/moe/nea/ledger/modules/EyedropsDetection.kt
index 2b1a8cd..04dbe80 100644
--- a/src/main/kotlin/moe/nea/ledger/modules/EyedropsDetection.kt
+++ b/src/main/kotlin/moe/nea/ledger/modules/EyedropsDetection.kt
@@ -6,6 +6,7 @@ import moe.nea.ledger.LedgerEntry
import moe.nea.ledger.LedgerLogger
import moe.nea.ledger.TransactionType
import moe.nea.ledger.events.ChatReceived
+import moe.nea.ledger.gen.ItemIds
import moe.nea.ledger.useMatcher
import moe.nea.ledger.utils.di.Inject
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -25,7 +26,7 @@ class EyedropsDetection {
TransactionType.CAPSAICIN_EYEDROPS_USED,
event.timestamp,
listOf(
- ItemChange.lose(ItemId.CAP_EYEDROPS, 1)
+ ItemChange.lose(ItemIds.CAPSAICIN_EYEDROPS_NO_CHARGES, 1)
)
)
)
diff --git a/src/main/kotlin/moe/nea/ledger/modules/GambleDetection.kt b/src/main/kotlin/moe/nea/ledger/modules/GambleDetection.kt
index 0ef43a2..a8f79c1 100644
--- a/src/main/kotlin/moe/nea/ledger/modules/GambleDetection.kt
+++ b/src/main/kotlin/moe/nea/ledger/modules/GambleDetection.kt
@@ -24,7 +24,7 @@ class GambleDetection {
fun onChat(event: ChatReceived) {
dieRolled.useMatcher(event.message) {
val isLowClass = group("isHighClass").isNullOrBlank()
- val item = if (isLowClass) ItemId.ARCHFIEND_LOW_CLASS else ItemId.ARCHFIEND_HIGH_CLASS
+ val item = if (isLowClass) ItemIds.ARCHFIEND_DICE else ItemIds.HIGH_CLASS_ARCHFIEND_DICE
val face = group("face")
val rollCost = if (isLowClass) 666_000.0 else 6_600_000.0
if (face == "7") {
diff --git a/src/main/kotlin/moe/nea/ledger/modules/GodPotionDetection.kt b/src/main/kotlin/moe/nea/ledger/modules/GodPotionDetection.kt
index 806feb0..ae86519 100644
--- a/src/main/kotlin/moe/nea/ledger/modules/GodPotionDetection.kt
+++ b/src/main/kotlin/moe/nea/ledger/modules/GodPotionDetection.kt
@@ -6,6 +6,7 @@ import moe.nea.ledger.LedgerEntry
import moe.nea.ledger.LedgerLogger
import moe.nea.ledger.TransactionType
import moe.nea.ledger.events.ChatReceived
+import moe.nea.ledger.gen.ItemIds
import moe.nea.ledger.useMatcher
import moe.nea.ledger.utils.di.Inject
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@@ -25,7 +26,7 @@ class GodPotionDetection {
TransactionType.GOD_POTION_DRANK,
event.timestamp,
listOf(
- ItemChange.lose(ItemId.GOD_POTION, 1)
+ ItemChange.lose(ItemIds.GOD_POTION_2, 1)
)
)
)