aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/util
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-10-05 16:33:51 +1000
committerAlkalus <draknyte1@hotmail.com>2017-10-05 16:33:51 +1000
commit830a2df78d4b28d2bb27b83d4117aaf8651dd87b (patch)
tree94b6f8183bfd050a08f2d3c217a5d39431c05683 /src/Java/gtPlusPlus/core/util
parentbc2b9e0a078859085ab8cf81855ca812800ea305 (diff)
downloadGT5-Unofficial-830a2df78d4b28d2bb27b83d4117aaf8651dd87b.tar.gz
GT5-Unofficial-830a2df78d4b28d2bb27b83d4117aaf8651dd87b.tar.bz2
GT5-Unofficial-830a2df78d4b28d2bb27b83d4117aaf8651dd87b.zip
+ Added some wires from custom materials.
+ Added a new Super Conductor Material for LuV power (HG-1223). + Added recipes for all custom material wires and cables. $ Fixed an issue where materials with a bad RGB array would crash the game.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r--src/Java/gtPlusPlus/core/util/Utils.java38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/util/Utils.java b/src/Java/gtPlusPlus/core/util/Utils.java
index 1ce9a29877..3b2bafe9fb 100644
--- a/src/Java/gtPlusPlus/core/util/Utils.java
+++ b/src/Java/gtPlusPlus/core/util/Utils.java
@@ -572,6 +572,44 @@ public class Utils {
return output;
}
+
+ public static int calculateVoltageTier(int Voltage){
+ int V;
+ if (Voltage == 8){
+ V = 0;
+ }
+ else if (Voltage == 32){
+ V = 1;
+ }
+ else if (Voltage == 128){
+ V = 2;
+ }
+ else if (Voltage == 512){
+ V = 3;
+ }
+ else if (Voltage == 2048){
+ V = 4;
+ }
+ else if (Voltage == 8196){
+ V = 5;
+ }
+ else if (Voltage == 32768){
+ V = 6;
+ }
+ else if (Voltage == 131072){
+ V = 7;
+ }
+ else if (Voltage == 524288){
+ V = 8;
+ }
+ else if (Voltage == Integer.MAX_VALUE){
+ V = 9;
+ }
+ else {
+ V = -1;
+ }
+ return V;
+ }
public static String[] parseVersion(final String version){
return parseVersion(version, "//.");