Remove config option for debug API

And also remove the "is present" guards within the various APIs. I'm
happy at this point that debug is safe, and think we can guarantee its
presence.
This commit is contained in:
Jonathan Coates
2021-06-22 21:01:05 +01:00
parent c489d4bc4f
commit 3ace49d27f
5 changed files with 4 additions and 14 deletions
@@ -42,7 +42,6 @@ public final class Config
private static final ConfigValue<Integer> maximumFilesOpen;
private static final ConfigValue<Boolean> disableLua51Features;
private static final ConfigValue<String> defaultComputerSettings;
private static final ConfigValue<Boolean> debugEnabled;
private static final ConfigValue<Boolean> logComputerErrors;
private static final ConfigValue<Boolean> commandRequireCreative;
@@ -120,10 +119,6 @@ public final class Config
"autocompletion" )
.define( "default_computer_settings", ComputerCraft.defaultComputerSettings );
debugEnabled = builder
.comment( "Enable Lua's debug library. This is sandboxed to each computer, so is generally safe to be used by players." )
.define( "debug_enabled", ComputerCraft.debugEnable );
logComputerErrors = builder
.comment( "Log exceptions thrown by peripherals and other Lua objects.\n" +
"This makes it easier for mod authors to debug problems, but may result in log spam should people use buggy methods." )
@@ -317,7 +312,6 @@ public final class Config
ComputerCraft.maximumFilesOpen = maximumFilesOpen.get();
ComputerCraft.disableLua51Features = disableLua51Features.get();
ComputerCraft.defaultComputerSettings = defaultComputerSettings.get();
ComputerCraft.debugEnable = debugEnabled.get();
ComputerCraft.computerThreads = computerThreads.get();
ComputerCraft.logComputerErrors = logComputerErrors.get();
ComputerCraft.commandRequireCreative = commandRequireCreative.get();