Skip to content

Commit

Permalink
0.7.5
Browse files Browse the repository at this point in the history
* Added lightweight TTK for lower-end machines
- 10% performance hit but significantly less accurate
* TTK is now only run if the total build results in more than 100 DPS to
avoid deadlocks
- Current timeout works, but you'll still be locked for the timeout
duration
* Added new Primed Pistol Gambit mod to the default mods database
  • Loading branch information
GottFaust committed Jun 27, 2015
1 parent 33d57bb commit 7186dc4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/etc/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class Constants {

/** Frame Title **/
public static final String APP_TITLE = "Warframe Weapon DPS Calculator";
public static final String APP_VERSION = "v0.7.4";
public static final String APP_VERSION = "v0.7.5";

/** ToolTips **/
public static final String NAME_TOOL_TIP = "The weapon's name.";
Expand Down Expand Up @@ -294,6 +294,7 @@ public class Constants {
"Primed Chamber,Rifle,3,1,FirstShotDamage,0.25,V,4",
"Primed Fast Hands,Rifle,10,1,ReladSpeed,0.05,~,2",
"Primed Heated Charge,Pistol,10,1,FireDamage,0.15,~,6",
"Primed Pistol Gambit,Pistol,10,1,CritChance,0.17,V,2",
"Primed Point Blank,Shotgun,10,1,DamageBonus,0.15,V,4",
"Primed Ravage,Shotgun,10,1,CritMultiplier,0.1,V,4",
"Quickdraw,Pistol,5,1,ReladSpeed,0.08,~,2",
Expand Down
41 changes: 32 additions & 9 deletions src/main/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ public class Main {
protected static Boolean modManagerInit = false;
protected static Boolean targetManagerInit = false;
protected static Boolean colorOptionsInit = false;
protected static JCheckBox advancedTTKBox = new JCheckBox("Run TTK");
protected static JCheckBox TTKBox = new JCheckBox("TTK");
protected static JCheckBox lightWeightTTKBox = new JCheckBox("Lightweight TTK");
protected static JLabel targetGroupLabel = new JLabel("Group:");
protected static JComboBox targetGroupBox = new JComboBox();
protected static JLabel corrosiveProjectionLabel = new JLabel("CP Count:");
Expand Down Expand Up @@ -267,7 +268,8 @@ public static void buildUI(){
UIBuilder.menuItemInit(loadItem);
UIBuilder.menuItemInit(colorOptionsItem);
UIBuilder.fileChooserInit(chooser);
UIBuilder.checkBoxInit(advancedTTKBox);
UIBuilder.checkBoxInit(TTKBox);
UIBuilder.checkBoxInit(lightWeightTTKBox);
UIBuilder.labelInit(corrosiveProjectionLabel);
UIBuilder.labelInit(targetGroupLabel);
UIBuilder.comboBoxInit(corrosiveProjectionBox);
Expand All @@ -292,7 +294,8 @@ public static void buildUI(){
}

calculateButton.addActionListener(action);
advancedTTKBox.addActionListener(action);
TTKBox.addActionListener(action);
lightWeightTTKBox.addActionListener(action);
clearButton.addActionListener(action);
clearOutputButton.addActionListener(action);
saveItem.addActionListener(action);
Expand Down Expand Up @@ -320,7 +323,8 @@ public static void buildUI(){
buttonPanel.add(corrosiveProjectionBox);
buttonPanel.add(targetGroupLabel);
buttonPanel.add(targetGroupBox);
buttonPanel.add(advancedTTKBox);
buttonPanel.add(TTKBox);
buttonPanel.add(lightWeightTTKBox);
buttonPanel.add(calculateButton);
buttonPanel.add(clearButton);
buttonPanel.add(clearOutputButton);
Expand All @@ -329,8 +333,10 @@ public static void buildUI(){
corrosiveProjectionBox.setToolTipText("Number of Corrosive Projection auras active.");
targetGroupLabel.setToolTipText("Target group to run calculations against.");
targetGroupBox.setToolTipText("Target group to run calculations against.");
advancedTTKBox.setToolTipText("Warning: This will cause a significantly performance hit compared to not running TTK.");
advancedTTKBox.setSelected(useComplexTTK);
TTKBox.setToolTipText("Warning: This will cause a significantly performance hit compared to not running TTK.");
lightWeightTTKBox.setToolTipText("This will have about 10% of the performance impact of normal TTK, but will be less accurate.");
TTKBox.setSelected(useComplexTTK);
lightWeightTTKBox.setSelected(!TTKBox.isSelected());

JPanel dataPanel = new JPanel();
UIBuilder.panelInit(dataPanel);
Expand Down Expand Up @@ -405,7 +411,7 @@ public static void calculateDPS(){
groupTargets.add(target);
}
}
if(useComplexTTK){
if(useComplexTTK && (raw.rawPerSecond > 100.0)){
complexTTKCompletions = 0;
for(TTKTarget target : groupTargets){
target.runAdvancedTTK();
Expand Down Expand Up @@ -2494,8 +2500,25 @@ public MainActionListener(){
public void actionPerformed(ActionEvent e) {
if(e.getSource().equals(calculateButton)){
calculateDPS();
}else if(e.getSource().equals(advancedTTKBox)){
useComplexTTK = advancedTTKBox.isSelected();
}else if(e.getSource().equals(TTKBox) || e.getSource().equals(lightWeightTTKBox)){
useComplexTTK = (TTKBox.isSelected() || lightWeightTTKBox.isSelected());
if(e.getSource().equals(TTKBox)){
if(lightWeightTTKBox.isSelected()){
lightWeightTTKBox.setSelected(false);
}
}else{
if(TTKBox.isSelected()){
TTKBox.setSelected(false);
}

}
if(useComplexTTK){
if(e.getSource().equals(TTKBox)){
complexTTKIterations = 10000;
}else{
complexTTKIterations = 1000;
}
}
}else if(e.getSource().equals(targetGroupBox)){
ttkGraph.clear();
}else if(e.getSource().equals(clearButton)){
Expand Down

0 comments on commit 7186dc4

Please sign in to comment.