Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impr(nei): simpler check for unspecified power #1232

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,13 @@ private void drawDescription(GT_Recipe recipe) {
mPower.computePowerUsageAndDuration(recipe.mEUt, recipe.mDuration);

int lineCounter = 0;
if (mPower.getEuPerTick() > 0) {
if (!(mPower instanceof UnspecifiedEUPower) && mPower.getEuPerTick() > 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This completely cut off info for some recipes
2022-08-09_17 14 09

drawLine(lineCounter, GT_Utility.trans("152", "Total: ") + mPower.getTotalPowerString());
lineCounter++;

String amperage = mPower.getAmperageString();
String powerUsage = mPower.getPowerUsageString();
if (amperage == null || amperage.equals("unspecified") || powerUsage.contains("(OC)")){
if (amperage == null || powerUsage.contains("(OC)")){
drawLine(lineCounter, GT_Utility.trans("153", "Usage: ") + powerUsage);
lineCounter++;
if (GT_Mod.gregtechproxy.mNEIOriginalVoltage) {
Expand All @@ -387,7 +387,7 @@ private void drawDescription(GT_Recipe recipe) {
lineCounter++;
}
}
if (amperage != null && !amperage.equals("unspecified") && !amperage.equals("1")) {
if (amperage != null && !amperage.equals("1")) {
drawLine(lineCounter, GT_Utility.trans("155", "Amperage: ") + amperage);
lineCounter++;
}
Expand Down