Skip to content

Commit

Permalink
Added support for GT5u reactor components.
Browse files Browse the repository at this point in the history
  • Loading branch information
MauveCloud committed Jul 4, 2015
1 parent 53b758a commit e8edd99
Show file tree
Hide file tree
Showing 26 changed files with 809 additions and 10 deletions.
5 changes: 5 additions & 0 deletions nbproject/private/private.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/E:/GitHub/Ic2ExpReactorPlanner/src/Ic2ExpReactorPlanner/TextureFactory.java</file>
<file>file:/E:/GitHub/Ic2ExpReactorPlanner/src/Ic2ExpReactorPlanner/ReactorPlannerFrame.java</file>
<file>file:/E:/GitHub/Ic2ExpReactorPlanner/src/Ic2ExpReactorPlanner/FuelRodMox.java</file>
<file>file:/E:/GitHub/Ic2ExpReactorPlanner/src/Ic2ExpReactorPlanner/ReactorComponent.java</file>
<file>file:/E:/GitHub/Ic2ExpReactorPlanner/src/Ic2ExpReactorPlanner/ComponentFactory.java</file>
<file>file:/E:/GitHub/Ic2ExpReactorPlanner/src/Ic2ExpReactorPlanner/CoolantCell360kNak.java</file>
</group>
</open-files>
</project-private>
13 changes: 12 additions & 1 deletion src/Ic2ExpReactorPlanner/ComponentFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -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()},

};

/**
Expand Down
54 changes: 54 additions & 0 deletions src/Ic2ExpReactorPlanner/CoolantCell180kHelium.java
Original file line number Diff line number Diff line change
@@ -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);
}

}
54 changes: 54 additions & 0 deletions src/Ic2ExpReactorPlanner/CoolantCell180kNak.java
Original file line number Diff line number Diff line change
@@ -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);
}

}
54 changes: 54 additions & 0 deletions src/Ic2ExpReactorPlanner/CoolantCell360kHelium.java
Original file line number Diff line number Diff line change
@@ -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);
}

}
54 changes: 54 additions & 0 deletions src/Ic2ExpReactorPlanner/CoolantCell360kNak.java
Original file line number Diff line number Diff line change
@@ -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);
}

}
2 changes: 1 addition & 1 deletion src/Ic2ExpReactorPlanner/CoolantCell60k.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package Ic2ExpReactorPlanner;

/**
* Represents a 10k Coolant Cell.
* Represents a 60k Coolant Cell.
* @author Brian McCloud
*/
public class CoolantCell60k extends ReactorComponent {
Expand Down
54 changes: 54 additions & 0 deletions src/Ic2ExpReactorPlanner/CoolantCell60kHelium.java
Original file line number Diff line number Diff line change
@@ -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);
}

}
54 changes: 54 additions & 0 deletions src/Ic2ExpReactorPlanner/CoolantCell60kNak.java
Original file line number Diff line number Diff line change
@@ -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);
}

}
Loading

0 comments on commit e8edd99

Please sign in to comment.