Skip to content

Commit

Permalink
deploying v0.6-alpha --PoL-Updater --Added passive/trial feauture --P…
Browse files Browse the repository at this point in the history
…oL-Logger --minor-fixes
  • Loading branch information
karakasis committed Jan 4, 2019
1 parent 76210f1 commit 0360e1e
Show file tree
Hide file tree
Showing 34 changed files with 1,047 additions and 330 deletions.
Binary file added lib/getdown-launcher-1.8.2-javadoc.jar
Binary file not shown.
Binary file added lib/getdown-launcher-1.8.2-sources.jar
Binary file not shown.
Binary file added lib/getdown-launcher-1.8.2.jar
Binary file not shown.
12 changes: 1 addition & 11 deletions nbproject/private/private.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<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:/C:/Users/Christos/Documents/NetBeansProjects/POE-level-fx/src/poe/level/fx/Preferences_Controller.java</file>
<file>file:/C:/Users/Christos/Documents/NetBeansProjects/POE-level-fx/src/poe/level/fx/MainApp_Controller.java</file>
<file>file:/C:/Users/Christos/Documents/NetBeansProjects/POE-level-fx/src/poe/level/fx/SelectBuild_PopupController.java</file>
<file>file:/C:/Users/Christos/Documents/NetBeansProjects/POE-level-fx/src/poe/level/data/ActHandler.java</file>
<file>file:/C:/Users/Christos/Documents/NetBeansProjects/POE-level-fx/src/poe/level/fx/Main_Stage.java</file>
<file>file:/C:/Users/Christos/Documents/NetBeansProjects/POE-level-fx/src/poe/level/fx/Main_Controller.java</file>
<file>file:/C:/Users/Christos/Documents/NetBeansProjects/POE-level-fx/src/poe/level/data/Gem.java</file>
<file>file:/C:/Users/Christos/Documents/NetBeansProjects/POE-level-fx/src/poe/level/fx/characterInfo.fxml</file>
<file>file:/C:/Users/Christos/Documents/NetBeansProjects/POE-level-fx/src/poe/level/fx/CharacterInfo_Controller.java</file>
</group>
<group/>
</open-files>
</project-private>
3 changes: 0 additions & 3 deletions nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ file.reference.jnativehook-2.1.0.jar=lib\\jnativehook-2.1.0.jar
file.reference.json-20180813.jar=lib\\json-20180813.jar
file.reference.Pastebin-0.2.1.jar=lib\\Pastebin-0.2.1.jar
file.reference.slf4j-api-1.7.25.jar=lib\\slf4j-api-1.7.25.jar
file.reference.system-hook-3.2.jar=lib\\system-hook-3.2.jar
includes=**
# Non-JavaFX jar file creation is deactivated in JavaFX 2.0+ projects
jar.archive.disabled=true
Expand All @@ -54,8 +53,6 @@ javac.classpath=\
${file.reference.jna-platform-4.1.0.jar}:\
${file.reference.gson-2.8.5.jar}:\
${file.reference.controlsfx-8.40.14.jar}:\
${libs.LWJGL.classpath}:\
${file.reference.system-hook-3.2.jar}:\
${file.reference.jnativehook-2.1.0.jar}:\
${file.reference.Pastebin-0.2.1.jar}
# Space-separated list of extra javac options
Expand Down
25 changes: 25 additions & 0 deletions src/a.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,28 @@ You have entered The Crypt.
2018/12/18 04:58:07 449736281 a24 [INFO Client 1908] : _rainy (Scion) is now level 7

2018/12/18 04:58:07 449736281 a24 [INFO Client 1908] : _rainy (Scion) is now level 8



You have entered The Crypt.
You have entered The Crypt.
You have entered The Mud Flats.

You have entered The Mud Flats.
You have entered The Mud Flats.
You have entered The Crypt.
You have entered The Mud Flats.
You have entered The Mud Flats.









You have entered The Crypt.
You have entered The Mud Flats.

You have entered The Crypt.
Binary file added src/icons/50px-AspirantTrialBefore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/icons/Book_of_Skill_inventory_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 70 additions & 0 deletions src/poe/level/data/Build.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,74 @@ public boolean validate(){
}
return true;
}

