aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/commands
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-08-15 07:55:35 +0100
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-08-15 07:55:35 +0100
commite7ef217244340fe6984b79815d56d9d5b72582fc (patch)
tree5ba69d85189d2c6d876c95154b7524cee2859e87 /src/Java/gtPlusPlus/core/commands
parent9f9b49884e9496023cd9cd66b0dfe4301f8231bf (diff)
downloadGT5-Unofficial-e7ef217244340fe6984b79815d56d9d5b72582fc.tar.gz
GT5-Unofficial-e7ef217244340fe6984b79815d56d9d5b72582fc.tar.bz2
GT5-Unofficial-e7ef217244340fe6984b79815d56d9d5b72582fc.zip
+ Attempted to add a buggy NEI page for decayable dusts.
+ Added a way to disable ALL GT++ logging in the ASM config file. + Added recipes for Ztones covers. % Adjusted recipes for Tiered machine covers. % Updated GT++ debug command to toggle logging if desired. (Useful in-game). $ Fixed bug where smart covers would lose their state.
Diffstat (limited to 'src/Java/gtPlusPlus/core/commands')
-rw-r--r--src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java46
1 files changed, 39 insertions, 7 deletions
diff --git a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java
index 3a7d4461f4..5b9c17bacf 100644
--- a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java
+++ b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java
@@ -7,6 +7,7 @@ import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
+import gtPlusPlus.preloader.asm.AsmConfig;
import net.minecraft.command.ICommand;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
@@ -33,6 +34,9 @@ public class CommandEnableDebugWhileRunning implements ICommand
}
+
+ // Use '/debugmodegtpp' along with 'logging' or 'debug' to toggle Debug mode and Logging.
+ // Using nothing after the command toggles both to their opposite states respectively.
@Override
public String getCommandUsage(final ICommandSender var1){
return "/debugmodegtpp";
@@ -47,16 +51,44 @@ public class CommandEnableDebugWhileRunning implements ICommand
@Override
public void processCommand(final ICommandSender S, final String[] argString){
- Logger.INFO("Toggling Debug Mode");
- final World W = S.getEntityWorld();
- final EntityPlayer P = CommandUtils.getPlayer(S);
-
- if (PlayerUtils.isPlayerOP(P)) {
- CORE.DEBUG = Utils.invertBoolean(CORE.DEBUG);
- PlayerUtils.messagePlayer(P, "Toggled GT++ Debug Mode - Enabled: "+CORE.DEBUG);
+ if (argString == null || argString.length == 0 || argString.length > 1) {
+ Logger.INFO("Toggling Debug Mode & Logging.");
+ final EntityPlayer P = CommandUtils.getPlayer(S);
+ if (PlayerUtils.isPlayerOP(P)) {
+ CORE.DEBUG = Utils.invertBoolean(CORE.DEBUG);
+ PlayerUtils.messagePlayer(P, "Toggled GT++ Debug Mode - Enabled: "+CORE.DEBUG);
+ AsmConfig.disableAllLogging = Utils.invertBoolean(AsmConfig.disableAllLogging);
+ PlayerUtils.messagePlayer(P, "Toggled GT++ Logging - Enabled: "+(!AsmConfig.disableAllLogging));
+ }
+ }
+ else {
+ if (argString[0].toLowerCase().equals("debug")) {
+ Logger.INFO("Toggling Debug Mode.");
+ final EntityPlayer P = CommandUtils.getPlayer(S);
+ if (PlayerUtils.isPlayerOP(P)) {
+ CORE.DEBUG = Utils.invertBoolean(CORE.DEBUG);
+ PlayerUtils.messagePlayer(P, "Toggled GT++ Debug Mode - Enabled: "+CORE.DEBUG);
+ }
+ }
+ else if (argString[0].toLowerCase().equals("logging")) {
+ Logger.INFO("Toggling Logging.");
+ final EntityPlayer P = CommandUtils.getPlayer(S);
+ if (PlayerUtils.isPlayerOP(P)) {
+ AsmConfig.disableAllLogging = Utils.invertBoolean(AsmConfig.disableAllLogging);
+ PlayerUtils.messagePlayer(P, "Toggled GT++ Logging - Enabled: "+(!AsmConfig.disableAllLogging));
+ }
+ }
+ else {
+ final EntityPlayer P = CommandUtils.getPlayer(S);
+ if (PlayerUtils.isPlayerOP(P)) {
+ PlayerUtils.messagePlayer(P, "Invalid command, use 'debug' or 'logging'");
+ }
+ }
}
+
+
}
@Override