aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java')
-rw-r--r--src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java42
1 files changed, 28 insertions, 14 deletions
diff --git a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java
index 030a9ad06a..1425dba1e9 100644
--- a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java
+++ b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java
@@ -180,7 +180,7 @@ public class GT_NEI_DefaultHandler
if ((!(tStack instanceof FixedPositionedStack)) || (((FixedPositionedStack) tStack).mChance <= 0) || (((FixedPositionedStack) tStack).mChance == 10000)) {
break;
}
- currenttip.add("Chance: " + ((FixedPositionedStack) tStack).mChance / 100 + "." + (((FixedPositionedStack) tStack).mChance % 100 < 10 ? "0" + ((FixedPositionedStack) tStack).mChance % 100 : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100)) + "%");
+ currenttip.add(trans("150","Chance: ") + ((FixedPositionedStack) tStack).mChance / 100 + "." + (((FixedPositionedStack) tStack).mChance % 100 < 10 ? "0" + ((FixedPositionedStack) tStack).mChance % 100 : Integer.valueOf(((FixedPositionedStack) tStack).mChance % 100)) + "%");
break;
}
}
@@ -190,7 +190,7 @@ public class GT_NEI_DefaultHandler
(tStack.item.stackSize != 0)) {
break;
}
- currenttip.add("Does not get consumed in the process");
+ currenttip.add(trans("151","Does not get consumed in the process"));
break;
}
}
@@ -204,24 +204,25 @@ public class GT_NEI_DefaultHandler
String[] recipeDesc = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.getNeiDesc();
if (recipeDesc == null) {
if (tEUt != 0) {
- drawText(10, 73, "Total: " + tDuration * tEUt + " EU", -16777216);
- drawText(10, 83, "Usage: " + tEUt + " EU/t", -16777216);
+ drawText(10, 73, trans("152","Total: ") + tDuration * tEUt + " EU", -16777216);
+ drawText(10, 83, trans("153","Usage: ") + tEUt + " EU/t", -16777216);
if (this.mRecipeMap.mShowVoltageAmperageInNEI) {
- drawText(10, 93, "Voltage: " + tEUt / this.mRecipeMap.mAmperage + " EU", -16777216);
- drawText(10, 103, "Amperage: " + this.mRecipeMap.mAmperage, -16777216);
+ drawText(10, 93, trans("154","Voltage: ") + tEUt / this.mRecipeMap.mAmperage + " EU", -16777216);
+ drawText(10, 103, trans("155","Amperage: ") + this.mRecipeMap.mAmperage, -16777216);
} else {
- drawText(10, 93, "Voltage: unspecified", -16777216);
- drawText(10, 103, "Amperage: unspecified", -16777216);
+ drawText(10, 93, trans("156","Voltage: unspecified"), -16777216);
+ drawText(10, 103, trans("157","Amperage: unspecified"), -16777216);
}
}
if (tDuration > 0) {
- drawText(10, 113, "Time: " + (tDuration < 20 ? "< 1" : Integer.valueOf(tDuration / 20)) + " secs", -16777216);
+// drawText(10, 113, trans("158","Time: ") + (tDuration < 20 ? "< 1" : Integer.valueOf(tDuration / 20)) + trans("161"," secs"), -16777216);
+ drawText(10, 113, String.format("%s%.2f%s", trans("158","Time: "), 0.05 * tDuration, trans("161"," secs")), -16777216);
}
int tSpecial = ((CachedDefaultRecipe) this.arecipes.get(aRecipeIndex)).mRecipe.mSpecialValue;
if (tSpecial == -100 && GT_Mod.gregtechproxy.mLowGravProcessing) {
- drawText(10, 123, "Needs Low Gravity", -16777216);
- } else if (tSpecial == -200) {
- drawText(10, 123, "Needs Cleanroom", -16777216);
+ drawText(10, 123, trans("159","Needs Low Gravity"), -16777216);
+ } else if (tSpecial == -200 && GT_Mod.gregtechproxy.mEnableCleanroom) {
+ drawText(10, 123, trans("160","Needs Cleanroom"), -16777216);
} else if ((GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePre)) || (GT_Utility.isStringValid(this.mRecipeMap.mNEISpecialValuePost))) {
drawText(10, 123, this.mRecipeMap.mNEISpecialValuePre + tSpecial * this.mRecipeMap.mNEISpecialValueMultiplier + this.mRecipeMap.mNEISpecialValuePost, -16777216);
}
@@ -358,13 +359,22 @@ public class GT_NEI_DefaultHandler
public class CachedDefaultRecipe
extends TemplateRecipeHandler.CachedRecipe {
public final GT_Recipe mRecipe;
- public final List<PositionedStack> mOutputs = new ArrayList();
- public final List<PositionedStack> mInputs = new ArrayList();
+ public final List<PositionedStack> mOutputs;
+ public final List<PositionedStack> mInputs;
public CachedDefaultRecipe(GT_Recipe aRecipe) {
super();
this.mRecipe = aRecipe;
+ if (aRecipe.getInputPositionedStacks() != null && aRecipe.getOutputPositionedStacks() != null) {
+ mInputs = aRecipe.getInputPositionedStacks();
+ mOutputs = aRecipe.getOutputPositionedStacks();
+ return;
+ }
+
+ mOutputs = new ArrayList<PositionedStack>();
+ mInputs = new ArrayList<PositionedStack>();
+
int tStartIndex = 0;
switch (GT_NEI_DefaultHandler.this.mRecipeMap.mUsualInputCount) {
case 0:
@@ -810,5 +820,9 @@ public class GT_NEI_DefaultHandler
public List<PositionedStack> getOtherStacks() {
return this.mOutputs;
}
+ }
+
+ public String trans(String aKey, String aEnglish){
+ return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_"+aKey, aEnglish, false);
}
}