From e8edd99250315f38e9c85672e2705178fd0769f5 Mon Sep 17 00:00:00 2001 From: MauveCloud Date: Sat, 4 Jul 2015 11:34:55 -0700 Subject: [PATCH] Added support for GT5u reactor components. --- nbproject/private/private.xml | 5 + .../ComponentFactory.java | 13 +- .../CoolantCell180kHelium.java | 54 ++++++++ .../CoolantCell180kNak.java | 54 ++++++++ .../CoolantCell360kHelium.java | 54 ++++++++ .../CoolantCell360kNak.java | 54 ++++++++ src/Ic2ExpReactorPlanner/CoolantCell60k.java | 2 +- .../CoolantCell60kHelium.java | 54 ++++++++ .../CoolantCell60kNak.java | 54 ++++++++ .../DualFuelRodThorium.java | 60 +++++++++ src/Ic2ExpReactorPlanner/FuelRodThorium.java | 120 ++++++++++++++++++ .../IridiumNeutronReflector.java | 42 ++++++ .../QuadFuelRodThorium.java | 60 +++++++++ .../ReactorPlannerFrame.form | 96 +++++++++++++- .../ReactorPlannerFrame.java | 80 +++++++++++- src/Ic2ExpReactorPlanner/TextureFactory.java | 17 +++ .../items/gt.180k_Helium_Coolantcell.png | Bin 0 -> 417 bytes .../items/gt.180k_NaK_Coolantcell.png | Bin 0 -> 457 bytes .../items/gt.360k_Helium_Coolantcell.png | Bin 0 -> 429 bytes .../items/gt.360k_NaK_Coolantcell.png | Bin 0 -> 480 bytes .../items/gt.60k_Helium_Coolantcell.png | Bin 0 -> 347 bytes .../textures/items/gt.60k_NaK_Coolantcell.png | Bin 0 -> 360 bytes .../textures/items/gt.Double_Thoriumcell.png | Bin 0 -> 328 bytes .../textures/items/gt.Quad_Thoriumcell.png | Bin 0 -> 469 bytes .../textures/items/gt.Thoriumcell.png | Bin 0 -> 288 bytes .../textures/items/gt.neutronreflector.png | Bin 0 -> 248 bytes 26 files changed, 809 insertions(+), 10 deletions(-) create mode 100644 src/Ic2ExpReactorPlanner/CoolantCell180kHelium.java create mode 100644 src/Ic2ExpReactorPlanner/CoolantCell180kNak.java create mode 100644 src/Ic2ExpReactorPlanner/CoolantCell360kHelium.java create mode 100644 src/Ic2ExpReactorPlanner/CoolantCell360kNak.java create mode 100644 src/Ic2ExpReactorPlanner/CoolantCell60kHelium.java create mode 100644 src/Ic2ExpReactorPlanner/CoolantCell60kNak.java create mode 100644 src/Ic2ExpReactorPlanner/DualFuelRodThorium.java create mode 100644 src/Ic2ExpReactorPlanner/FuelRodThorium.java create mode 100644 src/Ic2ExpReactorPlanner/IridiumNeutronReflector.java create mode 100644 src/Ic2ExpReactorPlanner/QuadFuelRodThorium.java create mode 100644 src/assets/gregtech/textures/items/gt.180k_Helium_Coolantcell.png create mode 100644 src/assets/gregtech/textures/items/gt.180k_NaK_Coolantcell.png create mode 100644 src/assets/gregtech/textures/items/gt.360k_Helium_Coolantcell.png create mode 100644 src/assets/gregtech/textures/items/gt.360k_NaK_Coolantcell.png create mode 100644 src/assets/gregtech/textures/items/gt.60k_Helium_Coolantcell.png create mode 100644 src/assets/gregtech/textures/items/gt.60k_NaK_Coolantcell.png create mode 100644 src/assets/gregtech/textures/items/gt.Double_Thoriumcell.png create mode 100644 src/assets/gregtech/textures/items/gt.Quad_Thoriumcell.png create mode 100644 src/assets/gregtech/textures/items/gt.Thoriumcell.png create mode 100644 src/assets/gregtech/textures/items/gt.neutronreflector.png diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml index 76d8150..f2355b0 100644 --- a/nbproject/private/private.xml +++ b/nbproject/private/private.xml @@ -3,7 +3,12 @@ + file:/E:/GitHub/Ic2ExpReactorPlanner/src/Ic2ExpReactorPlanner/TextureFactory.java + file:/E:/GitHub/Ic2ExpReactorPlanner/src/Ic2ExpReactorPlanner/ReactorPlannerFrame.java + file:/E:/GitHub/Ic2ExpReactorPlanner/src/Ic2ExpReactorPlanner/FuelRodMox.java file:/E:/GitHub/Ic2ExpReactorPlanner/src/Ic2ExpReactorPlanner/ReactorComponent.java + file:/E:/GitHub/Ic2ExpReactorPlanner/src/Ic2ExpReactorPlanner/ComponentFactory.java + file:/E:/GitHub/Ic2ExpReactorPlanner/src/Ic2ExpReactorPlanner/CoolantCell360kNak.java diff --git a/src/Ic2ExpReactorPlanner/ComponentFactory.java b/src/Ic2ExpReactorPlanner/ComponentFactory.java index eaa7f7c..ebcccf0 100644 --- a/src/Ic2ExpReactorPlanner/ComponentFactory.java +++ b/src/Ic2ExpReactorPlanner/ComponentFactory.java @@ -44,7 +44,18 @@ private ComponentFactory() { {"heatCapacityReactorPlating", new HeatCapacityReactorPlating()}, {"containmentReactorPlating", new ContainmentReactorPlating()}, {"rshCondensator", new RshCondensator()}, - {"lzhCondensator", new LzhCondensator()}, + {"lzhCondensator", new LzhCondensator()}, + {"fuelRodThorium", new FuelRodThorium()}, + {"dualFuelRodThorium", new DualFuelRodThorium()}, + {"quadFuelRodThorium", new QuadFuelRodThorium()}, + {"coolantCellHelium60k", new CoolantCell60kHelium()}, + {"coolantCellHelium180k", new CoolantCell180kHelium()}, + {"coolantCellHelium360k", new CoolantCell360kHelium()}, + {"coolantCellNak60k", new CoolantCell60kNak()}, + {"coolantCellNak180k", new CoolantCell180kNak()}, + {"coolantCellNak360k", new CoolantCell360kNak()}, + {"iridiumNeutronReflector", new IridiumNeutronReflector()}, + }; /** diff --git a/src/Ic2ExpReactorPlanner/CoolantCell180kHelium.java b/src/Ic2ExpReactorPlanner/CoolantCell180kHelium.java new file mode 100644 index 0000000..91d7f6c --- /dev/null +++ b/src/Ic2ExpReactorPlanner/CoolantCell180kHelium.java @@ -0,0 +1,54 @@ +package Ic2ExpReactorPlanner; + +/** + * Represents a 180k Helium Coolant Cell. + * @author Brian McCloud + */ +public class CoolantCell180kHelium extends ReactorComponent { + + /** + * The filename for the image to show for the component. + */ + private static final String imageFilename = "gt.180k_Helium_Coolantcell.png"; + + public static final MaterialsList MATERIALS = new MaterialsList(3, CoolantCell60kHelium.MATERIALS, 6, "Tin Plate"); + + /** + * Creates a new instance. + */ + public CoolantCell180kHelium() { + setImage(TextureFactory.getImage(imageFilename)); + setMaxHeat(180000); + } + + /** + * Gets the name of the component. + * @return the name of this component. + */ + @Override + public String toString() { + String result = "180k He Coolant Cell"; + if (getInitialHeat() > 0) { + result += String.format(" (initial heat: %,d)", (int)getInitialHeat()); + } + return result; + } + + @Override + public boolean isHeatAcceptor() { + return !isBroken(); + } + + @Override + public MaterialsList getMaterials() { + return MATERIALS; + } + + @Override + public double adjustCurrentHeat(double heat) { + currentCellCooling += heat; + bestCellCooling = Math.max(currentCellCooling, bestCellCooling); + return super.adjustCurrentHeat(heat); + } + +} diff --git a/src/Ic2ExpReactorPlanner/CoolantCell180kNak.java b/src/Ic2ExpReactorPlanner/CoolantCell180kNak.java new file mode 100644 index 0000000..43bf4fe --- /dev/null +++ b/src/Ic2ExpReactorPlanner/CoolantCell180kNak.java @@ -0,0 +1,54 @@ +package Ic2ExpReactorPlanner; + +/** + * Represents a 180k NaK Coolant Cell. + * @author Brian McCloud + */ +public class CoolantCell180kNak extends ReactorComponent { + + /** + * The filename for the image to show for the component. + */ + private static final String imageFilename = "gt.180k_NaK_Coolantcell.png"; + + public static final MaterialsList MATERIALS = new MaterialsList(3, CoolantCell60kNak.MATERIALS, 6, "Tin Plate"); + + /** + * Creates a new instance. + */ + public CoolantCell180kNak() { + setImage(TextureFactory.getImage(imageFilename)); + setMaxHeat(180000); + } + + /** + * Gets the name of the component. + * @return the name of this component. + */ + @Override + public String toString() { + String result = "180k NaK Coolant Cell"; + if (getInitialHeat() > 0) { + result += String.format(" (initial heat: %,d)", (int)getInitialHeat()); + } + return result; + } + + @Override + public boolean isHeatAcceptor() { + return !isBroken(); + } + + @Override + public MaterialsList getMaterials() { + return MATERIALS; + } + + @Override + public double adjustCurrentHeat(double heat) { + currentCellCooling += heat; + bestCellCooling = Math.max(currentCellCooling, bestCellCooling); + return super.adjustCurrentHeat(heat); + } + +} diff --git a/src/Ic2ExpReactorPlanner/CoolantCell360kHelium.java b/src/Ic2ExpReactorPlanner/CoolantCell360kHelium.java new file mode 100644 index 0000000..71a4d51 --- /dev/null +++ b/src/Ic2ExpReactorPlanner/CoolantCell360kHelium.java @@ -0,0 +1,54 @@ +package Ic2ExpReactorPlanner; + +/** + * Represents a 360k Helium Coolant Cell. + * @author Brian McCloud + */ +public class CoolantCell360kHelium extends ReactorComponent { + + /** + * The filename for the image to show for the component. + */ + private static final String imageFilename = "gt.360k_Helium_Coolantcell.png"; + + public static final MaterialsList MATERIALS = new MaterialsList(2, CoolantCell180kHelium.MATERIALS, 6, "Tin Plate", "Dense Copper Plate"); + + /** + * Creates a new instance. + */ + public CoolantCell360kHelium() { + setImage(TextureFactory.getImage(imageFilename)); + setMaxHeat(360000); + } + + /** + * Gets the name of the component. + * @return the name of this component. + */ + @Override + public String toString() { + String result = "360k He Coolant Cell"; + if (getInitialHeat() > 0) { + result += String.format(" (initial heat: %,d)", (int)getInitialHeat()); + } + return result; + } + + @Override + public boolean isHeatAcceptor() { + return !isBroken(); + } + + @Override + public MaterialsList getMaterials() { + return MATERIALS; + } + + @Override + public double adjustCurrentHeat(double heat) { + currentCellCooling += heat; + bestCellCooling = Math.max(currentCellCooling, bestCellCooling); + return super.adjustCurrentHeat(heat); + } + +} diff --git a/src/Ic2ExpReactorPlanner/CoolantCell360kNak.java b/src/Ic2ExpReactorPlanner/CoolantCell360kNak.java new file mode 100644 index 0000000..61b3824 --- /dev/null +++ b/src/Ic2ExpReactorPlanner/CoolantCell360kNak.java @@ -0,0 +1,54 @@ +package Ic2ExpReactorPlanner; + +/** + * Represents a 360k NaK Coolant Cell. + * @author Brian McCloud + */ +public class CoolantCell360kNak extends ReactorComponent { + + /** + * The filename for the image to show for the component. + */ + private static final String imageFilename = "gt.360k_NaK_Coolantcell.png"; + + public static final MaterialsList MATERIALS = new MaterialsList(2, CoolantCell180kNak.MATERIALS, 6, "Tin Plate", "Dense Copper Plate"); + + /** + * Creates a new instance. + */ + public CoolantCell360kNak() { + setImage(TextureFactory.getImage(imageFilename)); + setMaxHeat(360000); + } + + /** + * Gets the name of the component. + * @return the name of this component. + */ + @Override + public String toString() { + String result = "360k NaK Coolant Cell"; + if (getInitialHeat() > 0) { + result += String.format(" (initial heat: %,d)", (int)getInitialHeat()); + } + return result; + } + + @Override + public boolean isHeatAcceptor() { + return !isBroken(); + } + + @Override + public MaterialsList getMaterials() { + return MATERIALS; + } + + @Override + public double adjustCurrentHeat(double heat) { + currentCellCooling += heat; + bestCellCooling = Math.max(currentCellCooling, bestCellCooling); + return super.adjustCurrentHeat(heat); + } + +} diff --git a/src/Ic2ExpReactorPlanner/CoolantCell60k.java b/src/Ic2ExpReactorPlanner/CoolantCell60k.java index 8c0c0a8..f0a1981 100644 --- a/src/Ic2ExpReactorPlanner/CoolantCell60k.java +++ b/src/Ic2ExpReactorPlanner/CoolantCell60k.java @@ -1,7 +1,7 @@ package Ic2ExpReactorPlanner; /** - * Represents a 10k Coolant Cell. + * Represents a 60k Coolant Cell. * @author Brian McCloud */ public class CoolantCell60k extends ReactorComponent { diff --git a/src/Ic2ExpReactorPlanner/CoolantCell60kHelium.java b/src/Ic2ExpReactorPlanner/CoolantCell60kHelium.java new file mode 100644 index 0000000..699388f --- /dev/null +++ b/src/Ic2ExpReactorPlanner/CoolantCell60kHelium.java @@ -0,0 +1,54 @@ +package Ic2ExpReactorPlanner; + +/** + * Represents a 60k Helium Coolant Cell. + * @author Brian McCloud + */ +public class CoolantCell60kHelium extends ReactorComponent { + + /** + * The filename for the image to show for the component. + */ + private static final String imageFilename = "gt.60k_Helium_Coolantcell.png"; + + public static final MaterialsList MATERIALS = new MaterialsList("Helium Cell", 4, "Tin Plate"); + + /** + * Creates a new instance. + */ + public CoolantCell60kHelium() { + setImage(TextureFactory.getImage(imageFilename)); + setMaxHeat(60000); + } + + /** + * Gets the name of the component. + * @return the name of this component. + */ + @Override + public String toString() { + String result = "60k He Coolant Cell"; + if (getInitialHeat() > 0) { + result += String.format(" (initial heat: %,d)", (int)getInitialHeat()); + } + return result; + } + + @Override + public boolean isHeatAcceptor() { + return !isBroken(); + } + + @Override + public MaterialsList getMaterials() { + return MATERIALS; + } + + @Override + public double adjustCurrentHeat(double heat) { + currentCellCooling += heat; + bestCellCooling = Math.max(currentCellCooling, bestCellCooling); + return super.adjustCurrentHeat(heat); + } + +} diff --git a/src/Ic2ExpReactorPlanner/CoolantCell60kNak.java b/src/Ic2ExpReactorPlanner/CoolantCell60kNak.java new file mode 100644 index 0000000..f155d5e --- /dev/null +++ b/src/Ic2ExpReactorPlanner/CoolantCell60kNak.java @@ -0,0 +1,54 @@ +package Ic2ExpReactorPlanner; + +/** + * Represents a 60k NaK Coolant Cell. + * @author Brian McCloud + */ +public class CoolantCell60kNak extends ReactorComponent { + + /** + * The filename for the image to show for the component. + */ + private static final String imageFilename = "gt.60k_NaK_Coolantcell.png"; + + public static final MaterialsList MATERIALS = new MaterialsList(CoolantCell10k.MATERIALS, 2, "Sodium Dust", 4, "Potassium Dust", 4, "Tin Plate"); + + /** + * Creates a new instance. + */ + public CoolantCell60kNak() { + setImage(TextureFactory.getImage(imageFilename)); + setMaxHeat(60000); + } + + /** + * Gets the name of the component. + * @return the name of this component. + */ + @Override + public String toString() { + String result = "60k NaK Coolant Cell"; + if (getInitialHeat() > 0) { + result += String.format(" (initial heat: %,d)", (int)getInitialHeat()); + } + return result; + } + + @Override + public boolean isHeatAcceptor() { + return !isBroken(); + } + + @Override + public MaterialsList getMaterials() { + return MATERIALS; + } + + @Override + public double adjustCurrentHeat(double heat) { + currentCellCooling += heat; + bestCellCooling = Math.max(currentCellCooling, bestCellCooling); + return super.adjustCurrentHeat(heat); + } + +} diff --git a/src/Ic2ExpReactorPlanner/DualFuelRodThorium.java b/src/Ic2ExpReactorPlanner/DualFuelRodThorium.java new file mode 100644 index 0000000..2ba19bb --- /dev/null +++ b/src/Ic2ExpReactorPlanner/DualFuelRodThorium.java @@ -0,0 +1,60 @@ +package Ic2ExpReactorPlanner; + +/** + * Represents a double thorium fuel rod. + * @author Brian McCloud + */ +public class DualFuelRodThorium extends FuelRodUranium { + + /** + * The filename for the image to show for the component. + */ + private static final String imageFilename = "gt.Double_Thoriumcell.png"; + + public static final MaterialsList MATERIALS = new MaterialsList("Iron Plate", 2, FuelRodThorium.MATERIALS); + + /** + * Creates a new instance. + */ + public DualFuelRodThorium() { + setImage(TextureFactory.getImage(imageFilename)); + setMaxDamage(50000); + } + + /** + * Gets the name of the component. + * @return the name of this component. + */ + @Override + public String toString() { + return "Double Fuel Rod (Thorium)"; + } + + @Override + public double generateHeat() { + int pulses = countNeutronNeighbors() + 2; + int heat = pulses * (pulses + 1); + handleHeat(heat); + applyDamage(1.0); + return heat; + } + + @Override + public void generateEnergy() { + int pulses = countNeutronNeighbors() + 2; + final Reactor parentReactor = getParent(); + double energy = 40 * pulses; + parentReactor.addEUOutput(energy); + } + + @Override + public MaterialsList getMaterials() { + return MATERIALS; + } + + @Override + public int getRodCount() { + return 2; + } + +} diff --git a/src/Ic2ExpReactorPlanner/FuelRodThorium.java b/src/Ic2ExpReactorPlanner/FuelRodThorium.java new file mode 100644 index 0000000..f58b012 --- /dev/null +++ b/src/Ic2ExpReactorPlanner/FuelRodThorium.java @@ -0,0 +1,120 @@ +package Ic2ExpReactorPlanner; + +import java.util.List; +import java.util.ArrayList; + +/** + * Represents a single thorium fuel rod. + * @author Brian McCloud + */ +public class FuelRodThorium extends ReactorComponent { + + /** + * The filename for the image to show for the component. + */ + private static final String imageFilename = "gt.Thoriumcell.png"; + + public static final MaterialsList MATERIALS = new MaterialsList("Iron Plate", "Thorium Dust"); + + /** + * Creates a new instance. + */ + public FuelRodThorium() { + setImage(TextureFactory.getImage(imageFilename)); + setMaxDamage(50000.0); + } + + /** + * Gets the name of the component. + * @return the name of this component. + */ + @Override + public String toString() { + return "Fuel Rod (Thorium)"; + } + + @Override + public boolean isNeutronReflector() { + return !isBroken(); + } + + protected int countNeutronNeighbors() { + int neutronNeighbors = 0; + final Reactor parentReactor = getParent(); + ReactorComponent component = parentReactor.getComponentAt(getRow() + 1, getColumn()); + if (component != null && component.isNeutronReflector()) { + neutronNeighbors++; + } + component = parentReactor.getComponentAt(getRow() - 1, getColumn()); + if (component != null && component.isNeutronReflector()) { + neutronNeighbors++; + } + component = parentReactor.getComponentAt(getRow(), getColumn() - 1); + if (component != null && component.isNeutronReflector()) { + neutronNeighbors++; + } + component = parentReactor.getComponentAt(getRow(), getColumn() + 1); + if (component != null && component.isNeutronReflector()) { + neutronNeighbors++; + } + return neutronNeighbors; + } + + @Override + public double generateHeat() { + int pulses = countNeutronNeighbors() + 1; + int heat = pulses * (pulses + 1) / 2; + handleHeat(heat); + applyDamage(1.0); + return heat; + } + + @Override + public void generateEnergy() { + int pulses = countNeutronNeighbors() + 1; + final Reactor parentReactor = getParent(); + double energy = 20 * pulses; + parentReactor.addEUOutput(energy); + } + + protected void handleHeat(final int heat) { + final Reactor parentReactor = getParent(); + List heatableNeighbors = new ArrayList<>(4); + ReactorComponent component = parentReactor.getComponentAt(getRow() + 1, getColumn()); + if (component != null && component.isHeatAcceptor()) { + heatableNeighbors.add(component); + } + component = parentReactor.getComponentAt(getRow() - 1, getColumn()); + if (component != null && component.isHeatAcceptor()) { + heatableNeighbors.add(component); + } + component = parentReactor.getComponentAt(getRow(), getColumn() - 1); + if (component != null && component.isHeatAcceptor()) { + heatableNeighbors.add(component); + } + component = parentReactor.getComponentAt(getRow(), getColumn() + 1); + if (component != null && component.isHeatAcceptor()) { + heatableNeighbors.add(component); + } + if (heatableNeighbors.isEmpty()) { + parentReactor.adjustCurrentHeat(heat); + } else { + for (ReactorComponent heatableNeighbor : heatableNeighbors) { + heatableNeighbor.adjustCurrentHeat(heat / heatableNeighbors.size()); + } + int remainderHeat = heat % heatableNeighbors.size(); + heatableNeighbors.get(0).adjustCurrentHeat(remainderHeat); + } + } + + @Override + public MaterialsList getMaterials() { + return MATERIALS; + } + + @Override + public int getRodCount() { + return 1; + } + +} diff --git a/src/Ic2ExpReactorPlanner/IridiumNeutronReflector.java b/src/Ic2ExpReactorPlanner/IridiumNeutronReflector.java new file mode 100644 index 0000000..5b555a4 --- /dev/null +++ b/src/Ic2ExpReactorPlanner/IridiumNeutronReflector.java @@ -0,0 +1,42 @@ +package Ic2ExpReactorPlanner; + +/** + * Represents a thick neutron reflector. + * @author Brian McCloud + */ +public class IridiumNeutronReflector extends ReactorComponent { + + /** + * The filename for the image to show for the component. + */ + private static final String imageFilename = "gt.neutronreflector.png"; + + public static final MaterialsList MATERIALS = new MaterialsList(8, ThickNeutronReflector.MATERIALS, "Iridium Reinforced Plate"); + + /** + * Creates a new instance. + */ + public IridiumNeutronReflector() { + setImage(TextureFactory.getImage(imageFilename)); + setMaxDamage(40000); + } + + /** + * Gets the name of the component. + * @return the name of this component. + */ + @Override + public String toString() { + return "Iridium Neutron Reflector"; + } + + @Override + public MaterialsList getMaterials() { + return MATERIALS; + } + + @Override + public boolean isNeutronReflector() { + return true; + } +} diff --git a/src/Ic2ExpReactorPlanner/QuadFuelRodThorium.java b/src/Ic2ExpReactorPlanner/QuadFuelRodThorium.java new file mode 100644 index 0000000..ad340b5 --- /dev/null +++ b/src/Ic2ExpReactorPlanner/QuadFuelRodThorium.java @@ -0,0 +1,60 @@ +package Ic2ExpReactorPlanner; + +/** + * Represents a quad thorium fuel rod. + * @author Brian McCloud + */ +public class QuadFuelRodThorium extends FuelRodUranium { + + /** + * The filename for the image to show for the component. + */ + private static final String imageFilename = "gt.Quad_Thoriumcell.png"; + + public static final MaterialsList MATERIALS = new MaterialsList(3, "Iron Plate", 2, "Copper Plate", 4, FuelRodThorium.MATERIALS); + + /** + * Creates a new instance. + */ + public QuadFuelRodThorium() { + setImage(TextureFactory.getImage(imageFilename)); + setMaxDamage(50000); + } + + /** + * Gets the name of the component. + * @return the name of this component. + */ + @Override + public String toString() { + return "Quad Fuel Rod (Thorium)"; + } + + @Override + public double generateHeat() { + int pulses = countNeutronNeighbors() + 3; + int heat = 2 * pulses * (pulses + 1); + handleHeat(heat); + applyDamage(1.0); + return heat; + } + + @Override + public void generateEnergy() { + int pulses = countNeutronNeighbors() + 3; + final Reactor parentReactor = getParent(); + double energy = 80 * pulses; + parentReactor.addEUOutput(energy); + } + + @Override + public MaterialsList getMaterials() { + return MATERIALS; + } + + @Override + public int getRodCount() { + return 4; + } + +} diff --git a/src/Ic2ExpReactorPlanner/ReactorPlannerFrame.form b/src/Ic2ExpReactorPlanner/ReactorPlannerFrame.form index 296db65..182cead 100644 --- a/src/Ic2ExpReactorPlanner/ReactorPlannerFrame.form +++ b/src/Ic2ExpReactorPlanner/ReactorPlannerFrame.form @@ -149,7 +149,7 @@ - + @@ -386,6 +386,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -401,7 +491,7 @@ - + @@ -567,7 +657,7 @@ - + diff --git a/src/Ic2ExpReactorPlanner/ReactorPlannerFrame.java b/src/Ic2ExpReactorPlanner/ReactorPlannerFrame.java index 6c8203a..35f4926 100644 --- a/src/Ic2ExpReactorPlanner/ReactorPlannerFrame.java +++ b/src/Ic2ExpReactorPlanner/ReactorPlannerFrame.java @@ -191,6 +191,16 @@ private void initComponents() { containmentReactorPlatingButton = new javax.swing.JToggleButton(); rshCondensatorButton = new javax.swing.JToggleButton(); lzhCondensatorButton = new javax.swing.JToggleButton(); + fuelRodThoriumButton = new javax.swing.JToggleButton(); + dualFuelRodThoriumButton = new javax.swing.JToggleButton(); + quadFuelRodThoriumButton = new javax.swing.JToggleButton(); + coolantCellHelium60kButton = new javax.swing.JToggleButton(); + coolantCellHelium180kButton = new javax.swing.JToggleButton(); + coolantCellHelium360kButton = new javax.swing.JToggleButton(); + coolantCellNak60kButton = new javax.swing.JToggleButton(); + coolantCellNak180kButton = new javax.swing.JToggleButton(); + coolantCellNak360kButton = new javax.swing.JToggleButton(); + iridiumNeutronReflectorButton = new javax.swing.JToggleButton(); jLabel5 = new javax.swing.JLabel(); componentHeatSpinner = new javax.swing.JSpinner(); jPanel1 = new javax.swing.JPanel(); @@ -251,7 +261,7 @@ public void componentResized(java.awt.event.ComponentEvent evt) { componentsPanel.setMinimumSize(new java.awt.Dimension(160, 80)); componentsPanel.setPreferredSize(new java.awt.Dimension(160, 80)); - componentsPanel.setLayout(new java.awt.GridLayout(4, 7)); + componentsPanel.setLayout(new java.awt.GridLayout(4, 9)); componentsGroup.add(emptyButton); emptyButton.setActionCommand("empty"); @@ -382,6 +392,56 @@ public void componentResized(java.awt.event.ComponentEvent evt) { lzhCondensatorButton.setActionCommand("lzhCondensator"); componentsPanel.add(lzhCondensatorButton); + componentsGroup.add(fuelRodThoriumButton); + fuelRodThoriumButton.setToolTipText("Fuel Rod (Thorium)"); + fuelRodThoriumButton.setActionCommand("fuelRodThorium"); + componentsPanel.add(fuelRodThoriumButton); + + componentsGroup.add(dualFuelRodThoriumButton); + dualFuelRodThoriumButton.setToolTipText("Double Fuel Rod (Thorium)"); + dualFuelRodThoriumButton.setActionCommand("dualFuelRodThorium"); + componentsPanel.add(dualFuelRodThoriumButton); + + componentsGroup.add(quadFuelRodThoriumButton); + quadFuelRodThoriumButton.setToolTipText("Quad Fuel Rod (Thorium)"); + quadFuelRodThoriumButton.setActionCommand("quadFuelRodThorium"); + componentsPanel.add(quadFuelRodThoriumButton); + + componentsGroup.add(coolantCellHelium60kButton); + coolantCellHelium60kButton.setToolTipText("60k He Coolant Cell"); + coolantCellHelium60kButton.setActionCommand("coolantCellHelium60k"); + componentsPanel.add(coolantCellHelium60kButton); + + componentsGroup.add(coolantCellHelium180kButton); + coolantCellHelium180kButton.setToolTipText("180k He Coolant Cell"); + coolantCellHelium180kButton.setActionCommand("coolantCellHelium180k"); + componentsPanel.add(coolantCellHelium180kButton); + + componentsGroup.add(coolantCellHelium360kButton); + coolantCellHelium360kButton.setToolTipText("360k He Coolant Cell"); + coolantCellHelium360kButton.setActionCommand("coolantCellHelium360k"); + componentsPanel.add(coolantCellHelium360kButton); + + componentsGroup.add(coolantCellNak60kButton); + coolantCellNak60kButton.setToolTipText("60k NaK Coolant Cell"); + coolantCellNak60kButton.setActionCommand("coolantCellNak60k"); + componentsPanel.add(coolantCellNak60kButton); + + componentsGroup.add(coolantCellNak180kButton); + coolantCellNak180kButton.setToolTipText("180k NaK Coolant Cell"); + coolantCellNak180kButton.setActionCommand("coolantCellNak180k"); + componentsPanel.add(coolantCellNak180kButton); + + componentsGroup.add(coolantCellNak360kButton); + coolantCellNak360kButton.setToolTipText("360k NaK Coolant Cell"); + coolantCellNak360kButton.setActionCommand("coolantCellNak360k"); + componentsPanel.add(coolantCellNak360kButton); + + componentsGroup.add(iridiumNeutronReflectorButton); + iridiumNeutronReflectorButton.setToolTipText("Iridium Neutron Reflector"); + iridiumNeutronReflectorButton.setActionCommand("iridiumNeutronReflector"); + componentsPanel.add(iridiumNeutronReflectorButton); + gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; @@ -396,7 +456,7 @@ public void componentResized(java.awt.event.ComponentEvent evt) { gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); temperatureAndComponentsPanel.add(jLabel5, gridBagConstraints); - componentHeatSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 100000, 1)); + componentHeatSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 360000, 1)); componentHeatSpinner.setMinimumSize(new java.awt.Dimension(70, 20)); componentHeatSpinner.setPreferredSize(new java.awt.Dimension(70, 20)); gridBagConstraints = new java.awt.GridBagConstraints(); @@ -509,7 +569,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); jPanel1.add(jLabel3, gridBagConstraints); - timeSpinner.setModel(new javax.swing.SpinnerNumberModel(25000, 0, 25000, 1)); + timeSpinner.setModel(new javax.swing.SpinnerNumberModel(100000, 0, 100000, 1)); timeSpinner.setMinimumSize(new java.awt.Dimension(70, 20)); timeSpinner.setPreferredSize(new java.awt.Dimension(70, 20)); gridBagConstraints = new java.awt.GridBagConstraints(); @@ -550,7 +610,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); jPanel1.add(heatLabel, gridBagConstraints); - jSplitPane3.setRightComponent(jPanel1); + jSplitPane3.setBottomComponent(jPanel1); jSplitPane2.setRightComponent(jSplitPane3); @@ -604,7 +664,7 @@ private void plannerResized(java.awt.event.ComponentEvent evt) {//GEN-FIRST:even int buttonSize = Math.min(button.getWidth(), button.getHeight()); if (buttonSize > 2) { final ReactorComponent component = ComponentFactory.getDefaultComponent(button.getActionCommand()); - if (component != null) { + if (component != null && component.getImage() != null) { button.setIcon(new ImageIcon(component.getImage().getScaledInstance(buttonSize * 8 / 10, buttonSize * 8 / 10, Image.SCALE_FAST))); } else { button.setIcon(null); @@ -753,20 +813,29 @@ public void run() { private javax.swing.JToggleButton coolantCell10kButton; private javax.swing.JToggleButton coolantCell30kButton; private javax.swing.JToggleButton coolantCell60kButton; + private javax.swing.JToggleButton coolantCellHelium180kButton; + private javax.swing.JToggleButton coolantCellHelium360kButton; + private javax.swing.JToggleButton coolantCellHelium60kButton; + private javax.swing.JToggleButton coolantCellNak180kButton; + private javax.swing.JToggleButton coolantCellNak360kButton; + private javax.swing.JToggleButton coolantCellNak60kButton; private javax.swing.JToggleButton coreHeatExchangerButton; private javax.swing.JToggleButton dualFuelRodMoxButton; + private javax.swing.JToggleButton dualFuelRodThoriumButton; private javax.swing.JToggleButton dualFuelRodUraniumButton; private javax.swing.JToggleButton emptyButton; private javax.swing.JRadioButton euReactorRadio; private javax.swing.JMenu fileMenu; private javax.swing.JRadioButton fluidReactorRadio; private javax.swing.JToggleButton fuelRodMoxButton; + private javax.swing.JToggleButton fuelRodThoriumButton; private javax.swing.JToggleButton fuelRodUraniumButton; private javax.swing.JToggleButton heatCapacityReactorPlatingButton; private javax.swing.JToggleButton heatExchangerButton; private javax.swing.JLabel heatLabel; private javax.swing.JSpinner heatSpinner; private javax.swing.JToggleButton heatVentButton; + private javax.swing.JToggleButton iridiumNeutronReflectorButton; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; @@ -788,6 +857,7 @@ public void run() { private javax.swing.JScrollPane outputPane; private javax.swing.JToggleButton overclockedHeatVentButton; private javax.swing.JToggleButton quadFuelRodMoxButton; + private javax.swing.JToggleButton quadFuelRodThoriumButton; private javax.swing.JToggleButton quadFuelRodUraniumButton; private javax.swing.JToggleButton reactorHeatVentButton; private javax.swing.JPanel reactorPanel; diff --git a/src/Ic2ExpReactorPlanner/TextureFactory.java b/src/Ic2ExpReactorPlanner/TextureFactory.java index 171f296..d0d591a 100644 --- a/src/Ic2ExpReactorPlanner/TextureFactory.java +++ b/src/Ic2ExpReactorPlanner/TextureFactory.java @@ -36,6 +36,14 @@ public static Image getImage(String imageName) { return entryImage; } } + entry = zip.getEntry("assets/gregtech/textures/items/" + imageName); + if (entry != null) { + InputStream entryStream = zip.getInputStream(entry); + BufferedImage entryImage = ImageIO.read(entryStream); + if (entryImage != null) { + return entryImage; + } + } } catch (IOException ex) { Logger.getLogger(TextureFactory.class.getName()).log(Level.SEVERE, null, ex); } @@ -49,6 +57,15 @@ public static Image getImage(String imageName) { Logger.getLogger(TextureFactory.class.getName()).log(Level.SEVERE, null, ex); } } + stream = TextureFactory.class.getResourceAsStream("/assets/gregtech/textures/items/" + imageName); + if (stream != null) { + try { + BufferedImage image = ImageIO.read(stream); + return image; + } catch (IOException ex) { + Logger.getLogger(TextureFactory.class.getName()).log(Level.SEVERE, null, ex); + } + } return null; } diff --git a/src/assets/gregtech/textures/items/gt.180k_Helium_Coolantcell.png b/src/assets/gregtech/textures/items/gt.180k_Helium_Coolantcell.png new file mode 100644 index 0000000000000000000000000000000000000000..c23aa325fab688e327d8b9f73275989317a7a8b2 GIT binary patch literal 417 zcmV;S0bc%zP)pWU@$7_xQ11=ETEb>2P5VEwcz$D77-eGpx5j1`F-Z& ztvq}SS2%bwPI1eBuvH-cwmMI!kofgu2XEmDiH~jjeYdcP*c?RB7S99NTKIHY0I*yx z@I2V>Uu-SpqwM>BW!^7GIZ2YjZnau$Hk(pRuItto({8tud)3S@yYG)4G-IA100000 LNkvXXu0mjf+x4@( literal 0 HcmV?d00001 diff --git a/src/assets/gregtech/textures/items/gt.180k_NaK_Coolantcell.png b/src/assets/gregtech/textures/items/gt.180k_NaK_Coolantcell.png new file mode 100644 index 0000000000000000000000000000000000000000..2506423df7452b46634576cf3e98dff04db8490d GIT binary patch literal 457 zcmV;)0XF`LP)&{k~^J_M168TpQlo( z=;UZL0>HLyeHRg7suUu^a5%&?O%?HzmSy2M4kxik9LK@)JUq{%UrS>c28LmfNG9pm z(kP|KX0tQVza`!6eFJd*-VWjG$twU)0YY@KPsA}k_A{X`~{p)ua1*bW{y#s>@WoCg=igZ|||I3(bYZIu@0OuU*DLdj)# z&cu467wT^r7Ll+A$1h28)dH8>har5L*acv}^+m2);Apy~IeH4VZDUy$_0JTf0@0nD zH^#rQ>$=3A!3E;+czBsi(_DF(27`gDyUqLnJs*|c%_`&=00000NkvXXu0mjfEO)<| literal 0 HcmV?d00001 diff --git a/src/assets/gregtech/textures/items/gt.360k_Helium_Coolantcell.png b/src/assets/gregtech/textures/items/gt.360k_Helium_Coolantcell.png new file mode 100644 index 0000000000000000000000000000000000000000..5ce1cdf742aa9a39ed6387719da29728b2053e45 GIT binary patch literal 429 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G^tAk28_ZrvZCAbW|YuPggqW;q@vX_e@;>I@8wR-P`7Ar_~XPTt#fC_upNe21Qy z)D3oyh?8QGin(hp-ME#NJ=tbr{)TOKjjd12G+E4#-s0TWX!5dr+l4=Z5uEp4)s@dk ze0JvVgQLnvQ+LK>U4QboPXDh`<;I8&H*-!s_*%vKpul2EzO7(gsGy+UbnbPpv(|I` z+UGBGoQEy{NTJWHWlJ)>1X?1dwWdb)97}Fea0#91xBUB}uhVSu`wSUAw{3fC%CP#X zRPuqsL#tK`wRxmBtcns1*lYafN6w}{{@omZoqW`UdphO1I~lxcch@p*xLuog+i6mc z<^1!xY~Oe8ei>JrJI`GG^j1bgFcv+|IrD5WjqR{Qmday4UeL75EKg_$=l6r_PMI{x)aX<(De!cg?hqKi3ib U{-NtlV8AkXy85}Sb4q9e0Q*t3y8r+H literal 0 HcmV?d00001 diff --git a/src/assets/gregtech/textures/items/gt.360k_NaK_Coolantcell.png b/src/assets/gregtech/textures/items/gt.360k_NaK_Coolantcell.png new file mode 100644 index 0000000000000000000000000000000000000000..8f5958a09931a8e559e79359736c5f5dd03d05ac GIT binary patch literal 480 zcmV<60U!Q}P)AX&t%2reRsrQm2kLmdl+;^HDmH|gTi zW++G@h!Bbry7&RIv}X5putpz3MSRo!@8116e#gOyPi%s6xh#)u9u9{hvS}_Bi`47& zu((((0I+R4%xOZfk`f^Vp66j0hSWAi(=>4$hnwgtj^p6_KECfWX{OM19bMOnClXAW zDWsHSGMTmM?nu4D60bYrZuYF`$KV5ix5^n_cSK*CZ>I`j2yrw(DdpBc$~D86%7gOh zKP`kHvJvTYn%dZ>G;48xeholvoS-yoaT~t`;A-$qDQHn$<#1hhp8-I&VI8Hl-L>@! zOFDt2K6yD{-tkl) z=s&7q(3kA_&~wt3d$UC>yOdfIIT#+yY2G+1Jap=rO>dl!EU?ntlxzKAk0^tKSCK}P z!^F#5>~_Bkn$4)Wz%5VAwDscG0;8$%t)7ghHx=x)FSNVba=7sFc_xOQ_ODY{e4BCp zS`_1CrdELsxv7n%dXvnK+;-lk^M$L>Bte%uq+?m$mQ8yUIAj>OMUL`0^t(Qqv)}bo o&F!7iDzARq-CXyR|6h>4IhX&e_@BC`fPQB1boFyt=akR{0L`F>h5!Hn literal 0 HcmV?d00001 diff --git a/src/assets/gregtech/textures/items/gt.60k_NaK_Coolantcell.png b/src/assets/gregtech/textures/items/gt.60k_NaK_Coolantcell.png new file mode 100644 index 0000000000000000000000000000000000000000..5c9e20951fecab92706643b3871a1bcc65eef3ca GIT binary patch literal 360 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G^tAk28_ZrvZCAbW|YuPggqW;q^qmMbbD(}6-?JzX3_EKVmUED$hA66WFH_|flM zbGVIH;#K5^%(C+G^n#+Iqy!+iu{~d&Sy|cT{$lt3fAg)&`Hl*x<(M5bDPMUvHR4c7 zZzB*q{9nJO?@%6t&*$FA+maGMAZ8qQRFW-%x4}|UHldhR*sgW9lDeSD4A$9K>`LTAFK>=ME7_{N!;0AFaNGpaz6h9Uk?lB zjjuPWH{UN((VrmIk-F!$;hqLvfx9pv#(j62I}Ch|Khz2Z+9=~ Uv)f;g3G^U?r>mdKI;Vst00g#(!~g&Q literal 0 HcmV?d00001 diff --git a/src/assets/gregtech/textures/items/gt.Quad_Thoriumcell.png b/src/assets/gregtech/textures/items/gt.Quad_Thoriumcell.png new file mode 100644 index 0000000000000000000000000000000000000000..fa65528d478a46a31f1b9f15fd5dfb4fc661595b GIT binary patch literal 469 zcmV;`0V@89P)A$8q(W|7lAu%aWofn9t|cPyY8kF-ejNV7J@h zx-Ml|qLgZNqk|+#Dy=n2DW=mYx7!V+6tmfkPyT#9F*-P%PW1bIEXzVl$>DGyO;g6> zaqY+Bv3B40%>r6$E|&`cX`1rC=XuWK@o4PJ*ui?eMoLK#1pMT_?<0gTcVOE#QcC0W zPaXsTj^kiiR&#{+q{U+K(O=Jbo;SY(&+`}z26Q?dvMeLZvW5d}w_6;?X^!xU>-EZN zwPLwkHhjO|f9^nQUC-L<_4v&jw@?%Xp6AskjYcDe!(pqtu4@+PcDqJpAp}B*R^Mzk zUq%7jwh6=>N31*00000 LNkvXXu0mjf!@JTR literal 0 HcmV?d00001 diff --git a/src/assets/gregtech/textures/items/gt.Thoriumcell.png b/src/assets/gregtech/textures/items/gt.Thoriumcell.png new file mode 100644 index 0000000000000000000000000000000000000000..11cd5c53c78d8e7996cbf130b43feb6b4030564a GIT binary patch literal 288 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G^tAk28_ZrvZCAbW|YuPggqW;q@Xv)S2_H-JKGJzX3_EKYBotjKpnLBu6}wh+^* zK54}rteoM_-z>hGib^ywUJBW;>TFl*-AN@npVj~KGT3Nl=We_Hq(<|N!CLh`N{yQ^6!n|~g=L$>LRITFZF|>HTAvb#S zi-oNpB(Jq9v@kFPc>NaeYZdq(^b literal 0 HcmV?d00001