From 2bcc1965ce4b6e661b4dfad00999c9255ca57c8f Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Tue, 25 Feb 2025 12:06:32 +0700 Subject: [PATCH] Add alt power view with shift pressed in flywheel battery screen --- .../mc/otm/client/screen/tech/FlywheelBatteryScreen.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/tech/FlywheelBatteryScreen.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/tech/FlywheelBatteryScreen.kt index ba2289602..c107b1b9c 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/tech/FlywheelBatteryScreen.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/tech/FlywheelBatteryScreen.kt @@ -5,6 +5,7 @@ import net.minecraft.network.chat.Component import net.minecraft.world.entity.player.Inventory import net.minecraft.world.item.ItemStack import net.minecraft.world.item.Items +import ru.dbotthepony.mc.otm.client.ShiftPressedCond import ru.dbotthepony.mc.otm.client.render.RenderGravity import ru.dbotthepony.mc.otm.client.screen.MatteryScreen import ru.dbotthepony.mc.otm.client.screen.panels.Dock @@ -46,7 +47,7 @@ class FlywheelBatteryScreen(menu: FlywheelBatteryMenu, inventory: Inventory, tit it.dock = Dock.TOP } - DynamicLabel(this, frame, textSupplier = Supplier { menu.currentLossPerTick.get().formatPower(decimalPlaces = 6) }).also { + DynamicLabel(this, frame, textSupplier = Supplier { menu.currentLossPerTick.get().formatPower(decimalPlaces = 4, formatAsReadable = ShiftPressedCond) }).also { it.dock = Dock.TOP } @@ -54,7 +55,7 @@ class FlywheelBatteryScreen(menu: FlywheelBatteryMenu, inventory: Inventory, tit it.dock = Dock.TOP } - DynamicLabel(this, frame, textSupplier = Supplier { (menu.currentLossPerTick.get() * 20).formatPower() }).also { + DynamicLabel(this, frame, textSupplier = Supplier { (menu.currentLossPerTick.get() * 20).formatPower(formatAsReadable = ShiftPressedCond) }).also { it.dock = Dock.TOP }