public String validate_failed_string(){
String error = "";
System.out.println(">>>>Validating build :"+this.buildName+"... <<<<");
error += ">>>>Validating build :"+this.buildName+"... <<<<\n";
for(SocketGroup sg : getSocketGroup()){
if(sg.getActiveGem()==null){
System.out.println(">>>>A socket group doesn't have a valid main gem.<<<<");
error += ">>>>A socket group doesn't have a valid main gem.<<<<";
return error;
}else{
System.out.println("SocketGroup # "+sg.getActiveGem().getGemName());
error+="SocketGroup # "+sg.getActiveGem().getGemName()+"\n";
System.out.println("- Use at level: "+sg.fromGroupLevel);
error+="- Use at level: "+sg.fromGroupLevel+"\n";
if(sg.replaceGroup()){
if(sg.getGroupReplaced().getActiveGem()==null){
System.out.println(">>>>Socket group -"+sg.getActiveGem().getGemName()+" replaces with a socket group that doesn't have a valid main gem.");
error+=">>>>Socket group -"+sg.getActiveGem().getGemName()+" replaces with a socket group that doesn't have a valid main gem.\n";
return error;
}
if(sg.getGroupReplaced().getFromGroupLevel()!=sg.getUntilGroupLevel()){
System.out.println(">>>>Socket group -"+sg.getActiveGem().getGemName()+"- replaces with -"
+sg.getGroupReplaced().getActiveGem().getGemName()+"- and group levels don't match.");
error+=">>>>Socket group -"+sg.getActiveGem().getGemName()+"- replaces with -"
+sg.getGroupReplaced().getActiveGem().getGemName()+"- and group levels don't match.\n";
return error;
}
System.out.println("- Replace at level: "+sg.untilGroupLevel);
error+="- Replace at level: "+sg.untilGroupLevel+"\n";
System.out.println("- Replace with : -"+sg.getGroupReplaced().getActiveGem().getGemName()+"- .");
error+="- Replace with : -"+sg.getGroupReplaced().getActiveGem().getGemName()+"- .\n";
}

//inner loop
ArrayList<Gem> sorted = new ArrayList<>(sg.getGems());
sorted.sort(Comparator.comparing(Gem::getLevelAdded));
for(Gem g : sorted){
if(g.getGemName().equals("<empty group>")){
System.out.println(">>>>A gem in this socket group is not set.<<<<");
error+=">>>>A gem in this socket group is not set.<<<<\n";
return error;
}
System.out.println("--Gem # "+g.getGemName());
error+="--Gem # "+g.getGemName()+"\n";
System.out.println("--- Use at level: "+g.getLevelAdded());
error+="--- Use at level: "+g.getLevelAdded()+"\n";
if(g.replaced){
if(g.replacedWith==null){
System.out.println(">>>>Gem -"+g.getGemName()+" replacement has not been set.");
error+=">>>>Gem -"+g.getGemName()+" replacement has not been set.\n";
return error;
}
if(g.replacedWith.getLevelAdded()<=g.getLevelAdded()){
System.out.println(">>>>Gem -"+g.getGemName()+"- replaces with -"
+g.replacedWith.getGemName()+"- and change level don't match.");
error+=">>>>Gem -"+g.getGemName()+"- replaces with -"
+g.replacedWith.getGemName()+"- and change level don't match.\n";
return error;
}
System.out.println("--- Replace at level: "+g.replacedWith.getLevelAdded());
error+="--- Replace at level: "+g.replacedWith.getLevelAdded()+"\n";
System.out.println("--- Replace with : -"+g.replacedWith.getGemName()+"- .");
error+="--- Replace with : -"+g.replacedWith.getGemName()+"- .\n";
}
}
}
}
return error;
}
}
4 changes: 2 additions & 2 deletions src/poe/level/data/Zone.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public class Zone {
};
int level;
String name;
boolean hasPassive;
boolean hasTrial;
public boolean hasPassive;
public boolean hasTrial;
ArrayList<String> image;
String altimage;
String note;
Expand Down
2 changes: 1 addition & 1 deletion src/poe/level/fx/AddBuild_Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private void classChanged(ActionEvent event) {
className = "Marauder";
selectAsc.getItems().clear();
selectAsc.getItems().add("Juggernaut");
selectAsc.getItems().add("Berseker");
selectAsc.getItems().add("Berserker");
selectAsc.getItems().add("Chieftain");
}else if(selectedClassIndex == 1){
className = "Ranger";
Expand Down
6 changes: 4 additions & 2 deletions src/poe/level/fx/BuildEntry_Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,17 @@ public void init(Image iv, String buildName,String ascendAndLevel, BuildLinker p
banner.setImage(iv);

this.buildName.setText(buildName);
this.ascendAndLevel.setText(ascendAndLevel+" lvl.95");
//this.ascendAndLevel.setText(ascendAndLevel+" lvl.95");
this.ascendAndLevel.setText(ascendAndLevel);
this.parent = parent;
}

public void init_for_popup(Image iv, String buildName,String ascendAndLevel,int id, SelectBuild_PopupController parent){
banner.setImage(iv);

this.buildName.setText(buildName);
this.ascendAndLevel.setText(ascendAndLevel+" lvl.95");
//this.ascendAndLevel.setText(ascendAndLevel+" lvl.95");
this.ascendAndLevel.setText(ascendAndLevel);
this.parent2 = parent;
this.id_for_popup = id;
}
Expand Down
10 changes: 5 additions & 5 deletions src/poe/level/fx/BuildProgressPreview.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
<?import javafx.scene.shape.Line?>
<?import javafx.scene.text.Font?>

<AnchorPane maxHeight="550.0" maxWidth="800.0" minHeight="350.0" minWidth="400.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="poe.level.fx.BuildProgressPreview_Controller">
<AnchorPane maxHeight="550.0" maxWidth="800.0" minHeight="350.0" minWidth="750.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="poe.level.fx.BuildProgressPreview_Controller">
<children>
<FlowPane layoutX="11.0" layoutY="9.0" maxHeight="11.0" prefHeight="11.0" prefWrapLength="0.0" AnchorPane.leftAnchor="11.0" AnchorPane.rightAnchor="11.0" AnchorPane.topAnchor="2.0">
<children>
<Label style="-fx-border-color: black;" text="Build: Sunderboy " textAlignment="CENTER">
<Label fx:id="build_label" style="-fx-border-color: black;" text="Build: Sunderboy" textAlignment="CENTER">
<font>
<Font name="Alegreya Sans SC Medium" size="13.0" />
</font>
Expand All @@ -28,7 +28,7 @@
<Insets bottom="4.0" left="10.0" right="10.0" top="4.0" />
</FlowPane.margin>
</Label>
<Label layoutX="20.0" layoutY="14.0" style="-fx-border-color: black;" text="Class: Marauder" textAlignment="CENTER">
<Label fx:id="class_label" layoutX="20.0" layoutY="14.0" style="-fx-border-color: black;" text="Class: Marauder" textAlignment="CENTER">
<font>
<Font name="Alegreya Sans SC Medium" size="13.0" />
</font>
Expand All @@ -42,7 +42,7 @@
<Insets right="8.0" />
</FlowPane.margin>
</Label>
<Label layoutX="96.0" layoutY="14.0" style="-fx-border-color: black;" text="Ascendancy: Juggernaut" textAlignment="CENTER">
<Label fx:id="ascend_label" layoutX="96.0" layoutY="14.0" style="-fx-border-color: black;" text="Ascendancy: Juggernaut" textAlignment="CENTER">
<font>
<Font name="Alegreya Sans SC Medium" size="13.0" />
</font>
Expand All @@ -56,7 +56,7 @@
<Insets right="8.0" />
</FlowPane.margin>
</Label>
<Label layoutX="162.0" layoutY="14.0" style="-fx-border-color: black;" text="Level: 96" textAlignment="CENTER">
<Label layoutX="162.0" layoutY="14.0" style="-fx-border-color: black;" text="Level: 96" textAlignment="CENTER" visible="false">
<font>
<Font name="Alegreya Sans SC Medium" size="13.0" />
</font>
Expand Down
30 changes: 30 additions & 0 deletions src/poe/level/fx/BuildProgressPreview_Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ public class BuildProgressPreview_Controller implements Initializable {
@FXML
private AnchorPane timeline_pane;

@FXML
private Label build_label;
@FXML
private Label class_label;
@FXML
private Label ascend_label;

public void start(Build build){

//reverse the replacements::
Expand Down Expand Up @@ -364,6 +371,29 @@ public int compare(SocketGroup o1, SocketGroup o2) {
alternateCounter = true;
}
}
if(build.getName()!=null){
String build_con = "";
if(build.getName().length()>=20){
build_con = build.getName().substring(0, 20);
build_con+="..";
}else{
build_con = build.getName();
}
build_label.setText("Build: "+build_con);
}else{
build_label.setText("Build: no_name");
}
if(build.getAsc()!=null){
ascend_label.setText("Ascendancy: "+build.getAsc());
}else{
ascend_label.setText("Ascendancy: no_ascendancy");
}
if(build.getClassName()!=null){
class_label.setText("Class: "+build.getClassName());
}else{
class_label.setText("Class: no_class");
}

}

/**
Expand Down
20 changes: 20 additions & 0 deletions src/poe/level/fx/BuildsPanel_Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ private static Image charToImage(String className, String asc){
private SocketGroupsPanel_Controller sgc;
private HashMap<Integer,BuildLinker> linker;
private int activeBuildID;
public String lastbuild_invalidated;

public void hook(MainApp_Controller root){
this.root = root;
Expand Down Expand Up @@ -165,6 +166,25 @@ public boolean validateAll(){
return true;
}

public String validateError(){
Build active_build = linker.get(activeBuildID).build;
lastbuild_invalidated = active_build.getName();
return active_build.validate_failed_string();
}

public String validateAllError(){

lastbuild_invalidated = "";
for(BuildLinker bl : linker.values()){
Build active_build = bl.build;
if(!active_build.validate()){
lastbuild_invalidated = active_build.getName();
return active_build.validate_failed_string();
}
}
return null;
}

public Build getCurrentBuild(){
return linker.get(activeBuildID).build;
}
Expand Down
40 changes: 40 additions & 0 deletions src/poe/level/fx/MainApp_Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,19 @@ private void validateBuild(){
//controller.passDialog(mLoad);
controller.start(buildspanel_controller.getCurrentBuild());
buildPreviewPopup.show();
}else{
FXMLLoader loader = new FXMLLoader(getClass().getResource("ValidateErrorPopup.fxml"));
AnchorPane con = null;
try {
con = (AnchorPane) loader.load();
} catch (IOException ex) {
Logger.getLogger(MainApp_Controller.class.getName()).log(Level.SEVERE, null, ex);
}

buildPreviewPopup = new JFXDialog(rootPane, con, JFXDialog.DialogTransition.CENTER);
//controller.passDialog(mLoad);
loader.<ValidateErrorPopupController>getController().setUp(buildspanel_controller.getCurrentBuild().getName(), buildspanel_controller.validateError());
buildPreviewPopup.show();
}
}

Expand All @@ -225,6 +238,20 @@ private void saveAllBuilds(){
try {
if(buildspanel_controller.validateAll())
buildspanel_controller.saveBuild();
else{
FXMLLoader loader = new FXMLLoader(getClass().getResource("ValidateErrorPopup.fxml"));
AnchorPane con = null;
try {
con = (AnchorPane) loader.load();
} catch (IOException ex) {
Logger.getLogger(MainApp_Controller.class.getName()).log(Level.SEVERE, null, ex);
}

buildPreviewPopup = new JFXDialog(rootPane, con, JFXDialog.DialogTransition.CENTER);
//controller.passDialog(mLoad);
loader.<ValidateErrorPopupController>getController().setUp(buildspanel_controller.lastbuild_invalidated, buildspanel_controller.validateAllError());
buildPreviewPopup.show();
}
} catch (IOException ex) {
Logger.getLogger(MainApp_Controller.class.getName()).log(Level.SEVERE, null, ex);
}
Expand All @@ -236,6 +263,19 @@ private void validateToLauncher(){
if(buildspanel_controller.validateAll()){
buildspanel_controller.saveBuild();
parent.returnToLauncher();
}else{
FXMLLoader loader = new FXMLLoader(getClass().getResource("ValidateErrorPopup.fxml"));
AnchorPane con = null;
try {
con = (AnchorPane) loader.load();
} catch (IOException ex) {
Logger.getLogger(MainApp_Controller.class.getName()).log(Level.SEVERE, null, ex);
}

buildPreviewPopup = new JFXDialog(rootPane, con, JFXDialog.DialogTransition.CENTER);
//controller.passDialog(mLoad);
loader.<ValidateErrorPopupController>getController().setUp(buildspanel_controller.lastbuild_invalidated, buildspanel_controller.validateAllError());
buildPreviewPopup.show();
}
} catch (IOException ex) {
Logger.getLogger(MainApp_Controller.class.getName()).log(Level.SEVERE, null, ex);
Expand Down
2 changes: 1 addition & 1 deletion src/poe/level/fx/Main_Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void initialize(URL url, ResourceBundle rb) {

@FXML
private void startButton(){
if(Preferences_Controller.poe_log_dir.equals("") || Preferences_Controller.poe_log_dir == null){
if(Preferences_Controller.poe_log_dir == null || Preferences_Controller.poe_log_dir.equals("")){
Alert alert = new Alert(AlertType.ERROR);
alert.setTitle("Directory not set");
alert.setContentText("Select the options button, and locate your Path of Exile installation folder!");
Expand Down
Loading

0 comments on commit 0360e1e

Please sign in to comment.