SU to confuse you

- Reworked some of the tooltips presented by kinetic components
This commit is contained in:
simibubi 2020-11-27 13:31:55 +01:00
parent b2e74463e3
commit bbe0914b2f
18 changed files with 49 additions and 59 deletions

View file

@ -394,16 +394,16 @@ a3a11524cd3515fc01d905767b4b7ea782adaf03 assets/create/blockstates/yellow_seat.j
7f39521b211441f5c3e06d60c5978cebe16cacfb assets/create/blockstates/zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets/create/blockstates/zinc_ore.json
67f9a92292948241e01ce6043445b2b3ddcf5350 assets/create/lang/en_ud.json
79560607a2c0adb5aee4e55dc5b1976136968b72 assets/create/lang/en_us.json
cd2dd93ca311499263387c5780ad08bc2351bb35 assets/create/lang/unfinished/de_de.json
e4a404357a223f97225651bdc35ef903f72abad4 assets/create/lang/unfinished/fr_fr.json
45b3eb5e4b3ad1dab08f5eeb87ffabe67fb42c34 assets/create/lang/unfinished/it_it.json
1b6513cb8880f8b02180c89857789851426e0888 assets/create/lang/unfinished/ja_jp.json
a1ca7668181dc77f04e637cc709cde8015246b10 assets/create/lang/unfinished/ko_kr.json
490f27bd5fe2c421f0d8e8b1dbd939f36a6ea147 assets/create/lang/unfinished/nl_nl.json
f885cbe3cdf420406bd9baa3ee06b2eaf44ee195 assets/create/lang/unfinished/pt_br.json
91a06ec754fb97031f70b09253f1ce7a12b7aadf assets/create/lang/unfinished/ru_ru.json
413c285cacf4484d1ff5f2b6b70a8d23595333e4 assets/create/lang/unfinished/zh_cn.json
64119d621b012cb67a88a72297cfbe64e276bd76 assets/create/lang/en_us.json
276e7bf74972ab6a32ffa1fcc91bb8adbfca7a45 assets/create/lang/unfinished/de_de.json
37cda56935f196f3c531afb0bf001c0ba56053c6 assets/create/lang/unfinished/fr_fr.json
96592f7ce4ed4ede69c3f42b5870d1b805f1fc23 assets/create/lang/unfinished/it_it.json
84b5c9d2586f1dd4067cdb60568420d151589e7f assets/create/lang/unfinished/ja_jp.json
4171adac242132ab5b8da5d362eeb6b9fae03213 assets/create/lang/unfinished/ko_kr.json
6798dd2c517ad9a201175fdbba5108b346478a44 assets/create/lang/unfinished/nl_nl.json
8c9358acc37b949dfc8c15fc750fd6f13a8104a3 assets/create/lang/unfinished/pt_br.json
fff47b09b35b20294dbc814fceb05430c2eec9af assets/create/lang/unfinished/ru_ru.json
c1481426852c9a0e651342ecaea541aa300a5168 assets/create/lang/unfinished/zh_cn.json
846200eb548d3bfa2e77b41039de159b4b6cfb45 assets/create/models/block/acacia_window.json
1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets/create/models/block/acacia_window_pane_noside.json
1763ea2c9b981d187f5031ba608f3d5d3be3986a assets/create/models/block/acacia_window_pane_noside_alt.json

View file

@ -720,8 +720,7 @@
"create.gui.goggles.generator_stats": "Generator Stats:",
"create.gui.goggles.kinetic_stats": "Kinetic Stats:",
"create.gui.goggles.at_current_speed": "At current Speed",
"create.gui.goggles.base_value": "Base Value",
"create.gui.goggles.at_current_speed": "at current speed",
"create.gui.gauge.info_header": "Gauge Information:",
"create.gui.speedometer.title": "Rotation Speed",
"create.gui.stressometer.title": "Network Stress",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 1051",
"_": "Missing Localizations: 1050",
"_": "->------------------------] Game Elements [------------------------<-",
@ -721,8 +721,7 @@
"create.gui.goggles.generator_stats": "UNLOCALIZED: Generator Stats:",
"create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:",
"create.gui.goggles.at_current_speed": "UNLOCALIZED: At current Speed",
"create.gui.goggles.base_value": "UNLOCALIZED: Base Value",
"create.gui.goggles.at_current_speed": "UNLOCALIZED: at current speed",
"create.gui.gauge.info_header": "UNLOCALIZED: Gauge Information:",
"create.gui.speedometer.title": "UNLOCALIZED: Rotation Speed",
"create.gui.stressometer.title": "UNLOCALIZED: Network Stress",

