Merge branch 'master' of https://bitbucket.org/AlgorithmX2/appliedenergistics2 into rv1
Conflicts: container/implementations/ContainerStorageBus.java core/sync/packets/PacketValueConfig.java
This commit is contained in:
+29
-6
@@ -134,6 +134,8 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo
|
||||
|
||||
minMeteoriteDistanceSq = minMeteoriteDistance * minMeteoriteDistance;
|
||||
|
||||
addCustomCategoryComment("wireless", "Range= WirelessBaseRange + WirelessBoosterRangeMultiplier * Math.pow( boosters, WirelessBoosterExp )\nPowerDrain= WirelessBaseCost + WirelessCostMultiplier * Math.pow( boosters, 1 + boosters / WirelessHighWirelessCount )" );
|
||||
|
||||
WirelessBaseCost = get( "wireless", "WirelessBaseCost", WirelessBaseCost ).getDouble( WirelessBaseCost );
|
||||
WirelessCostMultiplier = get( "wireless", "WirelessCostMultiplier", WirelessCostMultiplier ).getDouble( WirelessCostMultiplier );
|
||||
WirelessBaseRange = get( "wireless", "WirelessBaseRange", WirelessBaseRange ).getDouble( WirelessBaseRange );
|
||||
@@ -166,10 +168,10 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo
|
||||
for (Enum e : settings.getSettings())
|
||||
{
|
||||
String Category = e.getClass().getSimpleName();
|
||||
|
||||
Enum value = settings.getSetting( e );
|
||||
Property p = this.get( Category, e.name(), value.name() );
|
||||
|
||||
|
||||
Property p = this.get( Category, e.name(), value.name(), getListComment( value ) );
|
||||
|
||||
try
|
||||
{
|
||||
value = Enum.valueOf( value.getClass(), p.getString() );
|
||||
@@ -184,7 +186,7 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo
|
||||
|
||||
try
|
||||
{
|
||||
selectedPowerUnit = PowerUnits.valueOf( get( "Client", "PowerUnit", selectedPowerUnit.name() ).getString() );
|
||||
selectedPowerUnit = PowerUnits.valueOf( get( "Client", "PowerUnit", selectedPowerUnit.name(), getListComment(selectedPowerUnit) ).getString() );
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
@@ -216,6 +218,27 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo
|
||||
}
|
||||
}
|
||||
|
||||
private String getListComment(Enum value)
|
||||
{
|
||||
String comment = null;
|
||||
|
||||
if ( value != null )
|
||||
{
|
||||
EnumSet set = EnumSet.allOf(value.getClass() );
|
||||
|
||||
for ( Object Oeg : set )
|
||||
{
|
||||
Enum eg = (Enum)Oeg;
|
||||
if ( comment == null )
|
||||
comment = "Possible Values: " + eg.name();
|
||||
else
|
||||
comment += ", "+eg.name();
|
||||
}
|
||||
}
|
||||
|
||||
return comment;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSetting(IConfigManager manager, Enum setting, Enum newValue)
|
||||
{
|
||||
@@ -224,7 +247,7 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo
|
||||
if ( e == setting )
|
||||
{
|
||||
String Category = e.getClass().getSimpleName();
|
||||
Property p = this.get( Category, e.name(), settings.getSetting( e ).name() );
|
||||
Property p = this.get( Category, e.name(), settings.getSetting( e ).name(), getListComment( newValue ) );
|
||||
p.set( newValue.name() );
|
||||
}
|
||||
}
|
||||
@@ -247,7 +270,7 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo
|
||||
get( "spatialio", "storageProviderID", storageProviderID ).set( storageProviderID );
|
||||
}
|
||||
|
||||
get( "Client", "PowerUnit", selectedPowerUnit.name() ).set( selectedPowerUnit.name() );
|
||||
get( "Client", "PowerUnit", selectedPowerUnit.name(), getListComment(selectedPowerUnit) ).set( selectedPowerUnit.name() );
|
||||
|
||||
if ( hasChanged() )
|
||||
super.save();
|
||||
|
||||
@@ -7,51 +7,47 @@ import cpw.mods.fml.common.ICrashCallable;
|
||||
public class CrashEnhancement implements ICrashCallable
|
||||
{
|
||||
|
||||
final CrashInfo Output;
|
||||
private final String name;
|
||||
private final String value;
|
||||
|
||||
final String ModVersion = AEConfig.CHANNEL + " " + AEConfig.VERSION + " for Forge " + // WHAT?
|
||||
private final String ModVersion = AEConfig.CHANNEL + " " + AEConfig.VERSION + " for Forge " + // WHAT?
|
||||
net.minecraftforge.common.ForgeVersion.majorVersion + "." // majorVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.minorVersion + "." // minorVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.revisionVersion + "." // revisionVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.buildVersion;
|
||||
|
||||
final String IntegrationInfo;
|
||||
|
||||
public CrashEnhancement(CrashInfo ci) {
|
||||
Output = ci;
|
||||
|
||||
if ( IntegrationRegistry.instance != null )
|
||||
IntegrationInfo = IntegrationRegistry.instance.getStatus();
|
||||
public CrashEnhancement(CrashInfo Output) {
|
||||
|
||||
if ( Output == CrashInfo.MOD_VERSION )
|
||||
{
|
||||
name = "AE2 Version";
|
||||
value = ModVersion;
|
||||
}
|
||||
else if ( Output == CrashInfo.INTEGRATION )
|
||||
{
|
||||
name ="AE2 Integration";
|
||||
if ( IntegrationRegistry.instance != null )
|
||||
value = IntegrationRegistry.instance.getStatus();
|
||||
else
|
||||
value = "N/A";
|
||||
}
|
||||
else
|
||||
IntegrationInfo = "N/A";
|
||||
{
|
||||
name = "AE2_UNKNOWN";
|
||||
value = "UNKNOWN_VALUE";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String call() throws Exception
|
||||
{
|
||||
switch (Output)
|
||||
{
|
||||
case MOD_VERSION:
|
||||
return ModVersion;
|
||||
case INTEGRATION:
|
||||
return IntegrationInfo;
|
||||
}
|
||||
|
||||
return "UNKNOWN_VALUE";
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLabel()
|
||||
{
|
||||
switch (Output)
|
||||
{
|
||||
case MOD_VERSION:
|
||||
return "AE2 Version";
|
||||
case INTEGRATION:
|
||||
return "AE2 Integration";
|
||||
}
|
||||
|
||||
return "AE2_UNKNOWN";
|
||||
return name;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public enum AEFeature
|
||||
|
||||
enableFacadeCrafting("Crafting"), inWorldSingularity("Crafting"), inWorldFluix("Crafting"), inWorldPurification("Crafting"), UpdateLogging("Misc", false),
|
||||
|
||||
AlphaPass("Rendering"), AlphaMigration("Migration", true);
|
||||
AlphaPass("Rendering");
|
||||
|
||||
String Category;
|
||||
boolean visible = true;
|
||||
|
||||
@@ -21,6 +21,7 @@ import appeng.container.implementations.ContainerPatternTerm;
|
||||
import appeng.container.implementations.ContainerPriority;
|
||||
import appeng.container.implementations.ContainerQuartzKnife;
|
||||
import appeng.container.implementations.ContainerSecurity;
|
||||
import appeng.container.implementations.ContainerStorageBus;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.sync.network.INetworkInfo;
|
||||
|
||||
@@ -83,6 +84,21 @@ public class PacketValueConfig extends AppEngPacket
|
||||
cpt.clear();
|
||||
}
|
||||
}
|
||||
else if ( Name.startsWith( "StorageBus." ) && c instanceof ContainerStorageBus )
|
||||
{
|
||||
ContainerStorageBus ccw = (ContainerStorageBus) c;
|
||||
if ( Name.equals( "StorageBus.Action" ) )
|
||||
{
|
||||
if ( Value.equals( "Partition" ) )
|
||||
{
|
||||
ccw.partition();
|
||||
}
|
||||
else if ( Value.equals( "Clear" ) )
|
||||
{
|
||||
ccw.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( Name.startsWith( "CellWorkbench." ) && c instanceof ContainerCellWorkbench )
|
||||
{
|
||||
ContainerCellWorkbench ccw = (ContainerCellWorkbench) c;
|
||||
|
||||
Reference in New Issue
Block a user