aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2022-01-16 19:51:13 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2022-01-16 19:51:13 +0000
commite5eeec1ffc3eab063c765da7bb889017d87aabdd (patch)
tree9387d445ff67c9001ac69c760184c6573afa7147
parent222b1d640fb66dff8a865307c3ecf27db34f17ae (diff)
downloadGT5-Unofficial-e5eeec1ffc3eab063c765da7bb889017d87aabdd.tar.gz
GT5-Unofficial-e5eeec1ffc3eab063c765da7bb889017d87aabdd.tar.bz2
GT5-Unofficial-e5eeec1ffc3eab063c765da7bb889017d87aabdd.zip
Added Recipe for Computer Cube MKII, Turbine Shaft, Rotor Assembly & Elemental Duplicator.
Removed a whole heap of pointless Reactor Planner files/functions. Hide some of the modes in the Computer Cube.
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/AutomationSimulator.java250
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/Bundle.properties411
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/BundleHelper.java43
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/Bundle_zh_CN.properties373
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/MaterialsList.java302
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/Reactor.java43
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/ReactorPlannerFrame.form2260
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/SimulationData.java2
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/components/ReactorItem.java4
-rw-r--r--src/main/java/Ic2ExpReactorPlanner/components/Reflector.java3
-rw-r--r--src/main/java/gtPlusPlus/core/recipe/RECIPES_Machines.java117
-rw-r--r--src/main/java/gtPlusPlus/core/recipe/common/CI.java2
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java17
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_Container_ComputerCube.java207
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/computer/GT_GUIContainer_ComputerCube.java49
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java10
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/misc/GT_TileEntity_ComputerCube.java354
-rw-r--r--src/main/resources/assets/miscutils/textures/gui/computer/0.pngbin3702 -> 2335 bytes
-rw-r--r--src/main/resources/assets/miscutils/textures/gui/computer/2.pngbin3481 -> 2147 bytes
19 files changed, 676 insertions, 3771 deletions
diff --git a/src/main/java/Ic2ExpReactorPlanner/AutomationSimulator.java b/src/main/java/Ic2ExpReactorPlanner/AutomationSimulator.java
index 488de59a8d..729642e837 100644
--- a/src/main/java/Ic2ExpReactorPlanner/AutomationSimulator.java
+++ b/src/main/java/Ic2ExpReactorPlanner/AutomationSimulator.java
@@ -1,8 +1,5 @@
package Ic2ExpReactorPlanner;
-import static Ic2ExpReactorPlanner.BundleHelper.formatI18n;
-import static Ic2ExpReactorPlanner.BundleHelper.getI18n;
-
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.List;
@@ -24,8 +21,6 @@ public class AutomationSimulator {
private final GT_TileEntity_ComputerCube mReactor;
- private final boolean[][] alreadyBroken = new boolean[6][9];
-
private final boolean[][] needsCooldown = new boolean[6][9];
private final int initialHeat;
@@ -77,13 +72,11 @@ public class AutomationSimulator {
private int lapisUsed = 0;
- private final MaterialsList replacedItems = new MaterialsList();
-
- private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat(getI18n("Simulation.DecimalFormat"));
private boolean completed = false;
private boolean mRunning = false;
+ private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("#,##0.##");
private final SimulationData data = new SimulationData();
public SimulationData getData() {
@@ -116,7 +109,7 @@ public class AutomationSimulator {
int totalRodCount = 0;
publish(""); // NOI18N
- publish(getI18n("Simulation.Started"));
+ publish("Simulation.Started");
reactor.setCurrentHeat(initialHeat);
reactor.clearVentedHeat();
double minReactorHeat = initialHeat;
@@ -241,40 +234,34 @@ public class AutomationSimulator {
calculateHeatingCooling(reactorTicks);
handleAutomation(reactorTicks);
- handleBrokenComponents(reactorTicks, totalHeatOutput, totalRodCount, totalEUoutput, minReactorHeat, maxReactorHeat);
}
if (hasStopped()) {
- publish(formatI18n("Simulation.CancelledAtTick", reactorTicks));
+ publish("Simulation.CancelledAtTick", reactorTicks);
}
data.minTemp = (int) minReactorHeat;
data.maxTemp = (int) maxReactorHeat;
- publish(formatI18n("Simulation.ReactorMinTemp", minReactorHeat));
- publish(formatI18n("Simulation.ReactorMaxTemp", maxReactorHeat));
+ publish("Simulation.ReactorMinTemp", minReactorHeat);
+ publish("Simulation.ReactorMaxTemp", maxReactorHeat);
if (reactor.getCurrentHeat() < reactor.getMaxHeat()) {
- publish(formatI18n("Simulation.TimeWithoutExploding", reactorTicks));
+ publish("Simulation.TimeWithoutExploding", reactorTicks);
if (reactor.isPulsed()) {
String rangeString = "";
if (maxActiveTime > minActiveTime) {
- rangeString = formatI18n("Simulation.ActiveTimeRange", minActiveTime, maxActiveTime);
+ rangeString = rangeString("Simulation.ActiveTimeRange", minActiveTime, maxActiveTime);
}
else if (minActiveTime < activeTime) {
- rangeString = formatI18n("Simulation.ActiveTimeSingle", minActiveTime);
+ rangeString = "Simulation.ActiveTimeSingle "+minActiveTime;
}
- publish(formatI18n("Simulation.ActiveTime", activeTime, rangeString));
+ publish("Simulation.ActiveTime", activeTime, rangeString);
rangeString = "";
if (maxInactiveTime > minInactiveTime) {
- rangeString = formatI18n("Simulation.InactiveTimeRange", minInactiveTime, maxInactiveTime);
+ rangeString = rangeString("Simulation.InactiveTimeRange", minInactiveTime, maxInactiveTime);
}
else if (minInactiveTime < inactiveTime) {
- rangeString = formatI18n("Simulation.InactiveTimeSingle", minInactiveTime);
+ rangeString = "Simulation.InactiveTimeSingle " + minInactiveTime;
}
- publish(formatI18n("Simulation.InactiveTime", inactiveTime, rangeString));
- }
- final String replacedItemsString = replacedItems.toString();
- if (!replacedItemsString.isEmpty()) {
- data.replacedItems = new MaterialsList(replacedItems);
- publish(formatI18n("Simulation.ComponentsReplaced", replacedItemsString));
+ publish("Simulation.InactiveTime", inactiveTime, rangeString);
}
if (reactorTicks > 0) {
@@ -285,10 +272,10 @@ public class AutomationSimulator {
data.minHUoutput = 2 * minHeatOutput;
data.maxHUoutput = (int) (2 * maxHeatOutput);
if (totalHeatOutput > 0) {
- publish(formatI18n("Simulation.HeatOutputs", DECIMAL_FORMAT.format(40 * totalHeatOutput), DECIMAL_FORMAT.format(2 * totalHeatOutput / reactorTicks), DECIMAL_FORMAT.format(2
- * minHeatOutput), DECIMAL_FORMAT.format(2 * maxHeatOutput)));
+ publish("Simulation.HeatOutputs", DECIMAL_FORMAT.format(40 * totalHeatOutput), DECIMAL_FORMAT.format(2 * totalHeatOutput / reactorTicks), DECIMAL_FORMAT.format(2
+ * minHeatOutput), DECIMAL_FORMAT.format(2 * maxHeatOutput));
if (totalRodCount > 0) {
- publish(formatI18n("Simulation.Efficiency", totalHeatOutput / reactorTicks / 4 / totalRodCount, minHeatOutput / 4 / totalRodCount, maxHeatOutput / 4 / totalRodCount));
+ publish("Simulation.Efficiency", totalHeatOutput / reactorTicks / 4 / totalRodCount, minHeatOutput / 4 / totalRodCount, maxHeatOutput / 4 / totalRodCount);
}
}
}
@@ -298,17 +285,17 @@ public class AutomationSimulator {
data.minEUoutput = minEUoutput / 20.0;
data.maxEUoutput = (int) (maxEUoutput / 20.0);
if (totalEUoutput > 0) {
- publish(formatI18n("Simulation.EUOutputs", DECIMAL_FORMAT.format(totalEUoutput), DECIMAL_FORMAT.format(totalEUoutput / (reactorTicks * 20)), DECIMAL_FORMAT.format(minEUoutput
- / 20.0), DECIMAL_FORMAT.format(maxEUoutput / 20.0)));
+ publish("Simulation.EUOutputs", DECIMAL_FORMAT.format(totalEUoutput), DECIMAL_FORMAT.format(totalEUoutput / (reactorTicks * 20)), DECIMAL_FORMAT.format(minEUoutput
+ / 20.0), DECIMAL_FORMAT.format(maxEUoutput / 20.0));
if (totalRodCount > 0) {
- publish(formatI18n("Simulation.Efficiency", totalEUoutput / reactorTicks / 100 / totalRodCount, minEUoutput / 100 / totalRodCount, maxEUoutput / 100 / totalRodCount));
+ publish("Simulation.Efficiency", totalEUoutput / reactorTicks / 100 / totalRodCount, minEUoutput / 100 / totalRodCount, maxEUoutput / 100 / totalRodCount);
}
}
}
}
if (reactor.getCurrentHeat() > 0.0) {
- publish(formatI18n("Simulation.ReactorRemainingHeat", reactor.getCurrentHeat()));
+ publish("Simulation.ReactorRemainingHeat", reactor.getCurrentHeat());
}
double prevReactorHeat = reactor.getCurrentHeat();
double prevTotalComponentHeat = 0.0;
@@ -319,13 +306,13 @@ public class AutomationSimulator {
if (component.getCurrentHeat() > 0.0) {
prevTotalComponentHeat += component.getCurrentHeat();
publish(String.format("R%dC%d:0xFFA500", row, col)); // NOI18N
- component.info.append(formatI18n("ComponentInfo.RemainingHeat", component.getCurrentHeat()));
+ component.info.append("ComponentInfo.RemainingHeat " + component.getCurrentHeat());
}
}
}
}
if (prevReactorHeat == 0.0 && prevTotalComponentHeat == 0.0) {
- publish(getI18n("Simulation.NoCooldown"));
+ publish("Simulation.NoCooldown");
}
else if (reactor.getCurrentHeat() < reactor.getMaxHeat()) {
double currentTotalComponentHeat = prevTotalComponentHeat;
@@ -360,7 +347,7 @@ public class AutomationSimulator {
if (component != null && !component.isBroken()) {
currentTotalComponentHeat += component.getCurrentHeat();
if (component.getCurrentHeat() == 0.0 && needsCooldown[row][col]) {
- component.info.append(formatI18n("ComponentInfo.CooldownTime", cooldownTicks));
+ component.info.append("ComponentInfo.CooldownTime " + cooldownTicks);
needsCooldown[row][col] = false;
}
}
@@ -370,17 +357,17 @@ public class AutomationSimulator {
while (lastHeatOutput > 0 && cooldownTicks < 50000);
if (reactor.getCurrentHeat() < reactor.getMaxHeat()) {
if (reactor.getCurrentHeat() == 0.0) {
- publish(formatI18n("Simulation.ReactorCooldownTime", reactorCooldownTime));
+ publish("Simulation.ReactorCooldownTime", reactorCooldownTime);
}
else if (reactorCooldownTime > 0) {
- publish(formatI18n("Simulation.ReactorResidualHeat", reactor.getCurrentHeat(), reactorCooldownTime));
+ publish("Simulation.ReactorResidualHeat", reactor.getCurrentHeat(), reactorCooldownTime);
}
- publish(formatI18n("Simulation.TotalCooldownTime", cooldownTicks));
+ publish("Simulation.TotalCooldownTime", cooldownTicks);
}
}
}
else {
- publish(formatI18n("Simulation.ReactorOverheatedTime", reactorTicks));
+ publish("Simulation.ReactorOverheatedTime", reactorTicks);
explosionPower = 10.0;
double explosionPowerMult = 1.0;
for (int row = 0; row < 6; row++) {
@@ -393,7 +380,7 @@ public class AutomationSimulator {
}
}
explosionPower *= explosionPowerMult;
- publish(formatI18n("Simulation.ExplosionPower", explosionPower));
+ publish("Simulation.ExplosionPower", explosionPower);
}
double totalEffectiveVentCooling = 0.0;
double totalVentCoolingCapacity = 0.0;
@@ -405,81 +392,82 @@ public class AutomationSimulator {
ReactorItem component = reactor.getComponentAt(row, col);
if (component != null) {
if (component.getVentCoolingCapacity() > 0) {
- component.info.append(formatI18n("ComponentInfo.UsedCooling", component.getBestVentCooling(), component.getVentCoolingCapacity()));
+ component.info.append("ComponentInfo.UsedCooling " + component.getBestVentCooling() + " | " + component.getVentCoolingCapacity());
totalEffectiveVentCooling += component.getBestVentCooling();
totalVentCoolingCapacity += component.getVentCoolingCapacity();
}
else if (component.getBestCellCooling() > 0) {
- component.info.append(formatI18n("ComponentInfo.ReceivedHeat", component.getBestCellCooling()));
+ component.info.append("ComponentInfo.ReceivedHeat " + component.getBestCellCooling());
totalCellCooling += component.getBestCellCooling();
}
else if (component.getBestCondensatorCooling() > 0) {
- component.info.append(formatI18n("ComponentInfo.ReceivedHeat", component.getBestCondensatorCooling()));
+ component.info.append("ComponentInfo.ReceivedHeat " + component.getBestCondensatorCooling());
totalCondensatorCooling += component.getBestCondensatorCooling();
}
else if (component.getMaxHeatGenerated() > 0) {
if (!reactor.isFluid() && component.getMaxEUGenerated() > 0) {
- component.info.append(formatI18n("ComponentInfo.GeneratedEU", component.getMinEUGenerated(), component.getMaxEUGenerated()));
+ component.info.append("ComponentInfo.GeneratedEU " + component.getMinEUGenerated() + " | " + component.getMaxEUGenerated());
}
- component.info.append(formatI18n("ComponentInfo.GeneratedHeat", component.getMinHeatGenerated(), component.getMaxHeatGenerated()));
+ component.info.append("ComponentInfo.GeneratedHeat " + component.getMinHeatGenerated() + " | " + component.getMaxHeatGenerated());
}
if (component.getMaxReachedHeat() > 0) {
- component.info.append(formatI18n("ComponentInfo.ReachedHeat", component.getMaxReachedHeat(), component.getMaxHeat()));
+ component.info.append("ComponentInfo.ReachedHeat " + component.getMaxReachedHeat() + " | " + component.getMaxHeat());
}
}
}
}
// if (totalVentCoolingCapacity > 0) {
- // publish(formatI18n("Simulation.TotalVentCooling",
- // totalEffectiveVentCooling, totalVentCoolingCapacity));
+ // publish("Simulation.TotalVentCooling",
+ // totalEffectiveVentCooling, totalVentCoolingCapacity);
// }
showHeatingCooling(reactorTicks); // Call to show this info in case it
// hasn't already been shown, such
// as for an automated reactor.
if (totalCellCooling > 0) {
- publish(formatI18n("Simulation.TotalCellCooling", totalCellCooling));
+ publish("Simulation.TotalCellCooling", totalCellCooling);
}
if (totalCondensatorCooling > 0) {
- publish(formatI18n("Simulation.TotalCondensatorCooling", totalCondensatorCooling));
+ publish("Simulation.TotalCondensatorCooling", totalCondensatorCooling);
}
if (maxGeneratedHeat > 0) {
- publish(formatI18n("Simulation.MaxHeatGenerated", maxGeneratedHeat));
+ publish("Simulation.MaxHeatGenerated", maxGeneratedHeat);
}
if (redstoneUsed > 0) {
- publish(formatI18n("Simulation.RedstoneUsed", redstoneUsed));
+ publish("Simulation.RedstoneUsed", redstoneUsed);
}
if (lapisUsed > 0) {
- publish(formatI18n("Simulation.LapisUsed", lapisUsed));
+ publish("Simulation.LapisUsed", lapisUsed);
}
// double totalCooling = totalEffectiveVentCooling + totalCellCooling +
// totalCondensatorCooling;
// if (totalCooling >= maxGeneratedHeat) {
- // publish(formatI18n("Simulation.ExcessCooling", totalCooling -
- // maxGeneratedHeat));
+ // publish("Simulation.ExcessCooling", totalCooling -
+ // maxGeneratedHeat);
// } else {
- // publish(formatI18n("Simulation.ExcessHeating", maxGeneratedHeat -
- // totalCooling));
+ // publish("Simulation.ExcessHeating", maxGeneratedHeat -
+ // totalCooling);
// }
// return null;
/* catch (Throwable e) {
if (cooldownTicks == 0) {
- publish(formatI18n("Simulation.ErrorReactor", reactorTicks));
+ publish("Simulation.ErrorReactor", reactorTicks);
} else {
- publish(formatI18n("Simulation.ErrorCooldown", cooldownTicks));
+ publish("Simulation.ErrorCooldown", cooldownTicks);
}
- publish(e.toString(), " ", Arrays.toString(e.getStackTrace())); // NO18N
+ publish(e.toString(), " ", Arrays.toString(e.getStackTrace()); // NO18N
}*/
data.explosionPower = (int) explosionPower;
data.totalReactorTicks = reactorTicks;
long endTime = System.nanoTime();
- publish(formatI18n("Simulation.ElapsedTime", (endTime - startTime) / 1e9));
+ publish("Simulation.ElapsedTime", (endTime - startTime) / 1e9);
mRunning = false;
completed = true;
}
+
public boolean hasStopped() {
return !mRunning;
}
@@ -488,88 +476,6 @@ public class AutomationSimulator {
return mRunning;
}
- private void handleBrokenComponents(final int reactorTicks, final double totalHeatOutput, final int totalRodCount, final double totalEUoutput, final double minReactorHeat, final double maxReactorHeat) {
- for (int row = 0; row < 6; row++) {
- for (int col = 0; col < 9; col++) {
- ReactorItem component = reactor.getComponentAt(row, col);
- if (component != null && component.isBroken() && !alreadyBroken[row][col]) {
- alreadyBroken[row][col] = true;
- if (component.getRodCount() == 0) {
- publish(String.format("R%dC%d:0xFF0000", row, col)); // NOI18N
- component.info.append(formatI18n("ComponentInfo.BrokeTime", reactorTicks));
- if (componentsIntact) {
- componentsIntact = false;
- data.firstComponentBrokenTime = reactorTicks;
- data.firstComponentBrokenRow = row;
- data.firstComponentBrokenCol = col;
- data.firstComponentBrokenDescription = component.toString();
- publish(formatI18n("Simulation.FirstComponentBrokenDetails", component.toString(), row, col, reactorTicks));
- if (reactor.isFluid()) {
- data.prebreakTotalHUoutput = 40 * totalHeatOutput;
- data.prebreakAvgHUoutput = 2 * totalHeatOutput / reactorTicks;
- data.prebreakMinHUoutput = 2 * minHeatOutput;
- data.prebreakMaxHUoutput = 2 * maxHeatOutput;
- publish(formatI18n("Simulation.HeatOutputsBeforeBreak", DECIMAL_FORMAT.format(40 * totalHeatOutput), DECIMAL_FORMAT.format(2 * totalHeatOutput
- / reactorTicks), DECIMAL_FORMAT.format(2 * minHeatOutput), DECIMAL_FORMAT.format(2 * maxHeatOutput)));
- if (totalRodCount > 0) {
- publish(formatI18n("Simulation.Efficiency", totalHeatOutput / reactorTicks / 4 / totalRodCount, minHeatOutput / 4 / totalRodCount, maxHeatOutput / 4
- / totalRodCount));
- }
- }
- else {
- data.prebreakTotalEUoutput = totalEUoutput;
- data.prebreakAvgEUoutput = totalEUoutput / (reactorTicks * 20);
- data.prebreakMinEUoutput = minEUoutput / 20.0;
- data.prebreakMaxEUoutput = maxEUoutput / 20.0;
- publish(formatI18n("Simulation.EUOutputsBeforeBreak", DECIMAL_FORMAT.format(totalEUoutput), DECIMAL_FORMAT.format(totalEUoutput
- / (reactorTicks * 20)), DECIMAL_FORMAT.format(minEUoutput / 20.0), DECIMAL_FORMAT.format(maxEUoutput / 20.0)));
- if (totalRodCount > 0) {
- publish(formatI18n("Simulation.Efficiency", totalEUoutput / reactorTicks / 100 / totalRodCount, minEUoutput / 100 / totalRodCount, maxEUoutput / 100
- / totalRodCount));
- }
- }
- }
- }
- else if (!anyRodsDepleted) {
- anyRodsDepleted = true;
- data.firstRodDepletedTime = reactorTicks;
- data.firstRodDepletedRow = row;
- data.firstRodDepletedCol = col;
- data.firstRodDepletedDescription = component.toString();
- publish(formatI18n("Simulation.FirstRodDepletedDetails", component.toString(), row, col, reactorTicks));
- if (reactor.isFluid()) {
- data.predepleteTotalHUoutput = 40 * totalHeatOutput;
- data.predepleteAvgHUoutput = 2 * totalHeatOutput / reactorTicks;
- data.predepleteMinHUoutput = 2 * minHeatOutput;
- data.predepleteMaxHUoutput = 2 * maxHeatOutput;
- publish(formatI18n("Simulation.HeatOutputsBeforeDepleted", DECIMAL_FORMAT.format(40 * totalHeatOutput), DECIMAL_FORMAT.format(2 * totalHeatOutput
- / reactorTicks), DECIMAL_FORMAT.format(2 * minHeatOutput), DECIMAL_FORMAT.format(2 * maxHeatOutput)));
- if (totalRodCount > 0) {
- publish(formatI18n("Simulation.Efficiency", totalHeatOutput / reactorTicks / 4 / totalRodCount, minHeatOutput / 4 / totalRodCount, maxHeatOutput / 4 / totalRodCount));
- }
- }
- else {
- data.predepleteTotalEUoutput = totalEUoutput;
- data.predepleteAvgEUoutput = totalEUoutput / (reactorTicks * 20);
- data.predepleteMinEUoutput = minEUoutput / 20.0;
- data.predepleteMaxEUoutput = maxEUoutput / 20.0;
- publish(formatI18n("Simulation.EUOutputsBeforeDepleted", DECIMAL_FORMAT.format(totalEUoutput), DECIMAL_FORMAT.format(totalEUoutput
- / (reactorTicks * 20)), DECIMAL_FORMAT.format(minEUoutput / 20.0), DECIMAL_FORMAT.format(maxEUoutput / 20.0)));
- if (totalRodCount > 0) {
- publish(formatI18n("Simulation.Efficiency", totalEUoutput / reactorTicks / 100 / totalRodCount, minEUoutput / 100 / totalRodCount, maxEUoutput / 100 / totalRodCount));
- }
- }
- data.predepleteMinTemp = minReactorHeat;
- data.predepleteMaxTemp = maxReactorHeat;
- publish(formatI18n("Simulation.ReactorMinTempBeforeDepleted", minReactorHeat));
- publish(formatI18n("Simulation.ReactorMaxTempBeforeDepleted", maxReactorHeat));
- }
- showHeatingCooling(reactorTicks);
- }
- }
- }
- }
-
private void handleAutomation(final int reactorTicks) {
for (int row = 0; row < 6; row++) {
for (int col = 0; col < 9; col++) {
@@ -578,8 +484,7 @@ public class AutomationSimulator {
if (component.getMaxHeat() > 1) {
if (component.getAutomationThreshold() > component.getInitialHeat() && component.getCurrentHeat() >= component.getAutomationThreshold()) {
component.clearCurrentHeat();
- replacedItems.add(component.name);
- component.info.append(formatI18n("ComponentInfo.ReplacedTime", reactorTicks));
+ component.info.append("ComponentInfo.ReplacedTime | " + reactorTicks);
if (component.getReactorPause() > 0) {
active = false;
pauseTimer = Math.max(pauseTimer, component.getReactorPause());
@@ -590,8 +495,7 @@ public class AutomationSimulator {
}
else if (component.getAutomationThreshold() < component.getInitialHeat() && component.getCurrentHeat() <= component.getAutomationThreshold()) {
component.clearCurrentHeat();
- replacedItems.add(component.name);
- component.info.append(formatI18n("ComponentInfo.ReplacedTime", reactorTicks));
+ component.info.append("ComponentInfo.ReplacedTime | " +reactorTicks);
if (component.getReactorPause() > 0) {
active = false;
pauseTimer = Math.max(pauseTimer, component.getReactorPause());
@@ -603,8 +507,7 @@ public class AutomationSimulator {
}
else if (component.isBroken() || (component.getMaxDamage() > 1 && component.getCurrentDamage() >= component.getAutomationThreshold())) {
component.clearDamage();
- replacedItems.add(component.name);
- component.info.append(formatI18n("ComponentInfo.ReplacedTime", reactorTicks));
+ component.info.append("ComponentInfo.ReplacedTime | " +reactorTicks);
if (component.getReactorPause() > 0) {
active = false;
pauseTimer = Math.max(pauseTimer, component.getReactorPause());
@@ -629,32 +532,32 @@ public class AutomationSimulator {
private void checkReactorTemperature(final int reactorTicks) {
if (reactor.getCurrentHeat() < 0.5 * reactor.getMaxHeat() && !reachedBelow50 && reachedEvaporate) {
- publish(formatI18n("Simulation.TimeToBelow50", reactorTicks));
+ publish("Simulation.TimeToBelow50", reactorTicks);
reachedBelow50 = true;
data.timeToBelow50 = reactorTicks;
}
if (reactor.getCurrentHeat() >= 0.4 * reactor.getMaxHeat() && !reachedBurn) {
- publish(formatI18n("Simulation.TimeToBurn", reactorTicks));
+ publish("Simulation.TimeToBurn", reactorTicks);
reachedBurn = true;
data.timeToBurn = reactorTicks;
}
if (reactor.getCurrentHeat() >= 0.5 * reactor.getMaxHeat() && !reachedEvaporate) {
- publish(formatI18n("Simulation.TimeToEvaporate", reactorTicks));
+ publish("Simulation.TimeToEvaporate", reactorTicks);
reachedEvaporate = true;
data.timeToEvaporate = reactorTicks;
}
if (reactor.getCurrentHeat() >= 0.7 * reactor.getMaxHeat() && !reachedHurt) {
- publish(formatI18n("Simulation.TimeToHurt", reactorTicks));
+ publish("Simulation.TimeToHurt", reactorTicks);
reachedHurt = true;
data.timeToHurt = reactorTicks;
}
if (reactor.getCurrentHeat() >= 0.85 * reactor.getMaxHeat() && !reachedLava) {
- publish(formatI18n("Simulation.TimeToLava", reactorTicks));
+ publish("Simulation.TimeToLava", reactorTicks);
reachedLava = true;
data.timeToLava = reactorTicks;
}
if (reactor.getCurrentHeat() >= reactor.getMaxHeat() && !reachedExplode) {
- publish(formatI18n("Simulation.TimeToXplode", reactorTicks));
+ publish("Simulation.TimeToXplode", reactorTicks);
reachedExplode = true;
data.timeToXplode = reactorTicks;
}
@@ -698,25 +601,54 @@ public class AutomationSimulator {
data.ventCooling = totalVentCooling / (reactorTicks - 20);
data.ventCoolingCapacity = totalVentCoolingCapacity;
if (totalHullHeating > 0) {
- publish(formatI18n("Simulation.HullHeating", totalHullHeating / (reactorTicks - 20)));
+ publish("Simulation.HullHeating", totalHullHeating / (reactorTicks - 20));
}
if (totalComponentHeating > 0) {
- publish(formatI18n("Simulation.ComponentHeating", totalComponentHeating / (reactorTicks - 20)));
+ publish("Simulation.ComponentHeating", totalComponentHeating / (reactorTicks - 20));
}
if (totalHullCoolingCapacity > 0) {
- publish(formatI18n("Simulation.HullCooling", totalHullCooling / (reactorTicks - 20), totalHullCoolingCapacity));
+ publish("Simulation.HullCooling | " +totalHullCooling / (reactorTicks - 20), totalHullCoolingCapacity);
}
if (totalVentCoolingCapacity > 0) {
- publish(formatI18n("Simulation.VentCooling", totalVentCooling / (reactorTicks - 20), totalVentCoolingCapacity));
+ publish("Simulation.VentCooling | " +totalVentCooling / (reactorTicks - 20), totalVentCoolingCapacity);
}
}
}
}
+
+ private void publish(String string, double currentHeat, int reactorCooldownTime) {
+ publish(string + " | "+currentHeat+" | "+reactorCooldownTime);
+ }
+ private void publish(String string, double d, double e, double f) {
+ publish(string + " | "+d+" | "+e+" | "+f);
+ }
+
+ private void publish(String string, String format, String format2, String format3, String format4) {
+ publish(string + " | "+format+" | "+format2+" | "+format3+" | "+format4);
+ }
+
+ private void publish(String string, int activeTime2, String rangeString) {
+ publish(string + " | "+activeTime2+" | "+rangeString);
+ }
+
+ private void publish(String aString, double aData) {
+ publish(aString+":"+aData);
+ }
+
+ private void publish(String aString, long aData) {
+ publish(aString+":"+aData);
+ }
+
private void publish(String aString) {
output.add(aString);
+ }
+
+ private String rangeString(String string, int aMin, int aMax) {
+ return string+" ("+aMin+"-"+aMax+")";
}
+
protected void process(List<String> chunks) {
/*
for (String chunk : chunks) {
diff --git a/src/main/java/Ic2ExpReactorPlanner/Bundle.properties b/src/main/java/Ic2ExpReactorPlanner/Bundle.properties
deleted file mode 100644
index b20587693f..0000000000
--- a/src/main/java/Ic2ExpReactorPlanner/Bundle.properties
+++ /dev/null
@@ -1,411 +0,0 @@
-
-# Comparison keys are for comparing two simulated reactors. Instead of being in
-# in a TextArea like the main simulation, the comparison will be in a JLabel, wrapped
-# in html tags, to allow color coding of the text more easily.
-
-Comparison.CompareDecimalFormat=+#,##0.##;-#
-Comparison.ComponentHeating=Component heating: %s (%s/%s)<br>
-Comparison.ComponentsHeading=Components:<br>
-Comparison.ComponentsReplacedHeading=Components replaced:<br>
-Comparison.Default=Please run at least two simulations (preferably with different reactor designs) to get a comparison.
-Comparison.EUEUoutput=total output: %s (%s/%s) EU (%s EU/t average (%s/%s), %s EU/t min (%s/%s), %s EU/t max (%s/%s))<br>
-Comparison.EUHUoutput=total output: %s EU / %s HU (%s EU/t / %s HU/t average, %s EU/t / %s HU/t min, %s EU/t / %s HU/t max)<br>
-Comparison.Header=Most recent simulated reactor (left, in-grid) compared to previous simulated reactor (right, in-tab):
-Comparison.HUEUoutput=total output: %s HU / %s EU (%s HU/t / %s EU/t average, %s HU/t / %s EU/t min, %s HU/t / %s EU/t max)<br>
-Comparison.HUHUoutput=total output: %s (%s/%s) HU (%s HU/t average (%s/%s), %s HU/t min (%s/%s), %s HU/t max (%s/%s))<br>
-Comparison.HullCooling=Hull cooling: %s (%s/%s)<br>
-Comparison.HullCoolingPossible=Possible hull cooling: %s (%s/%s)<br>
-Comparison.HullHeating=Hull heating: %s (%s/%s)<br>
-Comparison.MaterialsEntry=<font color="%s">%s %s (%s/%s)</font><br>
-Comparison.MaterialsHeading=Materials:<br>
-Comparison.NoDifferences=No significant differences detected.
-Comparison.PostsimMaxTemp=Reactor maximum temperature: %s (%s/%s)<br>
-Comparison.PostsimMinTemp=Reactor minimum temperature: %s (%s/%s)<br>
-Comparison.PredepleteMaxTemp=Reactor maximum temperature (before first fuel rod depleted): %s (%s/%s)<br>
-Comparison.PredepleteMinTemp=Reactor minimum temperature (before first fuel rod depleted): %s (%s/%s)<br>
-Comparison.Prefix.PostSimulation=After simulation,\u0020
-Comparison.Prefix.PostSimulationTime=Time simulated:\u0020
-Comparison.Prefix.Prebreak=Before first component broken,\u0020
-Comparison.Prefix.PrebreakTime=Time to first component break:\u0020
-Comparison.Prefix.Predeplete=Before first rod depleted,\u0020
-Comparison.Prefix.PredepleteTime=Time to first rod depletion:\u0020
-Comparison.Prefix.TimeToBelow50=Time to below 50%% heat (after being above it):\u0020
-Comparison.Prefix.TimeToBurn=Time to "Burn" temperature:\u0020
-Comparison.Prefix.TimeToEvaporate=Time to "Evaporate" temperature:\u0020
-Comparison.Prefix.TimeToHurt=Time to "Hurt" temperature:\u0020
-Comparison.Prefix.TimeToLava=Time to "Lava" temperature:\u0020
-Comparison.Prefix.TimeToXplode=Time to explode:\u0020
-Comparison.SimpleDecimalFormat=#,##0.##
-Comparison.Time.Both=%+,d seconds (%d/%d)<br>
-Comparison.Time.BothColored=<font color="%s">%+,d</font> seconds (%d/%d)<br>
-Comparison.Time.LeftOnly=%d/\u221e<br>
-Comparison.Time.RightOnly=\u221e/%d<br>
-Comparison.VentCooling=Vent cooling: %s (%s/%s)<br>
-Comparison.VentCoolingPossible=Possible vent cooling: %s (%s/%s)<br>
-
-# ComponentData keys are for providing extra details in the tooltips for the component palette.
-# Suggested by kekzdealer in Pull Request: https://github.com/MauveCloud/Ic2ExpReactorPlanner/pull/67
-# but heavily modified since.
-
-ComponentData.AdvancedHeatExchanger=Heat Capacity: 10,000 <br> Hull Exchange Rate: 8 heat/s <br> Component Exchange Rate: 24 heat/s
-ComponentData.AdvancedHeatVent=Heat Capacity: 1,000 <br> Self Venting Rate: 12 heat/s
-ComponentData.ComponentHeatExchanger=Heat Capacity: 5,000 <br> Component Exchange Rate: 36 heat/s
-ComponentData.ComponentHeatVent=Component Venting Rate: 4 heat/s
-ComponentData.ContainmentReactorPlating=Dampens explosions
-ComponentData.CoolantCell10k=Heat Capacity: 10,000
-ComponentData.CoolantCell180kHelium=Heat Capacity: 180,000
-ComponentData.CoolantCell180kNak=Heat Capacity: 180,000
-ComponentData.CoolantCell30k=Heat Capacity: 30,000
-ComponentData.CoolantCell360kHelium=Heat Capacity: 360,000
-ComponentData.CoolantCell360kNak=Heat Capacity: 360,000
-ComponentData.CoolantCell60k=Heat Capacity: 60,000
-ComponentData.CoolantCell60kHelium=Heat Capacity: 60,000
-ComponentData.CoolantCell60kNak=Heat Capacity: 60,000
-ComponentData.CoolantCell180kSpace=Heat Capacity: 180,000
-ComponentData.CoolantCell360kSpace=Heat Capacity: 360,000
-ComponentData.CoolantCell540kSpace=Heat Capacity: 540,000
-ComponentData.CoolantCell1080kSpace=Heat Capacity: 1080,000
-ComponentData.DualFuelRodCesium=Generation Time: 10,861 seconds <br> EU Generation: 40/60/80/100/120 /t <br> Heat Generation: 6/12/20/30/42 /s
-ComponentData.DualFuelRodCoaxium=Generation Time: 20,000 seconds <br> EU Generation: 20/30/40/50/60 /t <br> Heat Generation: 0 /s
-ComponentData.DualFuelRodMox=Generation Time: 10,000 seconds <br> EU Generation: [20,100)/[30,150)/[40,200)/[50,250)/[60,300) /t - scales linearly with hull temperature.<br> Heat Generation in EU reactor or when hull temperature&lt;=50%: 24/48/80/120/168 /s <br> Heat Generation in fluid reactor when hull temperature&gt;50%: 48/96/160/240/336 /s
-ComponentData.DualFuelRodNaquadah=Generation Time: 100,000 seconds <br> EU Generation: [40,100)/[60,150)/[80,200)/[100,250)/[120,300) /t - scales linearly with hull temperature. <br> Heat Generation in EU reactor or when hull temperature&lt;=50%: 24/48/80/120/168 /s <br> Heat Generation in fluid reactor when hull temperature&gt;50%: 48/96/160/240/336 /s
-ComponentData.DualFuelRodNaquadahGTNH=Generation Time: 100,000 seconds <br> EU Generation: 20/30/40/50/60 /t <br> Heat Generation: 24/48/80/120/168 /s
-ComponentData.DualFuelRodNaquadria=Generation Time: 100,000 seconds <br> EU Generation: [40,100)/[60,150)/[80,200)/[100,250)/[120,300) /t - scales linearly with hull temperature. <br> Heat Generation in EU reactor or when hull temperature&lt;=50%: 24/48/80/120/168 /s <br> Heat Generation in fluid reactor when hull temperature&gt;50%: 48/96/160/240/336 /s
-ComponentData.DualFuelRodThorium=Generation Time: 50,000 seconds <br> EU Generation: 4/6/8/10/12 /t <br> Heat Generation: 6/12/20/30/42 /s
-ComponentData.DualFuelRodTiberium=Generation Time: 50,000 seconds <br> EU Generation: 10/20/30/40/50 /t <br> Heat Generation: 12/24/40/60/84 /s
-ComponentData.DualFuelRodUranium=Generation Time: 20,000 seconds <br> EU Generation: 20/30/40/50/60 /t <br> Heat Generation: 24/48/80/120/168 /s
-ComponentData.FuelRodCesium=Generation Time: 10,861 seconds <br> EU Generation: 10/20/30/40/50 /t <br> Heat Generation: 1/3/8/10/15 /s
-ComponentData.FuelRodCoaxium=Generation Time: 20,000 seconds <br> EU Generation: 5/10/15/20/25 /t <br> Heat Generation: 0 /s
-ComponentData.FuelRodMox=Generation Time: 10,000 seconds <br> EU Generation: [5,25)/[10,50)/[15,75)/[20,100)/[25,125) /t - scales linearly with hull temperature.<br> Heat Generation in EU reactor or when hull temperature&lt;=50%: 4/12/24/40/60 /s <br> Heat Generation in fluid reactor when hull temperature&gt;50%: 8/24/48/80/120 /s
-ComponentData.FuelRodNaquadah=Generation Time: 100,000 seconds <br> EU Generation: [10,25)/[20,50)/[30,75)/[40,100)/[50,125) /t - scales linearly with hull temperature.<br> Heat Generation in EU reactor or when hull temperature&lt;=50%: 4/12/24/40/60 /s <br> Heat Generation in fluid reactor when hull temperature&gt;50%: 8/24/48/80/120 /s
-ComponentData.FuelRodNaquadahGTNH=Generation Time: 100,000 seconds <br> EU Generation: 5/10/15/20/25 /t <br> Heat Generation: 4/12/24/40/60 /s
-ComponentData.FuelRodNaquadria=Generation Time: 100,000 seconds <br> EU Generation: [10,25)/[20,50)/[30,75)/[40,100)/[50,125) /t - scales linearly with hull temperature.<br> Heat Generation in EU reactor or when hull temperature&lt;=50%: 4/12/24/40/60 /s <br> Heat Generation in fluid reactor when hull temperature&gt;50%: 8/24/48/80/120 /s
-ComponentData.FuelRodTheCore=Generation Time: 100,000 seconds <br> EU Generation: 10880 /t <br> Heat Generation: 19584 /s
-ComponentData.FuelRodThorium=Generation Time: 50,000 seconds <br> EU Generation: 1/2/3/4/5 /t <br> Heat Generation: 1/3/6/10/15 /s
-ComponentData.FuelRodTiberium=Generation Time: 50,000 seconds <br> EU Generation: 5/10/15/20/25 /t <br> Heat Generation: 2/6/12/20/30 /s
-ComponentData.FuelRodUranium=Generation Time: 20,000 seconds <br> EU Generation: 5/10/15/20/25 /t <br> Heat Generation: 4/12/24/40/60 /s
-ComponentData.HeatCapacityReactorPlating=Increases maximum heat capacity
-ComponentData.HeatExchanger=Heat Capacity: 2,500 <br> Hull Exchange Rate: 4 heat/s <br> Component Exchange Rate: 12 heat/s
-ComponentData.HeatVent=Heat Capacity: 1,000 <br> Self Venting Rate: 6 heat/s
-ComponentData.IridiumNeutronReflector=Durability: Infinite
-ComponentData.LzhCondensator=Heat Capacity: 100,000 <br> Cannot be vented from.
-ComponentData.NeutronReflector=Durability: 30,000 (10,000 in MC 1.7.10)
-ComponentData.OverclockedHeatVent=Heat Capacity: 1,000 <br> Self Venting Rate: 20 heat/s <br> Hull Cooling Rate: 36 heat/s
-ComponentData.QuadFuelRodCesium=Generation Time: 10,861 seconds <br> EU Generation: 120/160/200/240/280 /t <br> Heat Generation: 24/40/60/84/112 /s
-ComponentData.QuadFuelRodCoaxium=Generation Time: 20,000 seconds <br> EU Generation: 60/80/100/120/140 /t <br> Heat Generation: 0 /s
-ComponentData.QuadFuelRodMox=Generation Time: 10,000 seconds <br> EU Generation: [60,300)/[80,400)/[100,500)/[120,600)/[140,700) /t - scales linearly with hull temperature.<br> Heat Generation in EU reactor or when hull temperature&lt;=50%: 96/160/240/336/448 /s <br> Heat Generation in fluid reactor when hull temperature&gt;50%: 192/320/480/672/896 /s
-ComponentData.QuadFuelRodNaquadah=Generation Time: 100,000 seconds <br> EU Generation: [120,300)/[160,400)/[200,500)/[240,600)/[280,700) /t - scales linearly with hull temperature.<br> Heat Generation in EU reactor or when hull temperature&lt;=50%: 96/160/240/336/448