View file

@ -722,7 +722,6 @@
"create.gui.goggles.generator_stats": "Statistiques du générateur:",
"create.gui.goggles.kinetic_stats": "Statistiques cinétiques:",
"create.gui.goggles.at_current_speed": "À la vitesse actuelle",
"create.gui.goggles.base_value": "Valeur de base",
"create.gui.gauge.info_header": "Informations sur la jauge:",
"create.gui.speedometer.title": "Vitesse de rotation",
"create.gui.stressometer.title": "Stress du réseau",

View file

@ -722,7 +722,6 @@
"create.gui.goggles.generator_stats": "Statistiche del Generatore:",
"create.gui.goggles.kinetic_stats": "Statistiche Cinetiche:",
"create.gui.goggles.at_current_speed": "Alla velocità Attuale",
"create.gui.goggles.base_value": "Valore Base",
"create.gui.gauge.info_header": "Informazioni sul Calibro:",
"create.gui.speedometer.title": "Velocità di Rotazione",
"create.gui.stressometer.title": "Stress della Rete",

View file

@ -722,7 +722,6 @@
"create.gui.goggles.generator_stats": "ジェネレータの統計:",
"create.gui.goggles.kinetic_stats": "動力の統計:",
"create.gui.goggles.at_current_speed": "現在の速度",
"create.gui.goggles.base_value": "基本値",
"create.gui.gauge.info_header": "計器の情報:",
"create.gui.speedometer.title": "回転速度",
"create.gui.stressometer.title": "ネットワークの応力",

View file

@ -722,7 +722,6 @@
"create.gui.goggles.generator_stats": "발전 상태:",
"create.gui.goggles.kinetic_stats": "가동 상태:",
"create.gui.goggles.at_current_speed": "현재 속도",
"create.gui.goggles.base_value": "기본 수치",
"create.gui.gauge.info_header": "게이지 정보:",
"create.gui.speedometer.title": "회전 속도",
"create.gui.stressometer.title": "네트워크 부하",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 992",
"_": "Missing Localizations: 991",
"_": "->------------------------] Game Elements [------------------------<-",
@ -721,8 +721,7 @@
"create.gui.goggles.generator_stats": "UNLOCALIZED: Generator Stats:",
"create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:",
"create.gui.goggles.at_current_speed": "UNLOCALIZED: At current Speed",
"create.gui.goggles.base_value": "UNLOCALIZED: Base Value",
"create.gui.goggles.at_current_speed": "UNLOCALIZED: at current speed",
"create.gui.gauge.info_header": "UNLOCALIZED: Gauge Information:",
"create.gui.speedometer.title": "UNLOCALIZED: Rotation Speed",
"create.gui.stressometer.title": "UNLOCALIZED: Network Stress",

View file

