aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe')
-rw-r--r--src/main/kotlin/moe/nea/ledger/Ledger.kt1
-rw-r--r--src/main/kotlin/moe/nea/ledger/NpcDetection.kt2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/ledger/Ledger.kt b/src/main/kotlin/moe/nea/ledger/Ledger.kt
index 23d1265..a11480f 100644
--- a/src/main/kotlin/moe/nea/ledger/Ledger.kt
+++ b/src/main/kotlin/moe/nea/ledger/Ledger.kt
@@ -50,6 +50,7 @@ class Ledger {
// You bought Cactus x32 for 465.6 Coins!
// You sold Cactus x1 for 3 Coins!
+ // You bought back Potato x3 for 9 Coins!
TODO: TRADING, FORGE, COOKIE_EATEN
*/
diff --git a/src/main/kotlin/moe/nea/ledger/NpcDetection.kt b/src/main/kotlin/moe/nea/ledger/NpcDetection.kt
index 65693ef..3c3fe87 100644
--- a/src/main/kotlin/moe/nea/ledger/NpcDetection.kt
+++ b/src/main/kotlin/moe/nea/ledger/NpcDetection.kt
@@ -6,7 +6,7 @@ import java.util.regex.Pattern
class NpcDetection(val ledger: LedgerLogger, val ids: ItemIdProvider) {
val npcBuyPattern =
- Pattern.compile("You bought (?<what>.*?) (x(?<count>$SHORT_NUMBER_PATTERN) )?for (?<coins>$SHORT_NUMBER_PATTERN) Coins!")
+ Pattern.compile("You bought (back )?(?<what>.*?) (x(?<count>$SHORT_NUMBER_PATTERN) )?for (?<coins>$SHORT_NUMBER_PATTERN) Coins!")
val npcSellPattern =
Pattern.compile("You sold (?<what>.*) (x(?<count>$SHORT_NUMBER_PATTERN) )?for (?<coins>$SHORT_NUMBER_PATTERN) Coins!")