Skip to content

Commit

Permalink
Renamed config for machines exploding in weather from doTerrainExplos… (
Browse files Browse the repository at this point in the history
  • Loading branch information
Echoloquate authored and screret committed Dec 5, 2024
1 parent e23f66f commit a617959
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/generated/resources/assets/gtceu/lang/en_ud.json
Original file line number Diff line number Diff line change
Expand Up @@ -2192,7 +2192,6 @@
"config.gtceu.option.doBedrockOres": "sǝɹOʞɔoɹpǝᗺop",
"config.gtceu.option.doDatafixers": "sɹǝxıɟɐʇɐᗡop",
"config.gtceu.option.doSuperflatOres": "sǝɹOʇɐןɟɹǝdnSop",
"config.gtceu.option.doTerrainExplosion": "uoısoןdxƎuıɐɹɹǝ⟘op",
"config.gtceu.option.doesExplosionDamagesTerrain": "uıɐɹɹǝ⟘sǝbɐɯɐᗡuoısoןdxƎsǝop",
"config.gtceu.option.dumpAssets": "sʇǝssⱯdɯnp",
"config.gtceu.option.dumpRecipes": "sǝdıɔǝᴚdɯnp",
Expand Down Expand Up @@ -2290,6 +2289,7 @@
"config.gtceu.option.rngDamageElectricTools": "sןoo⟘ɔıɹʇɔǝןƎǝbɐɯɐᗡbuɹ",
"config.gtceu.option.rubberTreeSpawnChance": "ǝɔuɐɥƆuʍɐdSǝǝɹ⟘ɹǝqqnɹ",
"config.gtceu.option.sandOresFall": "ןןɐℲsǝɹOpuɐs",
"config.gtceu.option.shouldWeatherOrTerrainExplosion": "uoısoןdxƎuıɐɹɹǝ⟘ɹOɹǝɥʇɐǝMpןnoɥs",
"config.gtceu.option.showDimensionTier": "ɹǝı⟘uoısuǝɯıᗡʍoɥs",
"config.gtceu.option.smallBoilers": "sɹǝןıoᗺןןɐɯs",
"config.gtceu.option.solarBoilerBaseOutput": "ʇndʇnOǝsɐᗺɹǝןıoᗺɹɐןos",
Expand Down
2 changes: 1 addition & 1 deletion src/generated/resources/assets/gtceu/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -2192,7 +2192,6 @@
"config.gtceu.option.doBedrockOres": "doBedrockOres",
"config.gtceu.option.doDatafixers": "doDatafixers",
"config.gtceu.option.doSuperflatOres": "doSuperflatOres",
"config.gtceu.option.doTerrainExplosion": "doTerrainExplosion",
"config.gtceu.option.doesExplosionDamagesTerrain": "doesExplosionDamagesTerrain",
"config.gtceu.option.dumpAssets": "dumpAssets",
"config.gtceu.option.dumpRecipes": "dumpRecipes",
Expand Down Expand Up @@ -2290,6 +2289,7 @@
"config.gtceu.option.rngDamageElectricTools": "rngDamageElectricTools",
"config.gtceu.option.rubberTreeSpawnChance": "rubberTreeSpawnChance",
"config.gtceu.option.sandOresFall": "sandOresFall",
"config.gtceu.option.shouldWeatherOrTerrainExplosion": "shouldWeatherOrTerrainExplosion",
"config.gtceu.option.showDimensionTier": "showDimensionTier",
"config.gtceu.option.smallBoilers": "smallBoilers",
"config.gtceu.option.solarBoilerBaseOutput": "solarBoilerBaseOutput",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ protected NotifiableEnergyContainer createEnergyContainer(Object... args) {
public void onLoad() {
super.onLoad();
// if machine need do check explosion conditions
if (!isRemote() && ConfigHolder.INSTANCE.machines.doTerrainExplosion && shouldWeatherOrTerrainExplosion()) {
if (!isRemote() && ConfigHolder.INSTANCE.machines.shouldWeatherOrTerrainExplosion &&
shouldWeatherOrTerrainExplosion()) {
energyListener = energyContainer.addChangedListener(this::updateExplosionSubscription);
updateExplosionSubscription();
}
Expand All @@ -84,7 +85,7 @@ public void onUnload() {
//////////////////////////////////////

protected void updateExplosionSubscription() {
if (ConfigHolder.INSTANCE.machines.doTerrainExplosion && shouldWeatherOrTerrainExplosion() &&
if (ConfigHolder.INSTANCE.machines.shouldWeatherOrTerrainExplosion && shouldWeatherOrTerrainExplosion() &&
energyContainer.getEnergyStored() > 0) {
explosionSubs = subscribeServerTick(explosionSubs, this::checkExplosion);
} else if (explosionSubs != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public boolean shouldOpenUI(Player player, InteractionHand hand, BlockHitResult
public void onLoad() {
super.onLoad();
// if machine need do check explosion conditions
if (ConfigHolder.INSTANCE.machines.doTerrainExplosion && shouldWeatherOrTerrainExplosion()) {
if (ConfigHolder.INSTANCE.machines.shouldWeatherOrTerrainExplosion && shouldWeatherOrTerrainExplosion()) {
energyListener = energyContainer.addChangedListener(this::updateExplosionSubscription);
updateExplosionSubscription();
}
Expand All @@ -102,7 +102,7 @@ public void onUnload() {
//////////////////////////////////////

protected void updateExplosionSubscription() {
if (ConfigHolder.INSTANCE.machines.doTerrainExplosion && shouldWeatherOrTerrainExplosion() &&
if (ConfigHolder.INSTANCE.machines.shouldWeatherOrTerrainExplosion && shouldWeatherOrTerrainExplosion() &&
energyContainer.getEnergyStored() > 0) {
explosionSubs = subscribeServerTick(explosionSubs, this::checkExplosion);
} else if (explosionSubs != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ public static class MachineConfigs {
@Configurable.Comment({
"Whether machines explode in rainy weather or when placed next to certain terrain, such as fire or lava",
"Default: false" })
public boolean doTerrainExplosion = false;
public boolean shouldWeatherOrTerrainExplosion = false;
@Configurable
@Configurable.Comment({ "Energy use multiplier for electric items.", "Default: 100" })
public int energyUsageMultiplier = 100;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2765,7 +2765,7 @@ public static MachineDefinition[] registerConverter(int amperage) {
}

public static Component explosion() {
if (ConfigHolder.INSTANCE.machines.doTerrainExplosion)
if (ConfigHolder.INSTANCE.machines.shouldWeatherOrTerrainExplosion)
return Component.translatable("gtceu.universal.tooltip.terrain_resist");
return null;
}
Expand Down

0 comments on commit a617959

Please sign in to comment.