@ -1,5 +1,5 @@
{
"_": "Missing Localizations: 1058",
"_": "Missing Localizations: 1057",
"_": "->------------------------] Game Elements [------------------------<-",
@ -721,8 +721,7 @@
"create.gui.goggles.generator_stats": "UNLOCALIZED: Generator Stats:",
"create.gui.goggles.kinetic_stats": "UNLOCALIZED: Kinetic Stats:",
"create.gui.goggles.at_current_speed": "UNLOCALIZED: At current Speed",
"create.gui.goggles.base_value": "UNLOCALIZED: Base Value",
"create.gui.goggles.at_current_speed": "UNLOCALIZED: at current speed",
"create.gui.gauge.info_header": "UNLOCALIZED: Gauge Information:",
"create.gui.speedometer.title": "UNLOCALIZED: Rotation Speed",
"create.gui.stressometer.title": "UNLOCALIZED: Network Stress",

View file

@ -722,7 +722,6 @@
"create.gui.goggles.generator_stats": "Статистика генератора:",
"create.gui.goggles.kinetic_stats": "Кинетическая статистика:",
"create.gui.goggles.at_current_speed": "На текущей скорости",
"create.gui.goggles.base_value": "Базовая стоимость",
"create.gui.gauge.info_header": "Калибровочная информация:",
"create.gui.speedometer.title": "Скорость вращения",
"create.gui.stressometer.title": "Сетевой момент",

View file

@ -722,7 +722,6 @@
"create.gui.goggles.generator_stats": "产能器状态:",
"create.gui.goggles.kinetic_stats": "动能状态:",
"create.gui.goggles.at_current_speed": "当前速度应力值",
"create.gui.goggles.base_value": "应力基础值",
"create.gui.gauge.info_header": "仪表信息:",
"create.gui.speedometer.title": "旋转速度",
"create.gui.stressometer.title": "网络应力",

View file

@ -67,9 +67,10 @@ public abstract class GeneratingKineticTileEntity extends KineticTileEntity {
speed = Math.abs(speed);
float stressTotal = stressBase * speed;
String stressString = spacing + "%s%s" + Lang.translate("generic.unit.stress") + " " + TextFormatting.DARK_GRAY + "%s";
tooltip.add(String.format(stressString, TextFormatting.AQUA, IHaveGoggleInformation.format(stressBase), Lang.translate("gui.goggles.base_value")));
tooltip.add(String.format(stressString, TextFormatting.GRAY, IHaveGoggleInformation.format(stressTotal), Lang.translate("gui.goggles.at_current_speed")));
String stressString =
spacing + "%s%s" + Lang.translate("generic.unit.stress") + " " + TextFormatting.DARK_GRAY + "%s";
tooltip.add(" " + String.format(stressString, TextFormatting.AQUA, IHaveGoggleInformation.format(stressTotal),
Lang.translate("gui.goggles.at_current_speed")));
added = true;
}

View file

@ -108,7 +108,7 @@ public interface IRotate extends IWrenchable {
StressImpact stressLevel = of(stressPercent);
TextFormatting color = stressLevel.getRelativeColor();
String level = color + ItemDescription.makeProgressBar(3, stressLevel.ordinal());
String level = color + ItemDescription.makeProgressBar(3, Math.min(stressLevel.ordinal(), 2));
level += Lang.translate("tooltip.stressImpact."+Lang.asId(stressLevel.name()));
level += String.format(" (%s%%) ", (int) (stressPercent * 100));

View file

@ -1,5 +1,12 @@
package com.simibubi.create.content.contraptions.base;
import static net.minecraft.util.text.TextFormatting.GOLD;
import static net.minecraft.util.text.TextFormatting.GRAY;
import java.util.List;
import javax.annotation.Nullable;
import com.simibubi.create.Create;
import com.simibubi.create.content.contraptions.KineticNetwork;
import com.simibubi.create.content.contraptions.RotationPropagator;
@ -13,6 +20,7 @@ import com.simibubi.create.foundation.item.TooltipHelper;
import com.simibubi.create.foundation.tileEntity.SmartTileEntity;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.utility.Lang;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.client.resources.I18n;
@ -27,12 +35,6 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World;
import javax.annotation.Nullable;
import java.util.List;
import static net.minecraft.util.text.TextFormatting.GOLD;
import static net.minecraft.util.text.TextFormatting.GRAY;
public abstract class KineticTileEntity extends SmartTileEntity
implements ITickableTileEntity, IHaveGoggleInformation, IHaveHoveringInformation {
@ -413,14 +415,11 @@ public abstract class KineticTileEntity extends SmartTileEntity
tooltip.add(spacing + Lang.translate("gui.goggles.kinetic_stats"));
tooltip.add(spacing + TextFormatting.GRAY + Lang.translate("tooltip.stressImpact"));
float stressTotal = stressAtBase * Math.abs(getSpeed());
float stressTotal = stressAtBase * Math.abs(getTheoreticalSpeed());
String stressString =
spacing + "%s%s" + Lang.translate("generic.unit.stress") + " " + TextFormatting.DARK_GRAY + "%s";
tooltip.add(String.format(stressString, TextFormatting.AQUA, IHaveGoggleInformation.format(stressAtBase),
Lang.translate("gui.goggles.base_value")));
tooltip.add(String.format(stressString, TextFormatting.GRAY, IHaveGoggleInformation.format(stressTotal),
tooltip.add(" " + String.format(stressString, TextFormatting.AQUA, IHaveGoggleInformation.format(stressTotal),
Lang.translate("gui.goggles.at_current_speed")));
added = true;

View file

@ -51,8 +51,6 @@ public class SpeedGaugeTileEntity extends GaugeTileEntity{
tooltip.add(spacing + TextFormatting.GRAY + Lang.translate("gui.speedometer.title"));
tooltip.add(spacing + SpeedLevel.getFormattedSpeedText(speed, overStressed));
if (overStressed)
tooltip.add(spacing + TextFormatting.DARK_RED + Lang.translate("gui.stressometer.overstressed"));
return true;
}

View file

@ -68,24 +68,28 @@ public class StressGaugeTileEntity extends GaugeTileEntity {
tooltip.add(spacing + TextFormatting.GRAY + Lang.translate("gui.stressometer.title"));
if (getTheoreticalSpeed() == 0)
tooltip.add(TextFormatting.DARK_GRAY + ItemDescription.makeProgressBar(3, -1)
+ Lang.translate("gui.stressometer.no_rotation"));
tooltip.add(spacing + TextFormatting.DARK_GRAY + ItemDescription.makeProgressBar(3, -1)
+ Lang.translate("gui.stressometer.no_rotation"));
else {
tooltip.add(spacing + StressImpact.getFormattedStressText(stressFraction));
tooltip.add(spacing + TextFormatting.GRAY + Lang.translate("gui.stressometer.capacity"));
double remainingCapacity = capacity - getNetworkStress();
double remainingCapacityAtBase = remainingCapacity / Math.abs(getTheoreticalSpeed());
String capacityString = spacing + StressImpact.of(stressFraction).getRelativeColor() + "%s"
+ Lang.translate("generic.unit.stress") + " " + TextFormatting.DARK_GRAY + "%s";
tooltip.add(String.format(capacityString, IHaveGoggleInformation.format(remainingCapacityAtBase),
Lang.translate("gui.goggles.base_value")));
tooltip.add(String.format(capacityString, IHaveGoggleInformation.format(remainingCapacity),
Lang.translate("gui.goggles.at_current_speed")));
String su = Lang.translate("generic.unit.stress");
if (remainingCapacity != capacity) {
String capacityString = spacing + StressImpact.of(stressFraction)
.getRelativeColor() + "%s" + su + TextFormatting.GRAY + " / " + TextFormatting.DARK_GRAY + "%s"
+ su;
tooltip.add(" " + String.format(capacityString, IHaveGoggleInformation.format(remainingCapacity),
IHaveGoggleInformation.format(capacity)));
} else {
String capacityString = spacing + StressImpact.of(stressFraction)
.getRelativeColor() + "%s" + su;
tooltip.add(" " + String.format(capacityString, IHaveGoggleInformation.format(remainingCapacity)));
}
}
return true;

View file

@ -118,7 +118,6 @@ public class ItemDescription {
add(linesOnShift, level);
}
String stressUnit = Lang.translate("generic.unit.stress");
if (hasStressImpact && !(!isEngine && ((IRotate) block).hideStressImpact())) {
List<String> stressLevels = Lang.translatedOptions("tooltip.stressImpact", "low", "medium", "high");
double impact = impacts.get(id)
@ -130,7 +129,7 @@ public class ItemDescription {
if (hasGlasses)
level += " (" + impacts.get(id)
.get() + stressUnit + ")";
.get() + "x " + rpmUnit + ")";
add(linesOnShift, GRAY + Lang.translate("tooltip.stressImpact"));
add(linesOnShift, level);
@ -147,7 +146,7 @@ public class ItemDescription {
String level = impactId.getAbsoluteColor() + makeProgressBar(3, index) + stressCapacityLevels.get(index);
if (hasGlasses)
level += " (" + capacity + stressUnit + ")";
level += " (" + capacity + "x " + rpmUnit + ")";
if (!isEngine && ((IRotate) block).showCapacityWithAnnotation())
level +=
" " + DARK_GRAY + TextFormatting.ITALIC + Lang.translate("tooltip.capacityProvided.asGenerator");

View file

@ -169,8 +169,7 @@
"create.gui.goggles.generator_stats": "Generator Stats:",
"create.gui.goggles.kinetic_stats": "Kinetic Stats:",
"create.gui.goggles.at_current_speed": "At current Speed",
"create.gui.goggles.base_value": "Base Value",
"create.gui.goggles.at_current_speed": "at current speed",
"create.gui.gauge.info_header": "Gauge Information:",
"create.gui.speedometer.title": "Rotation Speed",