diff options
author | Linnea Gräf <nea@nea.moe> | 2024-12-08 00:42:01 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-12-08 00:42:01 +0100 |
commit | fa72dd4ce107190cda7bc56234fed650f20e3aa9 (patch) | |
tree | 57a5fa0c224db5bb670e26813c958a768d6bdf90 /src/main/kotlin/moe/nea/ledger/ItemId.kt | |
parent | 0a2342c015b310172f933df765d8651013c26f16 (diff) | |
download | LocalTransactionLedger-fa72dd4ce107190cda7bc56234fed650f20e3aa9.tar.gz LocalTransactionLedger-fa72dd4ce107190cda7bc56234fed650f20e3aa9.tar.bz2 LocalTransactionLedger-fa72dd4ce107190cda7bc56234fed650f20e3aa9.zip |
feat: Add visitor trading detection
Diffstat (limited to 'src/main/kotlin/moe/nea/ledger/ItemId.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/ledger/ItemId.kt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/ledger/ItemId.kt b/src/main/kotlin/moe/nea/ledger/ItemId.kt new file mode 100644 index 0000000..74f8e82 --- /dev/null +++ b/src/main/kotlin/moe/nea/ledger/ItemId.kt @@ -0,0 +1,34 @@ +package moe.nea.ledger + +@JvmInline +value class ItemId( + val string: String +) { + fun singleItem(): Pair<ItemId, Double> { + return withStackSize(1) + } + + fun withStackSize(size: Number): Pair<ItemId, Double> { + return Pair(this, size.toDouble()) + } + + + companion object { + fun skill(skill: String) = ItemId("SKYBLOCK_SKILL_$skill") + + val GARDEN = skill("GARDEN") + val FARMING = skill("FARMING") + val GEMSTONE_POWDER = ItemId("SKYBLOCK_POWDER_GEMSTONE") + val MITHRIL_POWDER = ItemId("SKYBLOCK_POWDER_MITHRIL") + val GOLD_ESSENCE = ItemId("ESSENCE_GOLD") + val PELT = ItemId("SKYBLOCK_PELT") + val COINS = ItemId("SKYBLOCK_COIN") + val FINE_FLOUR = ItemId("FINE_FLOUR") + val BITS = ItemId("SKYBLOCK_BIT") + val COPPER = ItemId("SKYBLOCK_COPPER") + val NIL = ItemId("SKYBLOCK_NIL") + val DUNGEON_CHEST_KEY = ItemId("DUNGEON_CHEST_KEY") + val BOOSTER_COOKIE = ItemId("BOOSTER_COOKIE") + val KISMET_FEATHER = ItemId("KISMET_FEATHER") + } +}
\ No newline at end of file |