diff options
author | Linnea Gräf <nea@nea.moe> | 2025-01-16 21:49:20 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2025-01-16 21:49:20 +0100 |
commit | 305178f5511bbf7b4499d7cf4142a067ab42e2fc (patch) | |
tree | 845b3cca6490fb9c1252215aa310eec108316bf1 /mod/src/main/kotlin/moe/nea/ledger/modules | |
parent | 40ed3a1f667d58501fc43fb45f53585315c013d1 (diff) | |
download | LocalTransactionLedger-305178f5511bbf7b4499d7cf4142a067ab42e2fc.tar.gz LocalTransactionLedger-305178f5511bbf7b4499d7cf4142a067ab42e2fc.tar.bz2 LocalTransactionLedger-305178f5511bbf7b4499d7cf4142a067ab42e2fc.zip |
refactor: Extract database models to own modules
Diffstat (limited to 'mod/src/main/kotlin/moe/nea/ledger/modules')
5 files changed, 14 insertions, 14 deletions
diff --git a/mod/src/main/kotlin/moe/nea/ledger/modules/AccessorySwapperDetection.kt b/mod/src/main/kotlin/moe/nea/ledger/modules/AccessorySwapperDetection.kt index 1c228ff..808ac5c 100644 --- a/mod/src/main/kotlin/moe/nea/ledger/modules/AccessorySwapperDetection.kt +++ b/mod/src/main/kotlin/moe/nea/ledger/modules/AccessorySwapperDetection.kt @@ -22,9 +22,9 @@ class AccessorySwapperDetection { swapperUsed.useMatcher(event.message) { logger.logEntry( LedgerEntry( - TransactionType.ACCESSORIES_SWAPPING, - event.timestamp, - listOf( + TransactionType.ACCESSORIES_SWAPPING, + event.timestamp, + listOf( ItemChange.lose(ItemIds.TALISMAN_ENRICHMENT_SWAPPER, 1) ) ) diff --git a/mod/src/main/kotlin/moe/nea/ledger/modules/BitsDetection.kt b/mod/src/main/kotlin/moe/nea/ledger/modules/BitsDetection.kt index f0f5369..f6dad12 100644 --- a/mod/src/main/kotlin/moe/nea/ledger/modules/BitsDetection.kt +++ b/mod/src/main/kotlin/moe/nea/ledger/modules/BitsDetection.kt @@ -50,8 +50,8 @@ class BitsDetection @Inject constructor(val ledger: LedgerLogger) { ledger.logEntry( LedgerEntry( TransactionType.BOOSTER_COOKIE_ATE, - Instant.now(), - listOf( + Instant.now(), + listOf( ItemChange.lose(ItemIds.BOOSTER_COOKIE, 1) ) ) diff --git a/mod/src/main/kotlin/moe/nea/ledger/modules/EyedropsDetection.kt b/mod/src/main/kotlin/moe/nea/ledger/modules/EyedropsDetection.kt index 1c36ae4..c90f8d9 100644 --- a/mod/src/main/kotlin/moe/nea/ledger/modules/EyedropsDetection.kt +++ b/mod/src/main/kotlin/moe/nea/ledger/modules/EyedropsDetection.kt @@ -22,9 +22,9 @@ class EyedropsDetection { capsaicinEyedropsUsed.useMatcher(event.message) { logger.logEntry( LedgerEntry( - TransactionType.CAPSAICIN_EYEDROPS_USED, - event.timestamp, - listOf( + TransactionType.CAPSAICIN_EYEDROPS_USED, + event.timestamp, + listOf( ItemChange.lose(ItemIds.CAPSAICIN_EYEDROPS_NO_CHARGES, 1) ) ) diff --git a/mod/src/main/kotlin/moe/nea/ledger/modules/GodPotionDetection.kt b/mod/src/main/kotlin/moe/nea/ledger/modules/GodPotionDetection.kt index e858a6b..56e2b69 100644 --- a/mod/src/main/kotlin/moe/nea/ledger/modules/GodPotionDetection.kt +++ b/mod/src/main/kotlin/moe/nea/ledger/modules/GodPotionDetection.kt @@ -22,9 +22,9 @@ class GodPotionDetection { godPotionDrank.useMatcher(event.message) { logger.logEntry( LedgerEntry( - TransactionType.GOD_POTION_DRANK, - event.timestamp, - listOf( + TransactionType.GOD_POTION_DRANK, + event.timestamp, + listOf( ItemChange.lose(ItemIds.GOD_POTION_2, 1) ) ) diff --git a/mod/src/main/kotlin/moe/nea/ledger/modules/GodPotionMixinDetection.kt b/mod/src/main/kotlin/moe/nea/ledger/modules/GodPotionMixinDetection.kt index b96a24a..072503f 100644 --- a/mod/src/main/kotlin/moe/nea/ledger/modules/GodPotionMixinDetection.kt +++ b/mod/src/main/kotlin/moe/nea/ledger/modules/GodPotionMixinDetection.kt @@ -26,9 +26,9 @@ class GodPotionMixinDetection { godPotionMixinDrank.useMatcher(event.message) { logger.logEntry( LedgerEntry( - TransactionType.GOD_POTION_MIXIN_DRANK, - event.timestamp, - listOf( + TransactionType.GOD_POTION_MIXIN_DRANK, + event.timestamp, + listOf( ItemChange.lose(itemIdProvider.findForName(group("what")) ?: ItemId.NIL, 1) ) ) |