diff options
author | nea <nea@nea.moe> | 2023-06-02 02:42:42 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-06-02 02:42:42 +0200 |
commit | add5eb6a4a1c8228e789f90ca100fc92f12baaea (patch) | |
tree | f77bc531e40208efa79b32e5b5d8c28d076aa31f /src/main/kotlin/moe/nea/firmament/commands | |
parent | 3d76538cef0cb150415ef5db734c80fb0dec7e85 (diff) | |
download | Firmament-add5eb6a4a1c8228e789f90ca100fc92f12baaea.tar.gz Firmament-add5eb6a4a1c8228e789f90ca100fc92f12baaea.tar.bz2 Firmament-add5eb6a4a1c8228e789f90ca100fc92f12baaea.zip |
Improve floating point number formatting
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/commands')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/commands/rome.kt | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/commands/rome.kt b/src/main/kotlin/moe/nea/firmament/commands/rome.kt index 2d70df0..9c47fd2 100644 --- a/src/main/kotlin/moe/nea/firmament/commands/rome.kt +++ b/src/main/kotlin/moe/nea/firmament/commands/rome.kt @@ -21,25 +21,16 @@ package moe.nea.firmament.commands import com.mojang.brigadier.CommandDispatcher import com.mojang.brigadier.arguments.StringArgumentType.getString import com.mojang.brigadier.arguments.StringArgumentType.string -import io.github.cottonmc.cotton.gui.client.CottonClientScreen -import io.ktor.client.call.body -import io.ktor.client.request.get -import io.ktor.client.request.parameter -import io.ktor.http.URLProtocol -import io.ktor.http.path import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource -import kotlinx.coroutines.launch import net.minecraft.text.Text -import moe.nea.firmament.Firmament -import moe.nea.firmament.apis.Profiles import moe.nea.firmament.features.world.FairySouls import moe.nea.firmament.gui.config.AllConfigsGui import moe.nea.firmament.gui.profileviewer.ProfileViewer import moe.nea.firmament.repo.ItemCostData import moe.nea.firmament.repo.RepoManager +import moe.nea.firmament.util.FirmFormatters import moe.nea.firmament.util.MC import moe.nea.firmament.util.SBData -import moe.nea.firmament.util.ScreenUtil import moe.nea.firmament.util.SkyblockId import moe.nea.firmament.util.unformattedString @@ -87,7 +78,7 @@ fun firmamentCommand() = literal("firmament") { source.sendFeedback( Text.translatable( "firmament.price.bazaar.buy.price", - bazaarData.quickStatus.buyPrice + FirmFormatters.toString(bazaarData.quickStatus.buyPrice, 1) ) ) source.sendFeedback( @@ -99,7 +90,7 @@ fun firmamentCommand() = literal("firmament") { source.sendFeedback( Text.translatable( "firmament.price.bazaar.sell.price", - bazaarData.quickStatus.sellPrice + FirmFormatters.toString(bazaarData.quickStatus.sellPrice, 1) ) ) source.sendFeedback( @@ -111,7 +102,12 @@ fun firmamentCommand() = literal("firmament") { } val lowestBin = ItemCostData.lowestBin[itemName] if (lowestBin != null) { - source.sendFeedback(Text.translatable("firmament.price.lowestbin", lowestBin)) + source.sendFeedback( + Text.translatable( + "firmament.price.lowestbin", + FirmFormatters.toString(lowestBin, 1) + ) + ) } } } |