2012-12-19 21:23:55 +01:00
|
|
|
package mekanism.api;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tier information for Mekanism. This currently includes tiers for Energy Cubes and Smelting Factories.
|
|
|
|
* @author aidancbrady
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public final class Tier
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The tiers used by the Energy Cube and their corresponding values.
|
|
|
|
* @author aidancbrady
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public static enum EnergyCubeTier
|
|
|
|
{
|
2013-03-25 17:00:45 +01:00
|
|
|
BASIC("Basic", 5000000, 120, 320),
|
|
|
|
ADVANCED("Advanced", 10000000, 240, 540),
|
|
|
|
ELITE("Elite", 50000000, 240, 1280),
|
|
|
|
ULTIMATE("Ultimate", 100000000, 480, 2560);
|
2012-12-19 21:23:55 +01:00
|
|
|
|
|
|
|
public double MAX_ELECTRICITY;
|
|
|
|
public double VOLTAGE;
|
2013-02-01 01:43:39 +01:00
|
|
|
public int OUTPUT;
|
2012-12-19 21:23:55 +01:00
|
|
|
public String name;
|
|
|
|
|
|
|
|
public static EnergyCubeTier getFromName(String tierName)
|
|
|
|
{
|
|
|
|
for(EnergyCubeTier tier : values())
|
|
|
|
{
|
|
|
|
if(tierName.contains(tier.name))
|
|
|
|
{
|
|
|
|
return tier;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
System.out.println("[Mekanism] Invalid tier identifier when retrieving with name.");
|
|
|
|
return BASIC;
|
|
|
|
}
|
|
|
|
|
2013-02-25 21:02:05 +01:00
|
|
|
private EnergyCubeTier(String s, double maxEnergy, double voltage, int out)
|
2012-12-19 21:23:55 +01:00
|
|
|
{
|
|
|
|
name = s;
|
|
|
|
MAX_ELECTRICITY = maxEnergy;
|
2013-02-25 21:02:05 +01:00
|
|
|
VOLTAGE = voltage;
|
2013-02-01 01:43:39 +01:00
|
|
|
OUTPUT = out;
|
2012-12-19 21:23:55 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2013-03-20 18:58:36 +01:00
|
|
|
* The tiers used by the Factory and their corresponding values.
|
2012-12-19 21:23:55 +01:00
|
|
|
* @author aidancbrady
|
|
|
|
*
|
|
|
|
*/
|
2013-03-20 16:14:26 +01:00
|
|
|
public static enum FactoryTier
|
2012-12-19 21:23:55 +01:00
|
|
|
{
|
2013-03-20 18:58:36 +01:00
|
|
|
BASIC("Basic", 3, "GuiBasicFactory.png"),
|
|
|
|
ADVANCED("Advanced", 5, "GuiAdvancedFactory.png"),
|
|
|
|
ELITE("Elite", 7, "GuiEliteFactory.png");
|
2012-12-19 21:23:55 +01:00
|
|
|
|
|
|
|
public int processes;
|
|
|
|
public String guiTexturePath;
|
|
|
|
public String name;
|
|
|
|
|
2013-03-20 16:14:26 +01:00
|
|
|
public static FactoryTier getFromName(String tierName)
|
2012-12-19 21:23:55 +01:00
|
|
|
{
|
2013-03-20 16:14:26 +01:00
|
|
|
for(FactoryTier tier : values())
|
2012-12-19 21:23:55 +01:00
|
|
|
{
|
|
|
|
if(tierName.contains(tier.name))
|
|
|
|
{
|
|
|
|
return tier;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
System.out.println("[Mekanism] Invalid tier identifier when retrieving with name.");
|
|
|
|
return BASIC;
|
|
|
|
}
|
|
|
|
|
2013-03-20 16:14:26 +01:00
|
|
|
private FactoryTier(String s, int process, String gui)
|
2012-12-19 21:23:55 +01:00
|
|
|
{
|
|
|
|
name = s;
|
|
|
|
processes = process;
|
|
|
|
guiTexturePath = gui;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|