From 8b66bc128f3eed516874b36f9a14892bf1dcb302 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 25 May 2018 11:41:09 -0400 Subject: [PATCH] improved isolation rate formatting in ship core status message --- .../java/cr0s/warpdrive/block/movement/TileEntityShipCore.java | 3 ++- src/main/resources/assets/warpdrive/lang/de_DE.lang | 2 +- src/main/resources/assets/warpdrive/lang/en_US.lang | 2 +- src/main/resources/assets/warpdrive/lang/fr_FR.lang | 2 +- src/main/resources/assets/warpdrive/lang/nl_NL.lang | 2 +- src/main/resources/assets/warpdrive/lang/ru_RU.lang | 2 +- src/main/resources/assets/warpdrive/lang/zh_CN.lang | 2 +- src/main/resources/assets/warpdrive/lang/zh_TW.lang | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/cr0s/warpdrive/block/movement/TileEntityShipCore.java b/src/main/java/cr0s/warpdrive/block/movement/TileEntityShipCore.java index 70894b3f..7ced6480 100644 --- a/src/main/java/cr0s/warpdrive/block/movement/TileEntityShipCore.java +++ b/src/main/java/cr0s/warpdrive/block/movement/TileEntityShipCore.java @@ -1075,9 +1075,10 @@ public class TileEntityShipCore extends TileEntityAbstractEnergy implements ISta @Override public String getStatus() { + final String strIsolationRate = String.format("%.1f", isolationRate * 100.0D); return super.getStatus() + ((cooldownTime_ticks > 0) ? "\n" + StatCollector.translateToLocalFormatted("warpdrive.ship.status_line.cooling", cooldownTime_ticks / 20) : "") - + ((isolationBlocksCount > 0) ? "\n" + StatCollector.translateToLocalFormatted("warpdrive.ship.status_line.isolation", isolationBlocksCount, isolationRate * 100.0) : ""); + + ((isolationBlocksCount > 0) ? "\n" + StatCollector.translateToLocalFormatted("warpdrive.ship.status_line.isolation", isolationBlocksCount, strIsolationRate) : ""); } public String getBoundingBoxStatus() { diff --git a/src/main/resources/assets/warpdrive/lang/de_DE.lang b/src/main/resources/assets/warpdrive/lang/de_DE.lang index 4375e3f4..cdde6e89 100644 --- a/src/main/resources/assets/warpdrive/lang/de_DE.lang +++ b/src/main/resources/assets/warpdrive/lang/de_DE.lang @@ -574,7 +574,7 @@ warpdrive.ship.attached_players=Verbundene Spieler: %1$s warpdrive.ship.player_attached=Du bist jetzt mit dem Schiff %1$s verbunden.\nVerbundene Spieler sind %2$s warpdrive.ship.player_detached=Du wurdest vom Schiff %1$s getrennt.\nVerbundene Spieler sind %2$s warpdrive.ship.status_line.cooling=%1$d s Abklingzeit verbleibend. -warpdrive.ship.status_line.isolation=%1$d aktive Isolations Blöcke bieten %2$2.1f%% Absorption. +warpdrive.ship.status_line.isolation=%1$d aktive Isolations Blöcke bieten %2$s%% Absorption. warpdrive.energy.status_line=Das Energie Level ist %1$s / %2$s EU. warpdrive.energy.side.changed_to_input=%1$s Seite auf Energiezufuhr Modus gestellt! diff --git a/src/main/resources/assets/warpdrive/lang/en_US.lang b/src/main/resources/assets/warpdrive/lang/en_US.lang index beb36193..959e450d 100644 --- a/src/main/resources/assets/warpdrive/lang/en_US.lang +++ b/src/main/resources/assets/warpdrive/lang/en_US.lang @@ -571,7 +571,7 @@ warpdrive.ship.attached_players=Attached players: %1$s warpdrive.ship.player_attached=You're now attached to ship %1$s.\nAttached players are %2$s warpdrive.ship.player_detached=You've been detached from ship %1$s.\nAttached players are %2$s warpdrive.ship.status_line.cooling=%1$d s left of cooldown. -warpdrive.ship.status_line.isolation=%1$d active isolation blocks providing %2$2.1f%% absorption. +warpdrive.ship.status_line.isolation=%1$d active isolation blocks providing %2$s%% absorption. warpdrive.energy.status_line=Energy level is %1$s / %2$s EU. warpdrive.energy.side.changed_to_input=%1$s side changed to energy Input mode! diff --git a/src/main/resources/assets/warpdrive/lang/fr_FR.lang b/src/main/resources/assets/warpdrive/lang/fr_FR.lang index a66fcd23..cc19d3f2 100644 --- a/src/main/resources/assets/warpdrive/lang/fr_FR.lang +++ b/src/main/resources/assets/warpdrive/lang/fr_FR.lang @@ -571,7 +571,7 @@ warpdrive.ship.attached_players=Joueurs attachés: %1$s warpdrive.ship.player_attached=Tu es désormais attaché au vaisseau %1$s.\nLes joueurs attachés sont %2$s warpdrive.ship.player_detached=Tu es désormais détaché du vaisseau %1$s.\nLes joueurs attachés sont %2$s warpdrive.ship.status_line.cooling=Encore %1$d s de refroidissement. -warpdrive.ship.status_line.isolation=Les %1$d blocs d'isolations actifs fournissent %2$2.1f%% d'absorption. +warpdrive.ship.status_line.isolation=Les %1$d blocs d'isolations actifs fournissent %2$s%% d'absorption. warpdrive.energy.status_line=Le niveau d'énergie est de %1$s / %2$s EU. warpdrive.energy.side.changed_to_input=Le coté %1$s est en mode Réception d'énergie! diff --git a/src/main/resources/assets/warpdrive/lang/nl_NL.lang b/src/main/resources/assets/warpdrive/lang/nl_NL.lang index 6fe728e3..d545af34 100644 --- a/src/main/resources/assets/warpdrive/lang/nl_NL.lang +++ b/src/main/resources/assets/warpdrive/lang/nl_NL.lang @@ -571,7 +571,7 @@ warpdrive.ship.attached_players=Aangesloten Spelers: %1$s warpdrive.ship.player_attached=Je bent nu aangesloten op schip %1$s.\nDe aangesloten spelers zijn %2$s warpdrive.ship.player_detached=Je bent nu afgesloten op schip %1$s.\nDe aangesloten spelers zijn %2$s warpdrive.ship.status_line.cooling=%1$d seconden over van afkoeling -warpdrive.ship.status_line.isolation=%1$d actieve isolatie-blokken geven %2$2.1f%% absorptie. +warpdrive.ship.status_line.isolation=%1$d actieve isolatie-blokken geven %2$s%% absorptie. warpdrive.energy.status_line=Energielevel is op %1$s / %2$s EU. warpdrive.energy.side.changed_to_input=%1$s kant verandert naar energie input modus! diff --git a/src/main/resources/assets/warpdrive/lang/ru_RU.lang b/src/main/resources/assets/warpdrive/lang/ru_RU.lang index 8b292e66..e6e3b186 100644 --- a/src/main/resources/assets/warpdrive/lang/ru_RU.lang +++ b/src/main/resources/assets/warpdrive/lang/ru_RU.lang @@ -571,7 +571,7 @@ warpdrive.ship.attached_players=Прирепленные игроки: %1$s warpdrive.ship.player_attached=Вы были прикреплены к кораблю %1$s.\nПрикрепленные игроки: %2$s warpdrive.ship.player_detached=Вы были откреплены от корабля %1$s.\nПрикрепленные игроки: %2$s warpdrive.ship.status_line.cooling=Осталось %1$d с до остывания. -warpdrive.ship.status_line.isolation=%1$d активных блоков изоляции предоставляют %2$2.1f%% поглощения. +warpdrive.ship.status_line.isolation=%1$d активных блоков изоляции предоставляют %2$s%% поглощения. warpdrive.energy.status_line=Содержит энергии: %1$s / %2$s EU. warpdrive.energy.side.changed_to_input=%1$s side changed to energy Input mode! diff --git a/src/main/resources/assets/warpdrive/lang/zh_CN.lang b/src/main/resources/assets/warpdrive/lang/zh_CN.lang index 0ad97952..cd0c47a2 100644 --- a/src/main/resources/assets/warpdrive/lang/zh_CN.lang +++ b/src/main/resources/assets/warpdrive/lang/zh_CN.lang @@ -571,7 +571,7 @@ warpdrive.ship.attached_players=所属的玩家: %1$s warpdrive.ship.player_attached=你在飞船 %1$s上.\n属于%2$s warpdrive.ship.player_detached=你已经脱离了飞船 %1$s.\n属于%2$s warpdrive.ship.status_line.cooling=%1$d s 冷却时间 -warpdrive.ship.status_line.isolation=%1$d有效的隔离方块提供%2$2.1f%%吸收. +warpdrive.ship.status_line.isolation=%1$d有效的隔离方块提供%2$s%%吸收. warpdrive.energy.status_line=能量水平%1$s / %2$s EU. warpdrive.energy.side.changed_to_input=%1$s侧面更改为能量输入模式! diff --git a/src/main/resources/assets/warpdrive/lang/zh_TW.lang b/src/main/resources/assets/warpdrive/lang/zh_TW.lang index de993be5..28a58373 100644 --- a/src/main/resources/assets/warpdrive/lang/zh_TW.lang +++ b/src/main/resources/assets/warpdrive/lang/zh_TW.lang @@ -569,7 +569,7 @@ warpdrive.ship.attached_players=屬於: %1$s warpdrive.ship.player_attached=您現在已連接到船艦 %1$s.\n這艘船艦屬於 %2$s warpdrive.ship.player_detached=您現在已從船艦分離 %1$s.\n這艘船艦屬於 %2$s warpdrive.ship.status_line.cooling=%1$d s 升降梯的冷卻中。 -warpdrive.ship.status_line.isolation=%1$d 主動隔離塊由 %2$2.1f%% 吸收。 +warpdrive.ship.status_line.isolation=%1$d 主動隔離塊由 %2$s%% 吸收。 warpdrive.energy.status_line=能量填充 %1$s / %2$s EU. warpdrive.energy.side.changed_to_input=%1$s 側面變為能量輸入模式!