From 4c97c99ee67e7784bdc665d159605a3fcbc60852 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Fri, 17 Mar 2023 19:00:16 +0700 Subject: [PATCH] Format as readable research tooltips --- .../mc/otm/android/feature/EnderTeleporterFeature.kt | 3 ++- .../ru/dbotthepony/mc/otm/android/feature/ItemMagnetFeature.kt | 3 ++- .../ru/dbotthepony/mc/otm/android/feature/JumpBoostFeature.kt | 3 ++- .../ru/dbotthepony/mc/otm/android/feature/ShockwaveFeature.kt | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/EnderTeleporterFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/EnderTeleporterFeature.kt index a03bc1074..437045998 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/EnderTeleporterFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/EnderTeleporterFeature.kt @@ -31,6 +31,7 @@ import ru.dbotthepony.mc.otm.android.AndroidResearchManager import ru.dbotthepony.mc.otm.capability.MatteryPlayerCapability import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact import ru.dbotthepony.mc.otm.capability.matteryPlayer +import ru.dbotthepony.mc.otm.client.ShiftPressedCond import ru.dbotthepony.mc.otm.client.render.DynamicBufferSource import ru.dbotthepony.mc.otm.client.render.ResearchIcons import ru.dbotthepony.mc.otm.client.render.sprite @@ -400,7 +401,7 @@ class EnderTeleporterFeature(capability: MatteryPlayerCapability) : AndroidActiv AndroidResearchManager.descriptionFunc( ResourceLocation(OverdriveThatMatters.MOD_ID, MNames.ENDER_TELEPORTER), "otm.gui.power_cost_per_use", - { AndroidConfig.EnderTeleporter.ENERGY_COST.formatPower().copy().withStyle(ChatFormatting.YELLOW) }) + { AndroidConfig.EnderTeleporter.ENERGY_COST.formatPower(formatAsReadable = ShiftPressedCond).copy().withStyle(ChatFormatting.YELLOW) }) fun onEntityDeath(event: LivingDeathEvent) { val android = event.entity.matteryPlayer ?: return diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ItemMagnetFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ItemMagnetFeature.kt index 6542e1513..0d32d25b3 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ItemMagnetFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ItemMagnetFeature.kt @@ -14,6 +14,7 @@ import ru.dbotthepony.mc.otm.android.AndroidResearchManager import ru.dbotthepony.mc.otm.android.AndroidSwitchableFeature import ru.dbotthepony.mc.otm.capability.MatteryPlayerCapability import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact +import ru.dbotthepony.mc.otm.client.ShiftPressedCond import ru.dbotthepony.mc.otm.client.minecraft import ru.dbotthepony.mc.otm.client.render.ResearchIcons import ru.dbotthepony.mc.otm.core.math.Vector @@ -136,6 +137,6 @@ class ItemMagnetFeature(capability: MatteryPlayerCapability) : AndroidSwitchable AndroidResearchManager.descriptionFunc(ResourceLocation( OverdriveThatMatters.MOD_ID, MNames.ITEM_MAGNET), "otm.gui.power_cost_per_tick", - { AndroidConfig.Magnet.POWER_DRAW.formatPower().copy().withStyle(ChatFormatting.YELLOW) }) + { AndroidConfig.Magnet.POWER_DRAW.formatPower(formatAsReadable = ShiftPressedCond).copy().withStyle(ChatFormatting.YELLOW) }) } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/JumpBoostFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/JumpBoostFeature.kt index 29db42b6d..b8b727dca 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/JumpBoostFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/JumpBoostFeature.kt @@ -16,6 +16,7 @@ import ru.dbotthepony.mc.otm.android.AndroidSwitchableFeature import ru.dbotthepony.mc.otm.capability.MatteryPlayerCapability import ru.dbotthepony.mc.otm.capability.energy.extractEnergyExact import ru.dbotthepony.mc.otm.capability.matteryPlayer +import ru.dbotthepony.mc.otm.client.ShiftPressedCond import ru.dbotthepony.mc.otm.client.render.ResearchIcons import ru.dbotthepony.mc.otm.core.math.Vector import ru.dbotthepony.mc.otm.core.util.formatPower @@ -130,6 +131,6 @@ class JumpBoostFeature(capability: MatteryPlayerCapability) : AndroidSwitchableF AndroidResearchManager.descriptionFunc( ResourceLocation(OverdriveThatMatters.MOD_ID, MNames.JUMP_BOOST), "otm.gui.power_cost_per_use", - { AndroidConfig.JumpBoost.ENERGY_COST.formatPower().copy().withStyle(ChatFormatting.YELLOW) }) + { AndroidConfig.JumpBoost.ENERGY_COST.formatPower(formatAsReadable = ShiftPressedCond).copy().withStyle(ChatFormatting.YELLOW) }) } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ShockwaveFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ShockwaveFeature.kt index 7ac93da7c..70b6605e9 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ShockwaveFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/android/feature/ShockwaveFeature.kt @@ -31,6 +31,7 @@ import ru.dbotthepony.mc.otm.core.math.roundToIntVector import ru.dbotthepony.mc.otm.core.math.times import ru.dbotthepony.mc.otm.network.MatteryPlayerNetworkChannel import ru.dbotthepony.mc.otm.capability.matteryPlayer +import ru.dbotthepony.mc.otm.client.ShiftPressedCond import ru.dbotthepony.mc.otm.network.MatteryPacket import ru.dbotthepony.mc.otm.network.ShockwaveEffectPacket import ru.dbotthepony.mc.otm.network.enqueueWork @@ -253,6 +254,6 @@ class ShockwaveFeature(capability: MatteryPlayerCapability) : AndroidSwitchableF AndroidResearchManager.descriptionFunc( ResourceLocation(OverdriveThatMatters.MOD_ID, MNames.SHOCKWAVE), "otm.gui.power_cost_per_use", - { AndroidConfig.Shockwave.ENERGY_COST.formatPower().copy().withStyle(ChatFormatting.YELLOW) }) + { AndroidConfig.Shockwave.ENERGY_COST.formatPower(formatAsReadable = ShiftPressedCond).copy().withStyle(ChatFormatting.YELLOW) }) } }