Refactored AEConfig (#2633)

Added a singleton getter instead the public field.
Reduced all fields to private.
Replaced field access with getters.
Added setters where necessary (Dimension/Biome Registration)
Added config options to disable more features.
Splitted Enum name from the config key.
Changed FacadeConfig and Networkhandler similar to AEConfig.init().
This commit is contained in:
yueh
2016-11-26 14:07:34 +01:00
committed by GitHub
parent 6554e295d5
commit a665200c31
105 changed files with 1022 additions and 645 deletions
+4 -4
View File
@@ -186,7 +186,7 @@ public class Platform
{
double p = ( (double) n ) / 100;
final PowerUnits displayUnits = AEConfig.instance.selectedPowerUnit();
final PowerUnits displayUnits = AEConfig.instance().selectedPowerUnit();
p = PowerUnits.AE.convertTo( displayUnits, p );
final String[] preFixes = { "k", "M", "G", "T", "P", "T", "P", "E", "Z", "Y" };
@@ -1489,7 +1489,7 @@ public class Platform
final boolean a_isSecure = isPowered( a.getGrid() ) && a.getLastSecurityKey() != -1;
final boolean b_isSecure = isPowered( b.getGrid() ) && b.getLastSecurityKey() != -1;
if( AEConfig.instance.isFeatureEnabled( AEFeature.LogSecurityAudits ) )
if( AEConfig.instance().isFeatureEnabled( AEFeature.LOG_SECURITY_AUDITS ) )
{
AELog.info( "Audit: " + a_isSecure + " : " + b_isSecure + " @ " + a.getLastSecurityKey() + " vs " + b.getLastSecurityKey() + " & " + a.getPlayerID() + " vs " + b.getPlayerID() );
}
@@ -1723,14 +1723,14 @@ public class Platform
return false;
}
if( type == AEFeature.CertusQuartzTools )
if( type == AEFeature.CERTUS_QUARTZ_TOOLS )
{
final IItemDefinition certusQuartzCrystal = AEApi.instance().definitions().materials().certusQuartzCrystal();
return certusQuartzCrystal.isSameAs( b );
}
if( type == AEFeature.NetherQuartzTools )
if( type == AEFeature.NETHER_QUARTZ_TOOLS )
{
return Items.QUARTZ == b.getItem();
}