diff options
Diffstat (limited to 'src/main/kotlin/moe/nea/ledger/ItemId.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/ledger/ItemId.kt | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/main/kotlin/moe/nea/ledger/ItemId.kt b/src/main/kotlin/moe/nea/ledger/ItemId.kt index f4786cd..8211cd3 100644 --- a/src/main/kotlin/moe/nea/ledger/ItemId.kt +++ b/src/main/kotlin/moe/nea/ledger/ItemId.kt @@ -1,12 +1,16 @@ package moe.nea.ledger +import moe.nea.ledger.utils.NoSideEffects + data class ItemId( val string: String ) { + @NoSideEffects fun singleItem(): Pair<ItemId, Double> { return withStackSize(1) } + @NoSideEffects fun withStackSize(size: Number): Pair<ItemId, Double> { return Pair(this, size.toDouble()) } @@ -15,6 +19,7 @@ data class ItemId( companion object { @JvmStatic + @NoSideEffects fun forName(string: String) = ItemId(string) fun skill(skill: String) = ItemId("SKYBLOCK_SKILL_$skill") @@ -22,25 +27,9 @@ data class ItemId( val FARMING = skill("FARMING") - val ARCHFIEND_DYE = ItemId("DYE_ARCHFIEND") - val ARCHFIEND_HIGH_CLASS = ItemId("HIGH_CLASS_ARCHFIEND_DICE") - val ARCHFIEND_LOW_CLASS = ItemId("ARCHFIEND_DICE") - val BITS = ItemId("SKYBLOCK_BIT") - val BOOSTER_COOKIE = ItemId("BOOSTER_COOKIE") - val CAP_EYEDROPS = ItemId("CAPSAICIN_EYEDROPS_NO_CHARGES") val COINS = ItemId("SKYBLOCK_COIN") - val COPPER = ItemId("SKYBLOCK_COPPER") - val DRAGON_ESSENCE = ItemId("ESSENCE_DRAGON") - val DUNGEON_CHEST_KEY = ItemId("DUNGEON_CHEST_KEY") - val FINE_FLOUR = ItemId("FINE_FLOUR") val GEMSTONE_POWDER = ItemId("SKYBLOCK_POWDER_GEMSTONE") - val GOD_POTION = ItemId("GOD_POTION_2") - val GOLD_ESSENCE = ItemId("ESSENCE_GOLD") - val KISMET_FEATHER = ItemId("KISMET_FEATHER") val MITHRIL_POWDER = ItemId("SKYBLOCK_POWDER_MITHRIL") val NIL = ItemId("SKYBLOCK_NIL") - val PELT = ItemId("SKYBLOCK_PELT") - val SLEEPING_EYE = ItemId("SLEEPING_EYE") - val SUMMONING_EYE = ItemId("SUMMONING_EYE") } }
\ No newline at end of file |