aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-02-14 18:50:58 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-02-14 18:50:58 +0000
commitfbe73a2de925d012dddfa46b13e745028ce40679 (patch)
treed97b18e7bd7641aca86ba8552e5b2a176cdfce57 /src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations
parentb23100249ecb5315babc7a4b1035ea4363d75f52 (diff)
downloadGT5-Unofficial-fbe73a2de925d012dddfa46b13e745028ce40679.tar.gz
GT5-Unofficial-fbe73a2de925d012dddfa46b13e745028ce40679.tar.bz2
GT5-Unofficial-fbe73a2de925d012dddfa46b13e745028ce40679.zip
+ Added Tags to tooltips, which can be used to control base tooltips inherited from parents.
% Mild update to tooltips of a few multis. % Adjusted Large Arc Furnace casing texture. % Renamed the 3 Factory Grade multis.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java75
1 files changed, 60 insertions, 15 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
index 04c1cf34cc..2427815295 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
@@ -39,6 +39,7 @@ import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.api.objects.data.AutoMap;
import gtPlusPlus.api.objects.minecraft.BlockPos;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
@@ -265,6 +266,10 @@ GT_MetaTileEntity_MultiBlockBase {
private final String aRequiresCoreModule = "1x Core Module";
private final String aRequiresMaint = "1x Maintanence Hatch";*/
+ public final static String TAG_HIDE_HATCHES = "TAG_HIDE_HATCHES";
+ public final static String TAG_HIDE_POLLUTION = "TAG_HIDE_POLLUTION";
+ public final static String TAG_HIDE_MACHINE_TYPE = "TAG_HIDE_MACHINE_TYPE";
+
@Override
public final String[] getDescription() {
/*if (aCachedToolTip != null) {
@@ -287,22 +292,62 @@ GT_MetaTileEntity_MultiBlockBase {
String aRequiresCoreModule = "1x Core Module";
String aRequiresMaint = "1x Maintanence Hatch";
- String[] x = getTooltip();
- //Add Stock Tooltip to bottom of list
- String[] z;
- if (getPollutionPerTick(null) > 0) {
- z = new String[] {
- aRequiresMaint,
- aRequiresCoreModule,
- aRequiresMuffler,
- getPollutionTooltip(),
- getMachineTooltip()};
+ String[] x = getTooltip();
+
+ //Filter List, toggle switches, rebuild map without flags
+ boolean showHatches = true;
+ boolean showMachineType = true;
+ boolean showPollution = getPollutionPerTick(null) > 0;
+ AutoMap<String> aTempMap = new AutoMap<String>();
+ for (int ee = 0; ee < x.length; ee++) {
+ String hh = x[ee];
+ if (hh.equals(TAG_HIDE_HATCHES)) {
+ showHatches = false;
+ }
+ else if (hh.equals(TAG_HIDE_POLLUTION)) {
+ showPollution = false;
+ }
+ else if (hh.equals(TAG_HIDE_MACHINE_TYPE)) {
+ showMachineType = false;
+ }
+ else {
+ aTempMap.put(x[ee]);
+ }
}
- else {
- z = new String[] {
- aRequiresMaint,
- aRequiresCoreModule,
- getMachineTooltip(),};
+ //Rebuild
+ x = new String[aTempMap.size()];
+ for (int ee = 0; ee < x.length; ee++) {
+ x[ee] = aTempMap.get(ee);
+ }
+
+
+ //Assemble ordered map for misc tooltips
+ AutoMap<String> aOrderedMap = new AutoMap<String>();
+ if (showHatches) {
+ aOrderedMap.put(aRequiresMaint);
+ aOrderedMap.put(aRequiresCoreModule);
+ if (showPollution) {
+ aOrderedMap.put(aRequiresMuffler);
+ }
+ }
+
+ if (showMachineType) {
+ aOrderedMap.put(getMachineTooltip());
+ }
+
+ if (showPollution) {
+ aOrderedMap.put(getPollutionTooltip());
+ }
+
+
+
+
+
+ //Add Stock Tooltip to bottom of list
+ String[] z;
+ z = new String[aOrderedMap.size()];
+ for (int ee = 0; ee < z.length; ee++) {
+ z[ee] = aOrderedMap.get(ee);
}
int a2, a3;