diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/gregtech/common/tileentities/machines/multi/purification/GT_MetaTileEntity_PurificationUnitPhAdjustment.java | 7 | ||||
-rw-r--r-- | src/main/resources/assets/gregtech/lang/en_US.lang | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/purification/GT_MetaTileEntity_PurificationUnitPhAdjustment.java b/src/main/java/gregtech/common/tileentities/machines/multi/purification/GT_MetaTileEntity_PurificationUnitPhAdjustment.java index 5c65e105dd..c885a5f974 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/purification/GT_MetaTileEntity_PurificationUnitPhAdjustment.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/purification/GT_MetaTileEntity_PurificationUnitPhAdjustment.java @@ -55,6 +55,7 @@ import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_StructureUtility; import gregtech.api.util.GT_Utility; import gregtech.api.util.IGT_HatchAdder; +import gregtech.api.util.shutdown.SimpleShutDownReason; public class GT_MetaTileEntity_PurificationUnitPhAdjustment extends GT_MetaTileEntity_PurificationUnitBase<GT_MetaTileEntity_PurificationUnitPhAdjustment> @@ -349,6 +350,7 @@ public class GT_MetaTileEntity_PurificationUnitPhAdjustment + "of 7.0 pH at the end of the cycle, the recipe always succeeds.") .addInfo("Otherwise, the recipe always fails.") .addInfo("Use a pH Sensor Hatch to read the current pH value.") + .addInfo("For safety, the machine will shut down if the pH goes below 0 or exceeds 14.") .addSeparator() .addInfo( "Every " + EnumChatFormatting.RED @@ -508,6 +510,11 @@ public class GT_MetaTileEntity_PurificationUnitPhAdjustment // Round to 2 decimals this.currentpHValue = Math.round(this.currentpHValue * 100.0f) / 100.0f; + + // If pH is 0 or 14, stop the machine + if (Math.abs(this.currentpHValue) < 0.001 || Math.abs(this.currentpHValue - 14.0f) < 0.001) { + stopMachine(SimpleShutDownReason.ofNormal("critical_ph_value")); + } } } diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang index f81340f6a3..e07e319299 100644 --- a/src/main/resources/assets/gregtech/lang/en_US.lang +++ b/src/main/resources/assets/gregtech/lang/en_US.lang @@ -557,6 +557,7 @@ GT5U.gui.text.no_repair=§4Shut down due to machine damage. GT5U.gui.text.no_machine_part=No correct machine part in controller slot. GT5U.gui.text.missing_item=§7Missing required item: §b%s§f GT5U.gui.text.ph_sensor=pH threshold +GT5U.gui.text.critical_ph_value=pH exceeded critical value. GT5U.item.programmed_circuit.select.header=Reprogram Circuit |