Adjustable Tick Rates.
This commit is contained in:
+10
-17
@@ -14,6 +14,7 @@ import appeng.api.config.YesNo;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.api.util.IConfigureableObject;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.settings.TickRates;
|
||||
import appeng.util.ConfigManager;
|
||||
import appeng.util.IConfigManagerHost;
|
||||
import appeng.util.Platform;
|
||||
@@ -86,6 +87,7 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo
|
||||
public double oreDoublePercentage = 90.0;
|
||||
|
||||
public boolean enableEffects = true;
|
||||
public boolean useLargeFonts = false;
|
||||
|
||||
public int wireless_battery = 1600000;
|
||||
public int manipulator_battery = 200000;
|
||||
@@ -119,12 +121,10 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo
|
||||
grinderOres = get( "GrindStone", "grinderOres", grinderOres ).getStringList();
|
||||
oreDoublePercentage = get( "GrindStone", "oreDoublePercentage", oreDoublePercentage ).getDouble( oreDoublePercentage );
|
||||
enableEffects = get( "Client", "enableEffects", true ).getBoolean( true );
|
||||
|
||||
// settings.registerSetting( Settings.SEARCH_MODS, YesNo.YES );
|
||||
useLargeFonts= get( "Client", "useTerminalUseLargeFont", true ).getBoolean( true );
|
||||
|
||||
settings.registerSetting( Settings.SEARCH_TOOLTIPS, YesNo.YES );
|
||||
settings.registerSetting( Settings.SEARCH_MODE, SearchBoxMode.AUTOSEARCH );
|
||||
// settings.registerSetting( Settings.SORT_BY, SortOrder.NAME );
|
||||
// settings.registerSetting( Settings.SORT_DIRECTION, SortDir.ASCENDING );
|
||||
|
||||
spawnChargedChance = (float) (1.0 - get( "worldGen", "spawnChargedChance", 1.0 - spawnChargedChance ).getDouble( 1.0 - spawnChargedChance ));
|
||||
minMeteoriteDistance = get( "worldGen", "minMeteoriteDistance", minMeteoriteDistance ).getInt( minMeteoriteDistance );
|
||||
@@ -176,6 +176,11 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo
|
||||
selectedPowerUnit = PowerUnits.AE;
|
||||
}
|
||||
|
||||
for (TickRates tr: TickRates.values() )
|
||||
{
|
||||
tr.Load(this);
|
||||
}
|
||||
|
||||
if ( isFeatureEnabled( AEFeature.SpatialIO ) )
|
||||
{
|
||||
storageBiomeID = get( "spatialio", "storageBiomeID", storageBiomeID ).getInt( storageBiomeID );
|
||||
@@ -256,21 +261,9 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo
|
||||
return featureFlags.contains( f );
|
||||
}
|
||||
|
||||
public int getBlockID(Class c, String subname)
|
||||
{
|
||||
return 0;
|
||||
// return getBlock( AEFeatureHandler.getName( c, subname ), blkBaseNumber++ ).getInt();
|
||||
}
|
||||
|
||||
public int getItemID(Class c, String subname)
|
||||
{
|
||||
return 0;
|
||||
// return getItem( AEFeatureHandler.getName( c, subname ), blkItemNumber++ ).getInt();
|
||||
}
|
||||
|
||||
public boolean useTerminalUseLargeFont()
|
||||
{
|
||||
return false;
|
||||
return useLargeFonts;
|
||||
}
|
||||
|
||||
public Enum getSetting(String Category, Class<? extends Enum> class1, Enum myDefault)
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package appeng.core.settings;
|
||||
|
||||
import appeng.core.AEConfig;
|
||||
|
||||
public enum TickRates {
|
||||
|
||||
Interface(5,120),
|
||||
|
||||
ImportBus(5, 40),
|
||||
|
||||
ExportBus(5, 60),
|
||||
|
||||
AnnihilationPlane(2, 120),
|
||||
|
||||
MJTunnel(1, 20),
|
||||
|
||||
METunnel(5, 20),
|
||||
|
||||
Inscriber(1, 1),
|
||||
|
||||
IOPort(1, 5),
|
||||
|
||||
VibrationChamber(10, 40),
|
||||
|
||||
StorageBus(5, 60);
|
||||
|
||||
public int min;
|
||||
public int max;
|
||||
|
||||
private TickRates( int min, int max ) {
|
||||
this.min = min;
|
||||
this.max = max;
|
||||
}
|
||||
|
||||
public void Load( AEConfig config )
|
||||
{
|
||||
config.addCustomCategoryComment("TickRates", " Min / Max Tickrates for dynamic ticking, most of these components also use sleeping, to prevent constant ticking, adjust with care, non standard rates are not supported or tested." );
|
||||
min = config.get( "TickRates", name()+".min", min ).getInt(min);
|
||||
max = config.get( "TickRates", name()+".max", max ).getInt(max);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user