Start work on the Energized Induction Matrix. This is going to be fun!

This commit is contained in:
Aidan C. Brady committed 2015-02-28 13:08:17 -06:00
1 parent a5507a88f2
commit ce31b1e22c
10 files changed
+113 -39

No files matched your search

+65 -25
View File
@@ -2,7 +2,6 @@ package mekanism.common;
import mekanism.api.EnumColor;
import mekanism.common.multipart.TransmitterType;
import net.minecraft.util.ResourceLocation;
/**
@@ -17,27 +16,34 @@ public final class Tier
*/
public static enum BaseTier
{
BASIC("Basic"),
ADVANCED("Advanced"),
ELITE("Elite"),
ULTIMATE("Ultimate"),
CREATIVE("Creative");
BASIC("Basic", EnumColor.BRIGHT_GREEN),
ADVANCED("Advanced", EnumColor.DARK_RED),
ELITE("Elite", EnumColor.DARK_BLUE),
ULTIMATE("Ultimate", EnumColor.PURPLE),
CREATIVE("Creative", EnumColor.BLACK);
public String getName()
{
return name;
}
public EnumColor getColor()
{
return color;
}
public boolean isObtainable()
{
return this != CREATIVE;
}
private String name;
private EnumColor color;
private BaseTier(String s)
private BaseTier(String s, EnumColor c)
{
name = s;
color = c;
}
}
@@ -48,22 +54,20 @@ public final class Tier
*/
public static enum EnergyCubeTier
{
BASIC("Basic", EnumColor.BRIGHT_GREEN, 2000000, 800),
ADVANCED("Advanced", EnumColor.DARK_RED, 8000000, 3200),
ELITE("Elite", EnumColor.DARK_BLUE, 32000000, 12800),
ULTIMATE("Ultimate", EnumColor.PURPLE, 128000000, 51200),
CREATIVE("Creative", EnumColor.BLACK, Integer.MAX_VALUE, Integer.MAX_VALUE);
BASIC(2000000, 800),
ADVANCED(8000000, 3200),
ELITE(32000000, 12800),
ULTIMATE(128000000, 51200),
CREATIVE(Integer.MAX_VALUE, Integer.MAX_VALUE);
public double MAX_ELECTRICITY;
public double OUTPUT;
public String name;
public EnumColor color;
public static EnergyCubeTier getFromName(String tierName)
{
for(EnergyCubeTier tier : values())
{
if(tierName.contains(tier.name))
if(tierName.contains(tier.getBaseTier().getName()))
{
return tier;
}
@@ -78,14 +82,52 @@ public final class Tier
return BaseTier.values()[ordinal()];
}
private EnergyCubeTier(String s, EnumColor c, double maxEnergy, double out)
private EnergyCubeTier(double maxEnergy, double out)
{
name = s;
color = c;
MAX_ELECTRICITY = maxEnergy;
OUTPUT = out;
}
}
public static enum InductionCellTier
{
BASIC(1E9D),
ADVANCED(8E9D),
ELITE(64E9D),
ULTIMATE(512E9D);
public double MAX_ELECTRICITY;
public BaseTier getBaseTier()
{
return BaseTier.values()[ordinal()];
}
private InductionCellTier(double maxEnergy)
{
MAX_ELECTRICITY = maxEnergy;
}
}
public static enum InductionProviderTier
{
BASIC(64000),
ADVANCED(512000),
ELITE(4096000),
ULTIMATE(32768000);
public double OUTPUT;
public BaseTier getBaseTier()
{
return BaseTier.values()[ordinal()];
}
private InductionProviderTier(double out)
{
OUTPUT = out;
}
}
/**
* The tiers used by the Factory and their corresponding values.
@@ -94,19 +136,18 @@ public final class Tier
*/
public static enum FactoryTier
{
BASIC("Basic", 3, new ResourceLocation("mekanism", "gui/factory/GuiBasicFactory.png")),
ADVANCED("Advanced", 5, new ResourceLocation("mekanism", "gui/factory/GuiAdvancedFactory.png")),
ELITE("Elite", 7, new ResourceLocation("mekanism", "gui/factory/GuiEliteFactory.png"));
BASIC(3, new ResourceLocation("mekanism", "gui/factory/GuiBasicFactory.png")),
ADVANCED(5, new ResourceLocation("mekanism", "gui/factory/GuiAdvancedFactory.png")),
ELITE(7, new ResourceLocation("mekanism", "gui/factory/GuiEliteFactory.png"));
public int processes;
public ResourceLocation guiLocation;
public String name;
public static FactoryTier getFromName(String tierName)
{
for(FactoryTier tier : values())
{
if(tierName.contains(tier.name))
if(tierName.contains(tier.getBaseTier().getName()))
{
return tier;
}
@@ -121,9 +162,8 @@ public final class Tier
return BaseTier.values()[ordinal()];
}
private FactoryTier(String s, int process, ResourceLocation gui)
private FactoryTier(int process, ResourceLocation gui)
{
name = s;
processes = process;
guiLocation = gui;
}