aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorGlodBlock <1356392126@qq.com>2022-04-08 21:33:14 +0800
committerGlodBlock <1356392126@qq.com>2022-04-08 21:33:14 +0800
commitf9b611942c3134cc4ded195d9faaf8aad68b2ada (patch)
tree9eb942cd93d101889a002156041608378cf2d82f /src/main/java
parent4278ee40a77c7ccc5c2d758c0f1e06da2421e51a (diff)
downloadGT5-Unofficial-f9b611942c3134cc4ded195d9faaf8aad68b2ada.tar.gz
GT5-Unofficial-f9b611942c3134cc4ded195d9faaf8aad68b2ada.tar.bz2
GT5-Unofficial-f9b611942c3134cc4ded195d9faaf8aad68b2ada.zip
add config fot tesal tower visual effect
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/github/technus/tectech/loader/TecTechConfig.java4
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/com/github/technus/tectech/loader/TecTechConfig.java b/src/main/java/com/github/technus/tectech/loader/TecTechConfig.java
index aa6d1e5e9f..840fe91b11 100644
--- a/src/main/java/com/github/technus/tectech/loader/TecTechConfig.java
+++ b/src/main/java/com/github/technus/tectech/loader/TecTechConfig.java
@@ -40,6 +40,7 @@ public class TecTechConfig extends ConfigManager {
public float TESLA_SINGLE_LOSS_FACTOR_OVERDRIVE;
public int TESLA_SINGLE_LOSS_PER_BLOCK;
public int TESLA_SINGLE_RANGE;
+ public boolean TESLA_VISUAL_EFFECT;
/**
* This loading phases do not correspond to mod loading phases!
@@ -74,6 +75,7 @@ public class TecTechConfig extends ConfigManager {
TESLA_SINGLE_LOSS_FACTOR_OVERDRIVE = 0.25F;
TESLA_SINGLE_LOSS_PER_BLOCK = 1;
TESLA_SINGLE_RANGE = 20;
+ TESLA_VISUAL_EFFECT = true;
}
/**
@@ -138,6 +140,8 @@ public class TecTechConfig extends ConfigManager {
TESLA_SINGLE_LOSS_PER_BLOCK, 0, Integer.MAX_VALUE, "Tesla Transceiver power transmission loss per block per amp");
TESLA_SINGLE_RANGE = _mainConfig.getInt("TeslaSingleRange", "tesla_tweaks",
TESLA_SINGLE_RANGE, 0, Integer.MAX_VALUE, "Tesla Transceiver to max range");
+ TESLA_VISUAL_EFFECT = _mainConfig.getBoolean("EnableTeslaVisualEffect", "tesla_tweaks",
+ TESLA_VISUAL_EFFECT, "Set true to enable the cool visual effect when tesla tower running.");
}
/**
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java
index 8d910d9431..1b7e522433 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java
@@ -65,6 +65,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock
private static final int heliumUse = TecTech.configTecTech.TESLA_MULTI_PLASMA_PER_SECOND_T1_HELIUM;//Default is 100
private static final int nitrogenUse = TecTech.configTecTech.TESLA_MULTI_PLASMA_PER_SECOND_T1_NITROGEN;//Default is 50
private static final int radonUse = TecTech.configTecTech.TESLA_MULTI_PLASMA_PER_SECOND_T2_RADON;//Default is 50
+ private static final boolean visualEffect = TecTech.configTecTech.TESLA_VISUAL_EFFECT;//Default is true
//Default is {1, 1, 1}
private static final int[] plasmaTierLoss = new int[]{TecTech.configTecTech.TESLA_MULTI_LOSS_PER_BLOCK_T0,
TecTech.configTecTech.TESLA_MULTI_LOSS_PER_BLOCK_T1, TecTech.configTecTech.TESLA_MULTI_LOSS_PER_BLOCK_T2};
@@ -613,7 +614,7 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock
//TODO Encapsulate the spark sender
sparkCount--;
- if (sparkCount == 0) {
+ if (sparkCount == 0 && visualEffect) {
IGregTechTileEntity mte = getBaseMetaTileEntity();
sparkCount = 10;
if (!sparkList.isEmpty()) {