aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-03-04 21:05:08 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-03-04 21:05:08 +0000
commit94f842fa9223d1d0fa233266495a20a00eafa030 (patch)
tree76563fe6342b4dd540651491776f331e02068344 /src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research
parentaf27ff015c4197bb5a6ddb7dd38769f8950a4ac9 (diff)
downloadGT5-Unofficial-94f842fa9223d1d0fa233266495a20a00eafa030.tar.gz
GT5-Unofficial-94f842fa9223d1d0fa233266495a20a00eafa030.tar.bz2
GT5-Unofficial-94f842fa9223d1d0fa233266495a20a00eafa030.zip
% Final touches to TC aspects. The 5 custom ones added by GT++ now have names and proper handling.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research')
-rw-r--r--src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_PageType_Wrapper.java17
-rw-r--r--src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategories_Wrapper.java89
-rw-r--r--src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategoryList_Wrapper.java21
-rw-r--r--src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchItem_Wrapper.java246
-rw-r--r--src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchNoteData_Wrapper.java14
-rw-r--r--src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchPage_Wrapper.java228
6 files changed, 615 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_PageType_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_PageType_Wrapper.java
new file mode 100644
index 0000000000..d6c7f66988
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_PageType_Wrapper.java
@@ -0,0 +1,17 @@
+package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research;
+
+public class TC_PageType_Wrapper {
+
+ public static final TC_PageType_Wrapper TEXT = null;
+ public static final TC_PageType_Wrapper TEXT_CONCEALED = null;
+ public static final TC_PageType_Wrapper NORMAL_CRAFTING = null;
+ public static final TC_PageType_Wrapper ARCANE_CRAFTING = null;
+ public static final TC_PageType_Wrapper CRUCIBLE_CRAFTING = null;
+ public static final TC_PageType_Wrapper INFUSION_CRAFTING = null;
+ public static final TC_PageType_Wrapper COMPOUND_CRAFTING = null;
+ public static final TC_PageType_Wrapper SMELTING = null;
+ public static final TC_PageType_Wrapper INFUSION_ENCHANTMENT = null;
+ public static final TC_PageType_Wrapper IMAGE = null;
+ public static final TC_PageType_Wrapper ASPECTS = null;
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategories_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategories_Wrapper.java
new file mode 100644
index 0000000000..93869cb8d8
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategories_Wrapper.java
@@ -0,0 +1,89 @@
+package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research;
+
+import cpw.mods.fml.common.FMLLog;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.StatCollector;
+
+import org.apache.logging.log4j.Level;
+
+public class TC_ResearchCategories_Wrapper {
+
+ public static LinkedHashMap<String, TC_ResearchCategoryList_Wrapper> researchCategories = new LinkedHashMap<String, TC_ResearchCategoryList_Wrapper>();
+
+ public static TC_ResearchCategoryList_Wrapper getResearchList(String key) {
+ return (TC_ResearchCategoryList_Wrapper) researchCategories.get(key);
+ }
+
+ public static String getCategoryName(String key) {
+ return StatCollector.translateToLocal("tc.research_category." + key);
+ }
+
+ public static TC_ResearchItem_Wrapper getResearch(String key) {
+ Collection rc = researchCategories.values();
+ Iterator i$ = rc.iterator();
+
+ while (i$.hasNext()) {
+ Object cat = i$.next();
+ Collection rl = ((TC_ResearchCategoryList_Wrapper) cat).research.values();
+ Iterator i$1 = rl.iterator();
+
+ while (i$1.hasNext()) {
+ Object ri = i$1.next();
+ if (((TC_ResearchItem_Wrapper) ri).key.equals(key)) {
+ return (TC_ResearchItem_Wrapper) ri;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ public static void registerCategory(String key, ResourceLocation icon, ResourceLocation background) {
+ if (getResearchList(key) == null) {
+ TC_ResearchCategoryList_Wrapper rl = new TC_ResearchCategoryList_Wrapper(icon, background);
+ researchCategories.put(key, rl);
+ }
+
+ }
+
+ public static void addResearch(TC_ResearchItem_Wrapper ri) {
+ TC_ResearchCategoryList_Wrapper rl = getResearchList(ri.category);
+ if (rl != null && !rl.research.containsKey(ri.key)) {
+ if (!ri.isVirtual()) {
+ Iterator i$ = rl.research.values().iterator();
+
+ while (i$.hasNext()) {
+ TC_ResearchItem_Wrapper rr = (TC_ResearchItem_Wrapper) i$.next();
+ if (rr.displayColumn == ri.displayColumn && rr.displayRow == ri.displayRow) {
+ FMLLog.log(Level.FATAL,
+ "[Thaumcraft] Research [" + ri.getName()
+ + "] not added as it overlaps with existing research [" + rr.getName() + "]",
+ new Object[0]);
+ return;
+ }
+ }
+ }
+
+ rl.research.put(ri.key, ri);
+ if (ri.displayColumn < rl.minDisplayColumn) {
+ rl.minDisplayColumn = ri.displayColumn;
+ }
+
+ if (ri.displayRow < rl.minDisplayRow) {
+ rl.minDisplayRow = ri.displayRow;
+ }
+
+ if (ri.displayColumn > rl.maxDisplayColumn) {
+ rl.maxDisplayColumn = ri.displayColumn;
+ }
+
+ if (ri.displayRow > rl.maxDisplayRow) {
+ rl.maxDisplayRow = ri.displayRow;
+ }
+ }
+
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategoryList_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategoryList_Wrapper.java
new file mode 100644
index 0000000000..3e6f5b78f2
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchCategoryList_Wrapper.java
@@ -0,0 +1,21 @@
+package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import net.minecraft.util.ResourceLocation;
+
+public class TC_ResearchCategoryList_Wrapper {
+ public int minDisplayColumn;
+ public int minDisplayRow;
+ public int maxDisplayColumn;
+ public int maxDisplayRow;
+ public ResourceLocation icon;
+ public ResourceLocation background;
+ public Map<String, TC_ResearchItem_Wrapper> research = new HashMap<String, TC_ResearchItem_Wrapper>();
+
+ public TC_ResearchCategoryList_Wrapper(ResourceLocation icon, ResourceLocation background) {
+ this.icon = icon;
+ this.background = background;
+ }
+}
diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchItem_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchItem_Wrapper.java
new file mode 100644
index 0000000000..6372cc0371
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchItem_Wrapper.java
@@ -0,0 +1,246 @@
+package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research;
+
+import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_AspectList_Wrapper;
+import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_Aspect_Wrapper;
+import gtPlusPlus.xmod.thaumcraft.util.ThaumcraftUtils;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.StatCollector;
+
+public class TC_ResearchItem_Wrapper {
+
+ public final String key;
+ public final String category;
+ public final TC_AspectList_Wrapper tags;
+ public String[] parents = null;
+ public String[] parentsHidden = null;
+ public String[] siblings = null;
+ public final int displayColumn;
+ public final int displayRow;
+ public final ItemStack icon_item;
+ public final ResourceLocation icon_resource;
+ private int complexity;
+ private boolean isSpecial;
+ private boolean isSecondary;
+ private boolean isRound;
+ private boolean isStub;
+ private boolean isVirtual;
+ private boolean isConcealed;
+ private boolean isHidden;
+ private boolean isLost;
+ private boolean isAutoUnlock;
+ private ItemStack[] itemTriggers;
+ private String[] entityTriggers;
+ private TC_Aspect_Wrapper[] aspectTriggers;
+ private Object[] pages = null;
+
+ public TC_ResearchItem_Wrapper(String key, String category) {
+ this.key = key;
+ this.category = category;
+ this.tags = new TC_AspectList_Wrapper();
+ this.icon_resource = null;
+ this.icon_item = null;
+ this.displayColumn = 0;
+ this.displayRow = 0;
+ this.setVirtual();
+ }
+
+ public TC_ResearchItem_Wrapper(String key, String category, TC_AspectList_Wrapper tags, int col, int row, int complex,
+ ResourceLocation icon) {
+ this.key = key;
+ this.category = category;
+ this.tags = tags;
+ this.icon_resource = icon;
+ this.icon_item = null;
+ this.displayColumn = col;
+ this.displayRow = row;
+ this.complexity = complex;
+ if (this.complexity < 1) {
+ this.complexity = 1;
+ }
+
+ if (this.complexity > 3) {
+ this.complexity = 3;
+ }
+
+ }
+
+ public TC_ResearchItem_Wrapper(String key, String category, TC_AspectList_Wrapper tags, int col, int row, int complex, ItemStack icon) {
+ this.key = key;
+ this.category = category;
+ this.tags = tags;
+ this.icon_item = icon;
+ this.icon_resource = null;
+ this.displayColumn = col;
+ this.displayRow = row;
+ this.complexity = complex;
+ if (this.complexity < 1) {
+ this.complexity = 1;
+ }
+
+ if (this.complexity > 3) {
+ this.complexity = 3;
+ }
+
+ }
+
+ public TC_ResearchItem_Wrapper setSpecial() {
+ this.isSpecial = true;
+ return this;
+ }
+
+ public TC_ResearchItem_Wrapper setStub() {
+ this.isStub = true;
+ return this;
+ }
+
+ public TC_ResearchItem_Wrapper setLost() {
+ this.isLost = true;
+ return this;
+ }
+
+ public TC_ResearchItem_Wrapper setConcealed() {
+ this.isConcealed = true;
+ return this;
+ }
+
+ public TC_ResearchItem_Wrapper setHidden() {
+ this.isHidden = true;
+ return this;
+ }
+
+ public TC_ResearchItem_Wrapper setVirtual() {
+ this.isVirtual = true;
+ return this;
+ }
+
+ public TC_ResearchItem_Wrapper setParents(String... par) {
+ this.parents = par;
+ return this;
+ }
+
+ public TC_ResearchItem_Wrapper setParentsHidden(String... par) {
+ this.parentsHidden = par;
+ return this;
+ }
+
+ public TC_ResearchItem_Wrapper setSiblings(String... sib) {
+ this.siblings = sib;
+ return this;
+ }
+
+ public TC_ResearchItem_Wrapper setPages(Object... par) {
+ this.pages = par;
+ return this;
+ }
+
+ public Object[] getPages() {
+ return this.pages;
+ }
+
+ public TC_ResearchItem_Wrapper setItemTriggers(ItemStack... par) {
+ this.itemTriggers = par;
+ return this;
+ }
+
+ public TC_ResearchItem_Wrapper setEntityTriggers(String... par) {
+ this.entityTriggers = par;
+ return this;
+ }
+
+ public TC_ResearchItem_Wrapper setAspectTriggers(TC_Aspect_Wrapper... par) {
+ this.aspectTriggers = par;
+ return this;
+ }
+
+ public ItemStack[] getItemTriggers() {
+ return this.itemTriggers;
+ }
+
+ public String[] getEntityTriggers() {
+ return this.entityTriggers;
+ }
+
+ public TC_Aspect_Wrapper[] getAspectTriggers() {
+ return this.aspectTriggers;
+ }
+
+ public TC_ResearchItem_Wrapper registerResearchItem() {
+ ThaumcraftUtils.addResearch(this);
+ return this;
+ }
+
+ public String getName() {
+ return StatCollector.translateToLocal("tc.research_name." + this.key);
+ }
+
+ public String getText() {
+ return StatCollector.translateToLocal("tc.research_text." + this.key);
+ }
+
+ public boolean isSpecial() {
+ return this.isSpecial;
+ }
+
+ public boolean isStub() {
+ return this.isStub;
+ }
+
+ public boolean isLost() {
+ return this.isLost;
+ }
+
+ public boolean isConcealed() {
+ return this.isConcealed;
+ }
+
+ public boolean isHidden() {
+ return this.isHidden;
+ }
+
+ public boolean isVirtual() {
+ return this.isVirtual;
+ }
+
+ public boolean isAutoUnlock() {
+ return this.isAutoUnlock;
+ }
+
+ public TC_ResearchItem_Wrapper setAutoUnlock() {
+ this.isAutoUnlock = true;
+ return this;
+ }
+
+ public boolean isRound() {
+ return this.isRound;
+ }
+
+ public TC_ResearchItem_Wrapper setRound() {
+ this.isRound = true;
+ return this;
+ }
+
+ public boolean isSecondary() {
+ return this.isSecondary;
+ }
+
+ public TC_ResearchItem_Wrapper setSecondary() {
+ this.isSecondary = true;
+ return this;
+ }
+
+ public int getComplexity() {
+ return this.complexity;
+ }
+
+ public TC_ResearchItem_Wrapper setComplexity(int complexity) {
+ this.complexity = complexity;
+ return this;
+ }
+
+ public TC_Aspect_Wrapper getResearchPrimaryTag() {
+ //TODO
+ return null;
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchNoteData_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchNoteData_Wrapper.java
new file mode 100644
index 0000000000..5adf0150d9
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchNoteData_Wrapper.java
@@ -0,0 +1,14 @@
+package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research;
+
+public class TC_ResearchNoteData_Wrapper {
+
+ public TC_ResearchNoteData_Wrapper(Object researchNoteData) {
+ // TODO Auto-generated constructor stub
+ }
+
+ public Object getResearchNoteData() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchPage_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchPage_Wrapper.java
new file mode 100644
index 0000000000..998f37bf8c
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/thaumcraft/objects/wrapper/research/TC_ResearchPage_Wrapper.java
@@ -0,0 +1,228 @@
+package gtPlusPlus.xmod.thaumcraft.objects.wrapper.research;
+
+import java.util.List;
+
+import gtPlusPlus.xmod.thaumcraft.objects.wrapper.aspect.TC_AspectList_Wrapper;
+import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_CrucibleRecipe_Wrapper;
+import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_IArcaneRecipe_Wrapper;
+import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_InfusionEnchantmentRecipe_Wrapper;
+import gtPlusPlus.xmod.thaumcraft.objects.wrapper.recipe.TC_InfusionRecipe_Wrapper;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.crafting.FurnaceRecipes;
+import net.minecraft.item.crafting.IRecipe;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.StatCollector;
+
+public class TC_ResearchPage_Wrapper {
+ public TC_PageType_Wrapper type;
+ public String text;
+ public String research;
+ public ResourceLocation image;
+ public TC_AspectList_Wrapper aspects;
+ public Object recipe;
+ public ItemStack recipeOutput;
+
+ public TC_ResearchPage_Wrapper(String text) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = text;
+ }
+
+ public TC_ResearchPage_Wrapper(String research, String text) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.TEXT_CONCEALED;
+ this.research = research;
+ this.text = text;
+ }
+
+ public TC_ResearchPage_Wrapper(IRecipe recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.NORMAL_CRAFTING;
+ this.recipe = recipe;
+ this.recipeOutput = recipe.getRecipeOutput();
+ }
+
+ public TC_ResearchPage_Wrapper(IRecipe[] recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.NORMAL_CRAFTING;
+ this.recipe = recipe;
+ }
+
+ public TC_ResearchPage_Wrapper(TC_IArcaneRecipe_Wrapper[] recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.ARCANE_CRAFTING;
+ this.recipe = recipe;
+ }
+
+ public TC_ResearchPage_Wrapper(TC_CrucibleRecipe_Wrapper[] recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.CRUCIBLE_CRAFTING;
+ this.recipe = recipe;
+ }
+
+ public TC_ResearchPage_Wrapper(TC_InfusionRecipe_Wrapper[] recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.INFUSION_CRAFTING;
+ this.recipe = recipe;
+ }
+
+ public TC_ResearchPage_Wrapper(List recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.COMPOUND_CRAFTING;
+ this.recipe = recipe;
+ }
+
+ public TC_ResearchPage_Wrapper(TC_IArcaneRecipe_Wrapper recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.ARCANE_CRAFTING;
+ this.recipe = recipe;
+ this.recipeOutput = recipe.getRecipeOutput();
+ }
+
+ public TC_ResearchPage_Wrapper(TC_CrucibleRecipe_Wrapper recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.CRUCIBLE_CRAFTING;
+ this.recipe = recipe;
+ this.recipeOutput = recipe.getRecipeOutput();
+ }
+
+ public TC_ResearchPage_Wrapper(ItemStack input) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.SMELTING;
+ this.recipe = input;
+ this.recipeOutput = FurnaceRecipes.smelting().getSmeltingResult(input);
+ }
+
+ public TC_ResearchPage_Wrapper(TC_InfusionRecipe_Wrapper recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.INFUSION_CRAFTING;
+ this.recipe = recipe;
+ if (recipe.getRecipeOutput() instanceof ItemStack) {
+ this.recipeOutput = (ItemStack) recipe.getRecipeOutput();
+ } else {
+ this.recipeOutput = recipe.getRecipeInput();
+ }
+
+ }
+
+ public TC_ResearchPage_Wrapper(TC_InfusionEnchantmentRecipe_Wrapper recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.INFUSION_ENCHANTMENT;
+ this.recipe = recipe;
+ }
+
+ public TC_ResearchPage_Wrapper(ResourceLocation image, String caption) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.IMAGE;
+ this.image = image;
+ this.text = caption;
+ }
+
+ public TC_ResearchPage_Wrapper(TC_AspectList_Wrapper as) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.ASPECTS;
+ this.aspects = as;
+ }
+
+ public String getTranslatedText() {
+ String ret = "";
+ if (this.text != null) {
+ ret = StatCollector.translateToLocal(this.text);
+ if (ret.isEmpty()) {
+ ret = this.text;
+ }
+ }
+
+ return ret;
+ }
+} \ No newline at end of file