diff --git a/ee3_common/com/pahimar/ee3/configuration/ConfigurationHandler.java b/ee3_common/com/pahimar/ee3/configuration/ConfigurationHandler.java
index 561ce00d..ad324463 100644
--- a/ee3_common/com/pahimar/ee3/configuration/ConfigurationHandler.java
+++ b/ee3_common/com/pahimar/ee3/configuration/ConfigurationHandler.java
@@ -46,6 +46,7 @@ public class ConfigurationHandler {
/* General configs */
ConfigurationSettings.DISPLAY_VERSION_RESULT = configuration.get(CATEGORY_GENERAL, ConfigurationSettings.DISPLAY_VERSION_RESULT_CONFIGNAME, ConfigurationSettings.DISPLAY_VERSION_RESULT_DEFAULT).getBoolean(ConfigurationSettings.DISPLAY_VERSION_RESULT_DEFAULT);
ConfigurationSettings.LAST_DISCOVERED_VERSION = configuration.get(CATEGORY_GENERAL, ConfigurationSettings.LAST_DISCOVERED_VERSION_CONFIGNAME, ConfigurationSettings.LAST_DISCOVERED_VERSION_DEFAULT).getString();
+ ConfigurationSettings.LAST_DISCOVERED_VERSION_TYPE = configuration.get(CATEGORY_GENERAL, ConfigurationSettings.LAST_DISCOVERED_VERSION_TYPE_CONFIGNAME, ConfigurationSettings.LAST_DISCOVERED_VERSION_TYPE_DEFAULT).getString();
/* Graphic configs */
ConfigurationSettings.ENABLE_PARTICLE_FX = configuration.get(CATEGORY_GRAPHICS, ConfigurationSettings.ENABLE_PARTICLE_FX_CONFIGNAME, ConfigurationSettings.ENABLE_PARTICLE_FX_DEFAULT).getBoolean(ConfigurationSettings.ENABLE_PARTICLE_FX_DEFAULT);
diff --git a/ee3_common/com/pahimar/ee3/configuration/ConfigurationSettings.java b/ee3_common/com/pahimar/ee3/configuration/ConfigurationSettings.java
index a61b99f1..98a5bb66 100644
--- a/ee3_common/com/pahimar/ee3/configuration/ConfigurationSettings.java
+++ b/ee3_common/com/pahimar/ee3/configuration/ConfigurationSettings.java
@@ -14,9 +14,8 @@ import com.pahimar.ee3.lib.Strings;
public class ConfigurationSettings {
/*
- * General configuration settings
+ * Version check related settings
*/
- // Whether or not EE3 will do a version check when loaded
public static boolean DISPLAY_VERSION_RESULT;
public static final String DISPLAY_VERSION_RESULT_CONFIGNAME = "version_check.display_results";
public static final boolean DISPLAY_VERSION_RESULT_DEFAULT = true;
@@ -24,6 +23,10 @@ public class ConfigurationSettings {
public static String LAST_DISCOVERED_VERSION;
public static final String LAST_DISCOVERED_VERSION_CONFIGNAME = "version_check.last_discovered_version";
public static final String LAST_DISCOVERED_VERSION_DEFAULT = "";
+
+ public static String LAST_DISCOVERED_VERSION_TYPE;
+ public static final String LAST_DISCOVERED_VERSION_TYPE_CONFIGNAME = "version_check.last_discovered_version_type";
+ public static final String LAST_DISCOVERED_VERSION_TYPE_DEFAULT = "";
/*
* Audio config settings
diff --git a/ee3_common/com/pahimar/ee3/core/helper/VersionHelper.java b/ee3_common/com/pahimar/ee3/core/helper/VersionHelper.java
index 0360fbd4..aaae3e1e 100644
--- a/ee3_common/com/pahimar/ee3/core/helper/VersionHelper.java
+++ b/ee3_common/com/pahimar/ee3/core/helper/VersionHelper.java
@@ -46,6 +46,7 @@ public class VersionHelper implements Runnable {
private static byte result = UNINITIALIZED;
public static String remoteVersion = null;
public static String remoteUpdateLocation = null;
+ public static String remoteVersionType = null;
/***
* Checks the version of the currently running instance of the mod against
@@ -65,27 +66,67 @@ public class VersionHelper implements Runnable {
String remoteVersionProperty = remoteVersionProperties.getProperty(Loader.instance().getMCVersionString());
if (remoteVersionProperty != null) {
- remoteVersion = remoteVersionProperty.substring(0, remoteVersionProperty.indexOf("|"));
- remoteUpdateLocation = remoteVersionProperty.substring(remoteVersionProperty.indexOf("|") + 1);
- }
+ String[] remoteVersionTokens = remoteVersionProperty.split("|");
- if (remoteVersion != null) {
- if (!ConfigurationSettings.LAST_DISCOVERED_VERSION.equalsIgnoreCase(remoteVersion)) {
- ConfigurationHandler.set(Configuration.CATEGORY_GENERAL, ConfigurationSettings.LAST_DISCOVERED_VERSION_CONFIGNAME, remoteVersion);
+ if (remoteVersionTokens.length == 2) {
+ remoteVersion = remoteVersionTokens[0];
+ remoteUpdateLocation = remoteVersionTokens[1];
+ }
+ else if (remoteVersionTokens.length == 3) {
+ remoteVersion = remoteVersionTokens[0];
+ remoteUpdateLocation = remoteVersionTokens[1];
+ remoteVersionType = remoteVersionTokens[2];
+ }
+ else {
+ result = ERROR;
+ return;
}
- if (remoteVersion.equals(Reference.VERSION)) {
- result = CURRENT;
+ if (remoteVersion != null) {
+ if (!ConfigurationSettings.LAST_DISCOVERED_VERSION.equalsIgnoreCase(remoteVersion)) {
+ ConfigurationHandler.set(Configuration.CATEGORY_GENERAL, ConfigurationSettings.LAST_DISCOVERED_VERSION_CONFIGNAME, remoteVersion);
+
+ if (remoteVersionType != null) {
+ ConfigurationHandler.set(Configuration.CATEGORY_GENERAL, ConfigurationSettings.LAST_DISCOVERED_VERSION_TYPE_CONFIGNAME, remoteVersionType);
+ }
+ }
+
+ if (remoteVersion.equalsIgnoreCase(Reference.VERSION)) {
+ if (remoteVersionType != null) {
+ if (remoteVersionType.equalsIgnoreCase(Reference.VERSION_TYPE) && remoteVersionType.equalsIgnoreCase(Strings.RECOMMENDED_VERSION)) {
+ result = CURRENT;
+ return;
+ }
+ }
+ else {
+ result = CURRENT;
+ return;
+ }
+ }
+ else {
+ result = OUTDATED;
+ return;
+ }
+ }
+ else {
+ result = ERROR;
return;
}
}
-
- if (remoteVersionProperty == null) {
+ else {
result = MC_VERSION_NOT_FOUND;
}
- else {
- result = OUTDATED;
- }
+
+ /*
+ * if (remoteVersion != null) { if
+ * (!ConfigurationSettings.LAST_DISCOVERED_VERSION
+ * .equalsIgnoreCase(remoteVersion)) {
+ * ConfigurationHandler.set(Configuration.CATEGORY_GENERAL,
+ * ConfigurationSettings.LAST_DISCOVERED_VERSION_CONFIGNAME,
+ * remoteVersion); } if (remoteVersion.equals(Reference.VERSION)) {
+ * result = CURRENT; return; } } if (remoteVersionProperty == null)
+ * { result = MC_VERSION_NOT_FOUND; } else { result = OUTDATED; }
+ */
}
catch (Exception e) {
}
diff --git a/ee3_common/com/pahimar/ee3/lib/Reference.java b/ee3_common/com/pahimar/ee3/lib/Reference.java
index 2eab9bc3..581d4d09 100644
--- a/ee3_common/com/pahimar/ee3/lib/Reference.java
+++ b/ee3_common/com/pahimar/ee3/lib/Reference.java
@@ -18,6 +18,7 @@ public class Reference {
public static final String MOD_ID = "EE3";
public static final String MOD_NAME = "Equivalent Exchange 3";
public static final String VERSION = "@VERSION@";
+ public static final String VERSION_TYPE = "@VERSION_TYPE@";
public static final String CHANNEL_NAME = MOD_ID;
public static final int SECOND_IN_TICKS = 20;
public static final int SHIFTED_ID_RANGE_CORRECTION = 256;
diff --git a/ee3_common/com/pahimar/ee3/lib/Strings.java b/ee3_common/com/pahimar/ee3/lib/Strings.java
index 938e2350..5624dd21 100644
--- a/ee3_common/com/pahimar/ee3/lib/Strings.java
+++ b/ee3_common/com/pahimar/ee3/lib/Strings.java
@@ -23,6 +23,8 @@ public class Strings {
public static final String GENERAL_ERROR_MESSAGE = "version.general_error";
public static final String FINAL_ERROR_MESSAGE = "version.final_error";
public static final String MC_VERSION_NOT_FOUND = "version.mc_version_not_found";
+ public static final String DEVELOPMENT_VERSION = "Development";
+ public static final String RECOMMENDED_VERSION = "Recommended";
/* NBT related constants */
public static final String NBT_ITEM_CHARGE_LEVEL_KEY = "itemChargeLevel";
diff --git a/resources/mods/ee3/lang/fi_FI.xml b/resources/mods/ee3/lang/fi_FI.xml
index afb35ee0..fc005a24 100644
--- a/resources/mods/ee3/lang/fi_FI.xml
+++ b/resources/mods/ee3/lang/fi_FI.xml
@@ -14,13 +14,13 @@
Mönjäinen pöly
Vehreä pöly
Taivaansininen pöly
- Ikikukkaispöly<
+ Ikikukkaispöly
Sateenkaarenkirjava pöly
Alkeminen pussi
Punavesi (Liikkumaton)
Punavesi (Virtaava)
Kalsinaattori
- Aludeli This needs better translation!
+ Aludeli
Alchemical Chest
Calcinator
Aludel