Configurable Channel Limits (#295)

* Channel Config Test

* Update AEConfig.java

* userDefinedChannelAmounts

config option added for the dense and normal channel amounts - will need to be refined to match everything but not sure what I would need to do to make it match the other config options

rebound all hard coded checks for channel amounts and linked them to the config options

redefined how the channel amounts are noted in all applicable api integrations
This commit is contained in:
0mega24
2023-07-28 09:26:41 -04:00
committed by GitHub
parent 13ba399418
commit 59c7dd1285
8 changed files with 32 additions and 14 deletions
+16
View File
@@ -83,6 +83,7 @@ public final class AEConfig extends Configuration implements IConfigurableObject
private int craftingCalculationTimePerTick = 5;
private PowerUnits selectedPowerUnit = PowerUnits.AE;
private boolean showCraftableTooltip = true;
// Spatial IO/Dimension
private int storageProviderID = -1;
private int storageDimensionID = -1;
@@ -122,6 +123,9 @@ public final class AEConfig extends Configuration implements IConfigurableObject
private int maxControllerSizeY = 7;
private int maxControllerSizeZ = 7;
private int normalChannelCapacity = 8;
private int denseChannelCapacity = 32;
private AEConfig(final File configFile) {
super(configFile);
this.configFile = configFile;
@@ -139,6 +143,8 @@ public final class AEConfig extends Configuration implements IConfigurableObject
CondenserOutput.SINGULARITY.requiredPower = this.get("Condenser", "Singularity", 256000).getInt(256000);
this.removeCrashingItemsOnLoad = this.get("general", "removeCrashingItemsOnLoad", false, "Will auto-remove items that crash when being loaded from storage. This will destroy those items instead of crashing the game!").getBoolean();
this.normalChannelCapacity = this.get("general", "normalChannelCapacity", this.normalChannelCapacity).getInt(this.normalChannelCapacity);
this.denseChannelCapacity = this.get("general", "denseChannelCapacity", this.denseChannelCapacity).getInt(this.denseChannelCapacity);
this.setCategoryComment("BlockingMode", "Map of items to not block when blockingmode is enabled.\n[modid]\nmodid:item:metadata(optional,default:0)\nSupports more than one modid, so you can block different things between, for example, gregtech or enderio");
this.nonBlockingItems = this.get("BlockingMode", "nonBlockingItems", nonBlockingItems, "NonBlockingItems").getStringList();
@@ -189,6 +195,8 @@ public final class AEConfig extends Configuration implements IConfigurableObject
this.maxControllerSizeY = Math.min(Math.max(this.get("ControllerSize", "maxControllerSizeY", this.maxControllerSizeY).getInt(this.maxControllerSizeY), 1), 63);
this.maxControllerSizeZ = Math.min(Math.max(this.get("ControllerSize", "maxControllerSizeZ", this.maxControllerSizeZ).getInt(this.maxControllerSizeZ), 1), 63);
this.clientSync();
this.addCustomCategoryComment("features", "Warning: Disabling a feature may disable other features depending on it.");
@@ -676,4 +684,12 @@ public final class AEConfig extends Configuration implements IConfigurableObject
public int getMaxControllerSizeZ() {
return this.maxControllerSizeZ;
}
public int getNormalChannelCapacity() {
return this.normalChannelCapacity;
}
public int getDenseChannelCapacity() {
return this.denseChannelCapacity;
}
}