Merge branch '1.19.4' of https://git.dbotthepony.ru/DBot/overdrive_that_matters into 1.19.3
This commit is contained in:
commit
9dbf40f170
@ -825,13 +825,15 @@ private fun gui(provider: MatteryLanguageProvider) {
|
||||
|
||||
gui("upgrades", "Upgrades")
|
||||
gui("upgrades.current", "Active upgrades:")
|
||||
gui("upgrade.speed", "Operation speed: %s%%")
|
||||
gui("upgrade.speed", "Operating speed: %s%%")
|
||||
gui("upgrade.speed_limit", "Operating speed: %s%% (limit)")
|
||||
gui("upgrade.processing_items", "Items processed per cycle: +%s")
|
||||
gui("upgrade.energy_storage_flat", "Energy capacity: +%s")
|
||||
gui("upgrade.matter_storage_flat", "Matter capacity: +%s")
|
||||
gui("upgrade.energy_storage", "Energy capacity: +%s%%")
|
||||
gui("upgrade.matter_storage", "Matter capacity: +%s%%")
|
||||
gui("upgrade.energy_consumed", "Energy consumption: %s%%")
|
||||
gui("upgrade.energy_consumed_limit", "Energy consumption: %s%% (limit)")
|
||||
gui("upgrade.energy_throughput_flat", "Energy throughput: +%s")
|
||||
gui("upgrade.energy_throughput", "Energy throughput: +%s%%")
|
||||
gui("upgrade.failsafe", "Failure chance: %s%%")
|
||||
|
@ -828,12 +828,14 @@ private fun gui(provider: MatteryLanguageProvider) {
|
||||
gui("upgrades", "Улучшения")
|
||||
gui("upgrades.current", "Активные улучшения:")
|
||||
gui("upgrade.speed", "Скорость работы: %s%%")
|
||||
gui("upgrade.speed_limit", "Скорость работы: %s%% (предел)")
|
||||
gui("upgrade.processing_items", "Работы за цикл: +%s")
|
||||
gui("upgrade.energy_storage_flat", "Хранилище энергии: +%s")
|
||||
gui("upgrade.matter_storage_flat", "Хранилище материи: +%s")
|
||||
gui("upgrade.energy_storage", "Хранилище энергии: +%s%%")
|
||||
gui("upgrade.matter_storage", "Хранилище материи: +%s%%")
|
||||
gui("upgrade.energy_consumed", "Потребление энергии: %s%%")
|
||||
gui("upgrade.energy_consumed_limit", "Потребление энергии: %s%% (предел)")
|
||||
gui("upgrade.energy_throughput_flat", "Пропускная способность энергии: +%s")
|
||||
gui("upgrade.energy_throughput", "Пропускная способность энергии: +%s%%")
|
||||
gui("upgrade.failsafe", "Шанс неудачи: %s%%")
|
||||
|
@ -104,10 +104,13 @@ fun IMatteryUpgrade.addUpgradeTooltipLines(tooltips: MutableCollection<Component
|
||||
tooltips.add(TextComponent(""))
|
||||
}
|
||||
|
||||
val actualSpeedBonus = speedBonus.coerceIn(MachinesConfig.Upgrades.MIN_SPEED, MachinesConfig.Upgrades.MAX_SPEED)
|
||||
val speedBonusLimit = if (actualSpeedBonus == MachinesConfig.Upgrades.MIN_SPEED || actualSpeedBonus == MachinesConfig.Upgrades.MAX_SPEED) "_limit" else ""
|
||||
|
||||
if (speedBonus >= 0.01) {
|
||||
tooltips.add(TranslatableComponent("otm.gui.upgrade.speed", TextComponent("+" + (speedBonus.coerceIn(MachinesConfig.Upgrades.MIN_SPEED, MachinesConfig.Upgrades.MAX_SPEED) * 100.0).toInt().toString()).withStyle(ChatFormatting.DARK_GREEN)).withStyle(ChatFormatting.GRAY))
|
||||
tooltips.add(TranslatableComponent("otm.gui.upgrade.speed$speedBonusLimit", TextComponent("+" + (actualSpeedBonus * 100.0).toInt().toString()).withStyle(ChatFormatting.DARK_GREEN)).withStyle(ChatFormatting.GRAY))
|
||||
} else if (speedBonus <= -0.01) {
|
||||
tooltips.add(TranslatableComponent("otm.gui.upgrade.speed", TextComponent((speedBonus.coerceIn(MachinesConfig.Upgrades.MIN_SPEED, MachinesConfig.Upgrades.MAX_SPEED) * 100.0).toInt().toString()).withStyle(ChatFormatting.DARK_RED)).withStyle(ChatFormatting.GRAY))
|
||||
tooltips.add(TranslatableComponent("otm.gui.upgrade.speed$speedBonusLimit", TextComponent((actualSpeedBonus * 100.0).toInt().toString()).withStyle(ChatFormatting.DARK_RED)).withStyle(ChatFormatting.GRAY))
|
||||
}
|
||||
|
||||
if (processingItems != 0) {
|
||||
@ -130,10 +133,13 @@ fun IMatteryUpgrade.addUpgradeTooltipLines(tooltips: MutableCollection<Component
|
||||
tooltips.add(TranslatableComponent("otm.gui.upgrade.matter_storage", TextComponent((matterStorage * 100).toString(0)).withStyle(ChatFormatting.DARK_GREEN)).withStyle(ChatFormatting.GRAY))
|
||||
}
|
||||
|
||||
val actualEnergyConsumed = energyConsumed.coerceIn(MachinesConfig.Upgrades.MIN_ENERGY, MachinesConfig.Upgrades.MAX_ENERGY)
|
||||
val consumedLimit = if (actualEnergyConsumed == MachinesConfig.Upgrades.MIN_ENERGY || actualEnergyConsumed == MachinesConfig.Upgrades.MAX_ENERGY) "_limit" else ""
|
||||
|
||||
if (energyConsumed >= positiveBound) {
|
||||
tooltips.add(TranslatableComponent("otm.gui.upgrade.energy_consumed", TextComponent("+" + (energyConsumed.coerceIn(MachinesConfig.Upgrades.MIN_ENERGY, MachinesConfig.Upgrades.MAX_ENERGY) * 100).toString(0)).withStyle(ChatFormatting.DARK_RED)).withStyle(ChatFormatting.GRAY))
|
||||
tooltips.add(TranslatableComponent("otm.gui.upgrade.energy_consumed$consumedLimit", TextComponent("+" + (actualEnergyConsumed * 100).toString(0)).withStyle(ChatFormatting.DARK_RED)).withStyle(ChatFormatting.GRAY))
|
||||
} else if (energyConsumed <= negativeBound) {
|
||||
tooltips.add(TranslatableComponent("otm.gui.upgrade.energy_consumed", TextComponent((energyConsumed.coerceIn(MachinesConfig.Upgrades.MIN_ENERGY, MachinesConfig.Upgrades.MAX_ENERGY) * 100).toString(0)).withStyle(ChatFormatting.DARK_GREEN)).withStyle(ChatFormatting.GRAY))
|
||||
tooltips.add(TranslatableComponent("otm.gui.upgrade.energy_consumed$consumedLimit", TextComponent((actualEnergyConsumed * 100).toString(0)).withStyle(ChatFormatting.DARK_GREEN)).withStyle(ChatFormatting.GRAY))
|
||||
}
|
||||
|
||||
if (energyThroughputFlat != Decimal.ZERO) {
|
||||
|
Loading…
Reference in New Issue
Block a user