diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-04-28 11:23:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-28 11:23:21 +0200 |
commit | 7467e9f16f84f7e1f77b5a91914c54d3a34c5097 (patch) | |
tree | adc34924cd1d6167620bb9316c380f93574d97a3 /src/main/java/at/hannibal2/skyhanni/utils | |
parent | e759f4a5d7b2e574cd6b3f3171eac71de90248b9 (diff) | |
download | skyhanni-7467e9f16f84f7e1f77b5a91914c54d3a34c5097.tar.gz skyhanni-7467e9f16f84f7e1f77b5a91914c54d3a34c5097.tar.bz2 skyhanni-7467e9f16f84f7e1f77b5a91914c54d3a34c5097.zip |
Fixed: Gfs without amount (#1567)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/NEUCalculator.kt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/NEUCalculator.kt b/src/main/java/at/hannibal2/skyhanni/utils/NEUCalculator.kt new file mode 100644 index 000000000..1b017fea1 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/utils/NEUCalculator.kt @@ -0,0 +1,10 @@ +package at.hannibal2.skyhanni.utils + +import io.github.moulberry.notenoughupdates.util.Calculator +import java.math.BigDecimal + +object NEUCalculator { + + // TODO add if (!usingNEU()) null + fun calculateOrNull(input: String): BigDecimal? = runCatching { Calculator.calculate(input) }.getOrNull() +} |