diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-03-05 11:11:10 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-03-05 11:11:10 +0100 |
commit | ff7c7e9002b42555be4189b9d42de1374f6379ea (patch) | |
tree | 4e97d306c426ef0452ec8c8e7f3162a0b101e33e /src/main/java/at | |
parent | d05ca8f7e8c51e6760b82888ed3821e891a73c85 (diff) | |
download | skyhanni-ff7c7e9002b42555be4189b9d42de1374f6379ea.tar.gz skyhanni-ff7c7e9002b42555be4189b9d42de1374f6379ea.tar.bz2 skyhanni-ff7c7e9002b42555be4189b9d42de1374f6379ea.zip |
Added price info to /shtestitem
Diffstat (limited to 'src/main/java/at')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt index 5f6a82359..137dc2f01 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt @@ -36,6 +36,7 @@ import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.NEUItems.getItemStackOrNull import at.hannibal2.skyhanni.utils.NEUItems.getNpcPriceOrNull +import at.hannibal2.skyhanni.utils.NEUItems.getPriceOrNull import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.OSUtils import at.hannibal2.skyhanni.utils.ReflectionUtils.makeAccessible @@ -386,16 +387,21 @@ class SkyHanniDebugsAndTests { add("§bSkyHanni Test Item") add("§einput: '§f$input§e'") - NEUInternalName.fromItemNameOrNull(input)?.let { - add("§eitem name -> internalName: '§7${it.asString()}§e'") - add(" §eitemName: '${it.itemName}§e'") + NEUInternalName.fromItemNameOrNull(input)?.let { internalName -> + add("§eitem name -> internalName: '§7${internalName.asString()}§e'") + add(" §eitemName: '${internalName.itemName}§e'") + val price = internalName.getPriceOrNull()?.let { "§6" + it.addSeparators() } ?: "§7null" + add(" §eprice: '§6${price}§e'") return@buildList } - input.asInternalName().getItemStackOrNull()?.let { - val itemName = it.itemName - add("§einternal name: §7${it.getInternalName().asString()}") + input.asInternalName().getItemStackOrNull()?.let { item -> + val itemName = item.itemName + val internalName = item.getInternalName() + add("§einternal name: §7${internalName.asString()}") add("§einternal name -> item name: '$itemName§e'") + val price = internalName.getPriceOrNull()?.let { "§6" + it.addSeparators() } ?: "§7null" + add(" §eprice: '§6${price}§e'") return@buildList } |