diff --git a/build.gradle b/build.gradle index af5789f..af10be2 100644 --- a/build.gradle +++ b/build.gradle @@ -61,6 +61,17 @@ jar { } } +task processAssets(type: Copy) { + from('src') { + include 'assets/**/*.png' + include 'Ic2ExpReactorPlanner/Bundle*.properties' + } + into 'build/classes/java/main' +} + +run { + run.dependsOn processAssets +} task processSource(type: Copy) { from sourceSets.main.java diff --git a/src/Ic2ExpReactorPlanner/Reactor.java b/src/Ic2ExpReactorPlanner/Reactor.java index e834fd1..1ee01b1 100644 --- a/src/Ic2ExpReactorPlanner/Reactor.java +++ b/src/Ic2ExpReactorPlanner/Reactor.java @@ -496,6 +496,10 @@ private void readCodeString(final String code) { BigintStorage storage = BigintStorage.inputBase64(code); // read the code revision from the code itself instead of making it part of the prefix. int codeRevision = storage.extract(255); + // Check if the code revision is supported yet. + if (codeRevision > 1) { + throw new IllegalArgumentException("Unsupported code revision in reactor code."); + } // for code revision 1 or newer, read whether the reactor is pulsed and/or automated next. if (codeRevision >= 1) { pulsed = storage.extract(1) > 0; diff --git a/src/Ic2ExpReactorPlanner/ReactorPlannerFrame.java b/src/Ic2ExpReactorPlanner/ReactorPlannerFrame.java index 8069621..3a71458 100644 --- a/src/Ic2ExpReactorPlanner/ReactorPlannerFrame.java +++ b/src/Ic2ExpReactorPlanner/ReactorPlannerFrame.java @@ -45,6 +45,7 @@ import javax.swing.JPanel; import javax.swing.SpinnerNumberModel; import javax.swing.SwingUtilities; +import javax.swing.ToolTipManager; import javax.swing.border.BevelBorder; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; @@ -106,6 +107,7 @@ public class ReactorPlannerFrame extends javax.swing.JFrame { */ public ReactorPlannerFrame() { initComponents(); + ToolTipManager.sharedInstance().setDismissDelay((int)30e3); Enumeration buttons = componentsGroup.getElements(); if (heatSpinner.getModel() instanceof SpinnerNumberModel) { heatSpinnerModel = (SpinnerNumberModel)heatSpinner.getModel();