mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-12-19 11:48:05 +00:00
Clean up our handling of configuration files
- Move configuration loading into a separate file, just so it doesn't clutter up ComputerCraft.java. - Normalise property names, so they're all snake_case. - Split properties into separate categories (http, turtle, peripheral), so the main one is less cluttered. - Define an explicit ordering of each category.
This commit is contained in:
@@ -14,6 +14,7 @@ import dan200.computercraft.core.tracking.ComputerTracker;
|
||||
import dan200.computercraft.core.tracking.Tracking;
|
||||
import dan200.computercraft.core.tracking.TrackingContext;
|
||||
import dan200.computercraft.core.tracking.TrackingField;
|
||||
import dan200.computercraft.shared.Config;
|
||||
import dan200.computercraft.shared.command.framework.*;
|
||||
import dan200.computercraft.shared.command.text.TableBuilder;
|
||||
import dan200.computercraft.shared.computer.core.ComputerFamily;
|
||||
@@ -381,8 +382,7 @@ public final class CommandComputerCraft extends CommandDelegate
|
||||
@Override
|
||||
public void execute( @Nonnull CommandContext context, @Nonnull List<String> arguments )
|
||||
{
|
||||
ComputerCraft.loadConfig();
|
||||
ComputerCraft.syncConfig();
|
||||
Config.reload();
|
||||
context.getSender().sendMessage( new TextComponentString( "Reloaded config" ) );
|
||||
}
|
||||
} );
|
||||
|
||||
Reference in New Issue
Block a user