aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-03-05 00:09:50 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-03-05 00:09:50 +0000
commitd5ae6aa30263d7da551ffa592e285b01aef95707 (patch)
treefb8939518824331f32391f00b9e64eee354fcd1f
parent2ed346ae95241029f999ec4caa387fca102896c0 (diff)
downloadGT5-Unofficial-d5ae6aa30263d7da551ffa592e285b01aef95707.tar.gz
GT5-Unofficial-d5ae6aa30263d7da551ffa592e285b01aef95707.tar.bz2
GT5-Unofficial-d5ae6aa30263d7da551ffa592e285b01aef95707.zip
$ More small fixes, Added Tooltips and Proper Localisation for TC4 Aspects.
-rw-r--r--src/Java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java18
-rw-r--r--src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_Aspect_Wrapper.java32
3 files changed, 32 insertions, 20 deletions
diff --git a/src/Java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java b/src/Java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java
index 25be6679ed..5f3b1d8abd 100644
--- a/src/Java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java
+++ b/src/Java/gtPlusPlus/plugin/fixes/vanilla/VanillaBedHeightFix.java
@@ -31,7 +31,7 @@ public class VanillaBedHeightFix implements IBugFix {
}
if (m != null) {
mSleepInBedAt = m;
- mParent.log("Registering Bed Heigh Fix.");
+ mParent.log("Registering Bed Height Fix.");
Utils.registerEvent(this);
} else {
mSleepInBedAt = null;
diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java b/src/Java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java
index 5ac85e38cd..ee623f4a1e 100644
--- a/src/Java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java
+++ b/src/Java/gtPlusPlus/xmod/thaumcraft/aspect/GTPP_AspectCompat.java
@@ -7,6 +7,7 @@ import java.util.LinkedHashMap;
import java.util.List;
import gregtech.api.enums.TC_Aspects;
+import gregtech.api.util.GT_LanguageManager;
import gregtech.common.GT_ThaumcraftCompat;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
@@ -110,7 +111,8 @@ public class GTPP_AspectCompat {
},
new ResourceLocation(CORE.MODID+":textures/aspects/" + "Sagrausten.png"),
false,
- 1);
+ 1,
+ "Ancient Knowledge");
ASPECT_LUST =
new TC_Aspect_Wrapper(
@@ -122,7 +124,8 @@ public class GTPP_AspectCompat {
},
new ResourceLocation(CORE.MODID+":textures/aspects/" + "Slusium.png"),
false,
- 1);
+ 1,
+ "Warped Thoughts");
ASPECT_STARBOUND =
new TC_Aspect_Wrapper(
@@ -132,7 +135,8 @@ public class GTPP_AspectCompat {
},
new ResourceLocation(CORE.MODID+":textures/aspects/" + "Xenil.png"),
false,
- 1);
+ 1,
+ "A beginning to something new");
ASPECT_TOXIC =
new TC_Aspect_Wrapper(
@@ -144,7 +148,8 @@ public class GTPP_AspectCompat {
},
new ResourceLocation(CORE.MODID+":textures/aspects/" + "Xablum.png"),
false,
- 1);
+ 1,
+ "Insanity");
ASPECT_HEAVEN =
new TC_Aspect_Wrapper(
@@ -156,7 +161,10 @@ public class GTPP_AspectCompat {
},
new ResourceLocation(CORE.MODID+":textures/aspects/" + "Zetralt.png"),
false,
- 1);
+ 1,
+ "Control, Respect, Glory");
+
+
}
private TC_Aspect_Wrapper get(TC_Aspects aGtObjects) {
diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_Aspect_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_Aspect_Wrapper.java
index 107df90256..fda0fd27c5 100644
--- a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_Aspect_Wrapper.java
+++ b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/aspect/TC_Aspect_Wrapper.java
@@ -8,6 +8,7 @@ import java.util.LinkedHashMap;
import java.util.Map;
import gregtech.api.enums.TC_Aspects;
+import gregtech.api.util.GT_LanguageManager;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
@@ -89,8 +90,8 @@ public class TC_Aspect_Wrapper {
* @param chatcolor
* @param blend
*/
- public TC_Aspect_Wrapper(String tag, int color, String chatcolor, int blend) {
- this(tag, color, (TC_Aspect_Wrapper[]) null, blend);
+ public TC_Aspect_Wrapper(String tag, int color, String chatcolor, int blend, String aTooltip) {
+ this(tag, color, (TC_Aspect_Wrapper[]) null, blend, aTooltip);
this.chatcolor = chatcolor;
}
@@ -101,8 +102,8 @@ public class TC_Aspect_Wrapper {
* @param color
* @param components
*/
- public TC_Aspect_Wrapper(String tag, int color, TC_Aspect_Wrapper[] components) {
- this(tag, color, components, false, 1);
+ public TC_Aspect_Wrapper(String tag, int color, TC_Aspect_Wrapper[] components, String aTooltip) {
+ this(tag, color, components, false, 1, aTooltip);
}
/**
@@ -113,8 +114,8 @@ public class TC_Aspect_Wrapper {
* @param components
* @param blend
*/
- public TC_Aspect_Wrapper(String tag, int color, TC_Aspect_Wrapper[] components, int blend) {
- this(tag, color, components, false, blend);
+ public TC_Aspect_Wrapper(String tag, int color, TC_Aspect_Wrapper[] components, int blend, String aTooltip) {
+ this(tag, color, components, false, blend, aTooltip);
}
@@ -127,17 +128,18 @@ public class TC_Aspect_Wrapper {
* @param image
* @param blend
*/
- public TC_Aspect_Wrapper(String tag, int color, TC_Aspect_Wrapper[] components, boolean vanilla, int blend) {
- this(tag, color, components, vanilla ? new ResourceLocation("thaumcraft", "textures/aspects/" + tag.toLowerCase() + ".png") : new ResourceLocation(CORE.MODID, "textures/aspects/" + tag.toLowerCase() + ".png"), vanilla, blend);
+ public TC_Aspect_Wrapper(String tag, int color, TC_Aspect_Wrapper[] components, boolean vanilla, int blend, String aTooltip) {
+ this(tag, color, components, vanilla ? new ResourceLocation("thaumcraft", "textures/aspects/" + tag.toLowerCase() + ".png") : new ResourceLocation(CORE.MODID, "textures/aspects/" + tag.toLowerCase() + ".png"), vanilla, blend, aTooltip);
}
- private static int aInternalAspectIDAllocation = 0;
+ private static int aInternalAspectIDAllocation = 1;
- public TC_Aspect_Wrapper(String tag, int color, TC_Aspect_Wrapper[] components, ResourceLocation image, boolean vanilla, int blend) {
+ public TC_Aspect_Wrapper(String tag, int color, TC_Aspect_Wrapper[] components, ResourceLocation image, boolean vanilla, int blend, String aTooltip) {
if (components == null) {
components = new TC_Aspect_Wrapper[] {};
- }
- String aTag = vanilla ? tag.toLowerCase() : "custom"+(aInternalAspectIDAllocation++);
+ }
+ //String aTag = vanilla ? tag.toLowerCase() : "custom"+(aInternalAspectIDAllocation++);
+ String aTag = tag.toLowerCase();
if (getAspectList().containsKey(tag.toLowerCase())) {
this.tag = aTag;
this.components = components;
@@ -173,7 +175,8 @@ public class TC_Aspect_Wrapper {
mInternalAspectCache.put(this.tag, this);
// Double link custom Aspects, but internalise names using custom# instead
if (!vanilla) {
- mInternalAspectCache.put(tag.toLowerCase(), this);
+ mInternalAspectCache.put("custom"+(aInternalAspectIDAllocation++), this);
+ GT_LanguageManager.addStringLocalization("tc.aspect."+aTag, aTooltip);
}
Logger.INFO("[Thaumcraft++] Adding support for Aspect: "+tag);
}
@@ -209,7 +212,8 @@ public class TC_Aspect_Wrapper {
generateAspectArrayInternal(ReflectionUtils.getField(mClass_Aspect, "components"), (aBaseAspect)),
(ResourceLocation) ReflectionUtils.getField(mClass_Aspect, "image").get(aBaseAspect),
true,
- (int) ReflectionUtils.getField(mClass_Aspect, "blend").get(aBaseAspect)
+ (int) ReflectionUtils.getField(mClass_Aspect, "blend").get(aBaseAspect),
+ ""
);
if (aTemp != null) {
aTemp.chatcolor = (String) ReflectionUtils.getField(mClass_Aspect, "chatcolor").get(aBaseAspect);