Merge Timer into Marmot
After Width: | Height: | Size: 292 B |
After Width: | Height: | Size: 277 B |
After Width: | Height: | Size: 299 B |
After Width: | Height: | Size: 284 B |
After Width: | Height: | Size: 227 B |
After Width: | Height: | Size: 224 B |
After Width: | Height: | Size: 229 B |
After Width: | Height: | Size: 225 B |
After Width: | Height: | Size: 386 B |
After Width: | Height: | Size: 396 B |
After Width: | Height: | Size: 367 B |
After Width: | Height: | Size: 370 B |
After Width: | Height: | Size: 343 B |
After Width: | Height: | Size: 281 B |
After Width: | Height: | Size: 289 B |
After Width: | Height: | Size: 283 B |
|
@ -81,6 +81,8 @@ item.pipeGate.3=Gold AND Gate
|
|||
item.pipeGate.4=Gold OR Gate
|
||||
item.pipeGate.5=Diamond AND Gate
|
||||
item.pipeGate.6=Diamond OR Gate
|
||||
item.pipeGate.7=Quartz AND Gate
|
||||
item.pipeGate.8=Quartz OR Gate
|
||||
item.pipeGateAutarchic.0=Autarchic Gate
|
||||
item.pipeGateAutarchic.1=Autarchic Iron AND Gate
|
||||
item.pipeGateAutarchic.2=Autarchic Iron OR Gate
|
||||
|
@ -88,6 +90,8 @@ item.pipeGateAutarchic.3=Autarchic Gold AND Gate
|
|||
item.pipeGateAutarchic.4=Autarchic Gold OR Gate
|
||||
item.pipeGateAutarchic.5=Autarchic Diamond AND Gate
|
||||
item.pipeGateAutarchic.6=Autarchic Diamond OR Gate
|
||||
item.pipeGateAutarchic.7=Autarchic Quartz AND Gate
|
||||
item.pipeGateAutarchic.8=Autarchic Quartz OR Gate
|
||||
item.redPipeWire=Red Pipe Wire
|
||||
item.bluePipeWire=Blue Pipe Wire
|
||||
item.greenPipeWire=Green Pipe Wire
|
||||
|
@ -97,6 +101,7 @@ item.redstoneChipset.1=Redstone Iron Chipset
|
|||
item.redstoneChipset.2=Redstone Golden Chipset
|
||||
item.redstoneChipset.3=Redstone Diamond Chipset
|
||||
item.redstoneChipset.4=Pulsating Chipset
|
||||
item.redstoneChipset.5=Redstone Quartz Chipset
|
||||
item.blueprintItem=Blueprint
|
||||
item.PipeItemsWood=Wooden Transport Pipe
|
||||
item.PipeItemsCobblestone=Cobblestone Transport Pipe
|
||||
|
|
|
@ -37,6 +37,7 @@ import cpw.mods.fml.common.registry.LanguageRegistry;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.Property;
|
||||
|
||||
@Mod(name = "BuildCraft Silicon", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Silicon", dependencies = DefaultProps.DEPENDENCY_TRANSPORT)
|
||||
|
@ -46,6 +47,11 @@ public class BuildCraftSilicon {
|
|||
public static ItemRedstoneChipset redstoneChipset;
|
||||
public static BlockLaser laserBlock;
|
||||
public static BlockLaserTable assemblyTableBlock;
|
||||
|
||||
public static int timerIntervalShort;
|
||||
public static int timerIntervalMedium;
|
||||
public static int timerIntervalLong;
|
||||
|
||||
@Instance("BuildCraft|Silicon")
|
||||
public static BuildCraftSilicon instance;
|
||||
|
||||
|
@ -57,6 +63,13 @@ public class BuildCraftSilicon {
|
|||
|
||||
Property redstoneChipsetId = BuildCraftCore.mainConfiguration.getItem("redstoneChipset.id", DefaultProps.REDSTONE_CHIPSET);
|
||||
|
||||
Property timerIntervalShort = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "timerShortInterval", 2);
|
||||
timerIntervalShort.comment = "sets the 'short' duration of the quartz gate timer (default: 2 seconds)";
|
||||
Property timerIntervalMedium = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "timerMediumInterval", 5);
|
||||
timerIntervalMedium.comment = "sets the 'medium' duration of the quartz gate timer (default: 5 seconds)";
|
||||
Property timerIntervalLong = BuildCraftCore.mainConfiguration.get(Configuration.CATEGORY_GENERAL, "timerLongInterval", 10);
|
||||
timerIntervalLong.comment = "sets the 'long' duration of the quartz gate timer (default: 10 seconds)";
|
||||
|
||||
BuildCraftCore.mainConfiguration.save();
|
||||
|
||||
laserBlock = new BlockLaser(laserId.getInt());
|
||||
|
@ -73,6 +86,10 @@ public class BuildCraftSilicon {
|
|||
redstoneChipset.setUnlocalizedName("redstoneChipset");
|
||||
CoreProxy.proxy.registerItem(redstoneChipset);
|
||||
redstoneChipset.registerItemStacks();
|
||||
|
||||
this.timerIntervalShort = timerIntervalShort.getInt();
|
||||
this.timerIntervalMedium = timerIntervalMedium.getInt();
|
||||
this.timerIntervalLong = timerIntervalLong.getInt();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -123,6 +140,12 @@ public class BuildCraftSilicon {
|
|||
CoreProxy.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 5), new Object[]{new ItemStack(redstoneChipset, 1, 0),
|
||||
new ItemStack(BuildCraftTransport.pipeGate, 1, 6)});
|
||||
|
||||
// Quartz
|
||||
CoreProxy.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 8), new Object[]{new ItemStack(redstoneChipset, 1, 0),
|
||||
new ItemStack(BuildCraftTransport.pipeGate, 1, 7)});
|
||||
CoreProxy.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 7), new Object[]{new ItemStack(redstoneChipset, 1, 0),
|
||||
new ItemStack(BuildCraftTransport.pipeGate, 1, 8)});
|
||||
|
||||
// Iron - Autarchic
|
||||
CoreProxy.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 2), new Object[]{new ItemStack(redstoneChipset, 1, 0),
|
||||
new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 1)});
|
||||
|
@ -141,18 +164,26 @@ public class BuildCraftSilicon {
|
|||
CoreProxy.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 5), new Object[]{new ItemStack(redstoneChipset, 1, 0),
|
||||
new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 6)});
|
||||
|
||||
// Quartz - Autarchic
|
||||
CoreProxy.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 8), new Object[]{new ItemStack(redstoneChipset, 1, 0),
|
||||
new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 7)});
|
||||
CoreProxy.proxy.addShapelessRecipe(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 7), new Object[]{new ItemStack(redstoneChipset, 1, 0),
|
||||
new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 8)});
|
||||
|
||||
// / REDSTONE CHIPSETS
|
||||
CoreProxy.proxy.addName(new ItemStack(redstoneChipset, 1, 0), "Redstone Chipset");
|
||||
CoreProxy.proxy.addName(new ItemStack(redstoneChipset, 1, 1), "Redstone Iron Chipset");
|
||||
CoreProxy.proxy.addName(new ItemStack(redstoneChipset, 1, 2), "Redstone Golden Chipset");
|
||||
CoreProxy.proxy.addName(new ItemStack(redstoneChipset, 1, 3), "Redstone Diamond Chipset");
|
||||
CoreProxy.proxy.addName(new ItemStack(redstoneChipset, 1, 4), "Pulsating Chipset");
|
||||
CoreProxy.proxy.addName(new ItemStack(redstoneChipset, 1, 5), "Redstone Quartz Chipset");
|
||||
|
||||
BuildcraftRecipes.assemblyTable.addRecipe(10000, new ItemStack(redstoneChipset, 1, 0), Item.redstone);
|
||||
BuildcraftRecipes.assemblyTable.addRecipe(20000, new ItemStack(redstoneChipset, 1, 1), Item.redstone, Item.ingotIron);
|
||||
BuildcraftRecipes.assemblyTable.addRecipe(40000, new ItemStack(redstoneChipset, 1, 2), Item.redstone, Item.ingotGold);
|
||||
BuildcraftRecipes.assemblyTable.addRecipe(80000, new ItemStack(redstoneChipset, 1, 3), Item.redstone, Item.diamond);
|
||||
BuildcraftRecipes.assemblyTable.addRecipe(40000, new ItemStack(redstoneChipset, 2, 4), Item.redstone, Item.enderPearl);
|
||||
BuildcraftRecipes.assemblyTable.addRecipe(60000, new ItemStack(redstoneChipset, 1, 5), Item.redstone, Item.netherQuartz);
|
||||
|
||||
// / REDSTONE GATES
|
||||
CoreProxy.proxy.addName(new ItemStack(BuildCraftTransport.pipeGate, 1, 0), "Gate");
|
||||
|
@ -170,6 +201,7 @@ public class BuildCraftSilicon {
|
|||
CoreProxy.proxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 4), "Autarchic Gold OR Gate");
|
||||
CoreProxy.proxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 6), "Autarchic Diamond OR Gate");
|
||||
|
||||
|
||||
// BuildcraftRecipes.assemblyTable.addRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 0), 20000, new ItemStack(redstoneChipset, 1, 0));
|
||||
// BuildcraftRecipes.assemblyTable.addRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 1), 40000, new ItemStack(redstoneChipset, 1, 1), new ItemStack(BuildCraftTransport.redPipeWire));
|
||||
// BuildcraftRecipes.assemblyTable.addRecipe(new ItemStack(BuildCraftTransport.pipeGate, 1, 2), 40000, new ItemStack(redstoneChipset, 1, 1), new ItemStack(BuildCraftTransport.redPipeWire));
|
||||
|
@ -197,6 +229,29 @@ public class BuildCraftSilicon {
|
|||
// BuildcraftRecipes.assemblyTable.addRecipe(new ItemStack[]{new ItemStack(redstoneChipset, 1, 3), new ItemStack(BuildCraftTransport.redPipeWire), new ItemStack(BuildCraftTransport.bluePipeWire), new ItemStack(BuildCraftTransport.greenPipeWire), new ItemStack(BuildCraftTransport.yellowPipeWire)}, 160000, new ItemStack(BuildCraftTransport.pipeGate, 1, 6)));
|
||||
// BuildcraftRecipes.assemblyTable.addRecipe(new ItemStack[]{new ItemStack(BuildCraftTransport.pipeGate, 1, 6), new ItemStack(redstoneChipset, 1, 4), new ItemStack(redstoneChipset, 1, 1)}, 80000, new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 6)));
|
||||
|
||||
// / QUARTZ AND GATES
|
||||
// AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[]{new ItemStack(redstoneChipset, 1, 5),
|
||||
// new ItemStack(BuildCraftTransport.redPipeWire), new ItemStack(BuildCraftTransport.bluePipeWire),
|
||||
// new ItemStack(BuildCraftTransport.greenPipeWire), new ItemStack(BuildCraftTransport.yellowPipeWire)}, 120000, new ItemStack(
|
||||
// BuildCraftTransport.pipeGate, 1, 7)));
|
||||
// CoreProxy.proxy.addName(new ItemStack(BuildCraftTransport.pipeGate, 1, 7), "Quartz AND Gate");
|
||||
// AssemblyRecipe.assemblyRecipes
|
||||
// .add(new AssemblyRecipe(new ItemStack[]{new ItemStack(BuildCraftTransport.pipeGate, 1, 7), new ItemStack(redstoneChipset, 1, 4),
|
||||
// new ItemStack(redstoneChipset, 1, 1)}, 60000, new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 7)));
|
||||
// CoreProxy.proxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 7), "Autarchic Quartz AND Gate");
|
||||
//
|
||||
// // / QUARTZ OR GATES
|
||||
// AssemblyRecipe.assemblyRecipes.add(new AssemblyRecipe(new ItemStack[]{new ItemStack(redstoneChipset, 1, 5),
|
||||
// new ItemStack(BuildCraftTransport.redPipeWire), new ItemStack(BuildCraftTransport.bluePipeWire),
|
||||
// new ItemStack(BuildCraftTransport.greenPipeWire), new ItemStack(BuildCraftTransport.yellowPipeWire)}, 120000, new ItemStack(
|
||||
// BuildCraftTransport.pipeGate, 1, 8)));
|
||||
// CoreProxy.proxy.addName(new ItemStack(BuildCraftTransport.pipeGate, 1, 8), "Quartz OR Gate");
|
||||
// AssemblyRecipe.assemblyRecipes
|
||||
// .add(new AssemblyRecipe(new ItemStack[]{new ItemStack(BuildCraftTransport.pipeGate, 1, 7), new ItemStack(redstoneChipset, 1, 4),
|
||||
// new ItemStack(redstoneChipset, 1, 1)}, 60000, new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 8)));
|
||||
// CoreProxy.proxy.addName(new ItemStack(BuildCraftTransport.pipeGateAutarchic, 1, 8), "Autarchic Quartz OR Gate");
|
||||
|
||||
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
|
|
@ -82,6 +82,7 @@ import buildcraft.transport.triggers.ActionPowerLimiter;
|
|||
import buildcraft.transport.triggers.ActionSignalOutput;
|
||||
import buildcraft.transport.triggers.ActionSingleEnergyPulse;
|
||||
import buildcraft.transport.triggers.TriggerPipeContents;
|
||||
import buildcraft.transport.triggers.TriggerQuartzTimer;
|
||||
import buildcraft.transport.triggers.TriggerPipeContents.Kind;
|
||||
import buildcraft.transport.triggers.TriggerPipeSignal;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
|
@ -167,6 +168,9 @@ public class BuildCraftTransport {
|
|||
public static BCTrigger triggerGreenSignalInactive = new TriggerPipeSignal(DefaultProps.TRIGGER_GREEN_SIGNAL_INACTIVE, false, IPipe.WireColor.Green);
|
||||
public static BCTrigger triggerYellowSignalActive = new TriggerPipeSignal(DefaultProps.TRIGGER_YELLOW_SIGNAL_ACTIVE, true, IPipe.WireColor.Yellow);
|
||||
public static BCTrigger triggerYellowSignalInactive = new TriggerPipeSignal(DefaultProps.TRIGGER_YELLOW_SIGNAL_INACTIVE, false, IPipe.WireColor.Yellow);
|
||||
public static BCTrigger triggerTimerShort = new TriggerQuartzTimer(DefaultProps.TRIGGER_TIMER_SHORT, TriggerQuartzTimer.Time.Short);
|
||||
public static BCTrigger triggerTimerMedium = new TriggerQuartzTimer(DefaultProps.TRIGGER_TIMER_MEDIUM, TriggerQuartzTimer.Time.Medium);
|
||||
public static BCTrigger triggerTimerLong = new TriggerQuartzTimer(DefaultProps.TRIGGER_TIMER_LONG, TriggerQuartzTimer.Time.Long);
|
||||
public static BCAction actionRedSignal = new ActionSignalOutput(DefaultProps.ACTION_RED_SIGNAL, IPipe.WireColor.Red);
|
||||
public static BCAction actionBlueSignal = new ActionSignalOutput(DefaultProps.ACTION_BLUE_SIGNAL, IPipe.WireColor.Blue);
|
||||
public static BCAction actionGreenSignal = new ActionSignalOutput(DefaultProps.ACTION_GREEN_SIGNAL, IPipe.WireColor.Green);
|
||||
|
|
|
@ -159,6 +159,9 @@ public class DefaultProps {
|
|||
public static int TRIGGER_RED_ENGINE_HEAT = 28;
|
||||
public static int TRIGGER_PIPE_REQUESTS_ENERGY = 29;
|
||||
public static int TRIGGER_PIPE_TOO_MUCH_ENERGY = 30;
|
||||
public static int TRIGGER_TIMER_SHORT = 31;
|
||||
public static int TRIGGER_TIMER_MEDIUM = 32;
|
||||
public static int TRIGGER_TIMER_LONG = 33;
|
||||
|
||||
public static int ACTION_REDSTONE = 1;
|
||||
public static int ACTION_RED_SIGNAL = 2;
|
||||
|
|
|
@ -36,11 +36,11 @@ public class ItemRedstoneChipset extends ItemBuildCraft {
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
for (int i = 0; i < 5; i++) {
|
||||
for (int i = 0; i < 6; i++) {
|
||||
itemList.add(new ItemStack(this, 1, i));
|
||||
}
|
||||
}
|
||||
private static String[] chipsetNames = {"redstone_red", "redstone_iron", "redstone_gold", "redstone_diamond", "redstone_pulsating"};
|
||||
private static String[] chipsetNames = {"redstone_red", "redstone_iron", "redstone_gold", "redstone_diamond", "redstone_pulsating", "redstone_quartz"};
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -47,8 +47,11 @@ public class ActionTriggerIconProvider implements IIconProvider {
|
|||
public static final int Trigger_Inventory_Below25 = 33;
|
||||
public static final int Trigger_Inventory_Below50 = 34;
|
||||
public static final int Trigger_Inventory_Below75 = 35;
|
||||
public static final int Trigger_Timer_Short = 36;
|
||||
public static final int Trigger_Timer_Medium = 37;
|
||||
public static final int Trigger_Timer_Long = 38;
|
||||
|
||||
public static final int MAX = 36;
|
||||
public static final int MAX = 39;
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
@ -102,6 +105,9 @@ public class ActionTriggerIconProvider implements IIconProvider {
|
|||
icons[ActionTriggerIconProvider.Trigger_Inventory_Below25] = iconRegister.registerIcon("buildcraft:triggers/trigger_inventory_below25");
|
||||
icons[ActionTriggerIconProvider.Trigger_Inventory_Below50] = iconRegister.registerIcon("buildcraft:triggers/trigger_inventory_below50");
|
||||
icons[ActionTriggerIconProvider.Trigger_Inventory_Below75] = iconRegister.registerIcon("buildcraft:triggers/trigger_inventory_below75");
|
||||
icons[ActionTriggerIconProvider.Trigger_Timer_Short] = iconRegister.registerIcon("buildcraft:triggers/trigger_timer_short");
|
||||
icons[ActionTriggerIconProvider.Trigger_Timer_Medium] = iconRegister.registerIcon("buildcraft:triggers/trigger_timer_medium");
|
||||
icons[ActionTriggerIconProvider.Trigger_Timer_Long] = iconRegister.registerIcon("buildcraft:triggers/trigger_timer_long");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ public abstract class Gate {
|
|||
|
||||
public static enum GateKind {
|
||||
|
||||
None, Single, AND_2, OR_2, AND_3, OR_3, AND_4, OR_4;
|
||||
None, Single, AND_2, OR_2, AND_3, OR_3, AND_4, OR_4, AND_5, OR_5;
|
||||
|
||||
public static GateKind getKindFromDamage(ItemStack itemstack) {
|
||||
switch (itemstack.getItemDamage()) {
|
||||
|
@ -45,6 +45,10 @@ public abstract class Gate {
|
|||
return AND_4;
|
||||
case 6:
|
||||
return OR_4;
|
||||
case 7:
|
||||
return AND_5;
|
||||
case 8:
|
||||
return OR_5;
|
||||
default:
|
||||
return None;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,18 @@ public class GateIconProvider implements IIconProvider {
|
|||
public static final int Gate_Autarchic_Diamond_Or_Dark = 26;
|
||||
public static final int Gate_Autarchic_Diamond_Or_Lit = 27;
|
||||
|
||||
public static final int MAX = 28;
|
||||
public static final int Gate_Quartz_And_Dark = 28;
|
||||
public static final int Gate_Quartz_And_Lit = 29;
|
||||
public static final int Gate_Quartz_Or_Dark = 30;
|
||||
public static final int Gate_Quartz_Or_Lit = 31;
|
||||
|
||||
public static final int Gate_Autarchic_Quartz_And_Dark = 32;
|
||||
public static final int Gate_Autarchic_Quartz_And_Lit = 33;
|
||||
public static final int Gate_Autarchic_Quartz_Or_Dark = 34;
|
||||
public static final int Gate_Autarchic_Quartz_Or_Lit = 35;
|
||||
|
||||
|
||||
public static final int MAX = 36;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private Icon[] icons;
|
||||
|
@ -83,6 +94,16 @@ public class GateIconProvider implements IIconProvider {
|
|||
icons[GateIconProvider.Gate_Autarchic_Diamond_And_Lit] = iconRegister.registerIcon("buildcraft:gate_autarchic_diamond_and_lit");
|
||||
icons[GateIconProvider.Gate_Autarchic_Diamond_Or_Dark] = iconRegister.registerIcon("buildcraft:gate_autarchic_diamond_or_dark");
|
||||
icons[GateIconProvider.Gate_Autarchic_Diamond_Or_Lit] = iconRegister.registerIcon("buildcraft:gate_autarchic_diamond_or_lit");
|
||||
|
||||
icons[GateIconProvider.Gate_Quartz_And_Dark] = iconRegister.registerIcon("buildcraft:gate_quartz_and_dark");
|
||||
icons[GateIconProvider.Gate_Quartz_And_Lit] = iconRegister.registerIcon("buildcraft:gate_quartz_and_lit");
|
||||
icons[GateIconProvider.Gate_Quartz_Or_Dark] = iconRegister.registerIcon("buildcraft:gate_quartz_or_dark");
|
||||
icons[GateIconProvider.Gate_Quartz_Or_Lit] = iconRegister.registerIcon("buildcraft:gate_quartz_or_lit");
|
||||
|
||||
icons[GateIconProvider.Gate_Autarchic_Quartz_And_Dark] = iconRegister.registerIcon("buildcraft:gate_autarchic_quartz_and_dark");
|
||||
icons[GateIconProvider.Gate_Autarchic_Quartz_And_Lit] = iconRegister.registerIcon("buildcraft:gate_autarchic_quartz_and_lit");
|
||||
icons[GateIconProvider.Gate_Autarchic_Quartz_Or_Dark] = iconRegister.registerIcon("buildcraft:gate_autarchic_quartz_or_dark");
|
||||
icons[GateIconProvider.Gate_Autarchic_Quartz_Or_Lit] = iconRegister.registerIcon("buildcraft:gate_autarchic_quartz_or_lit");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -88,16 +88,20 @@ public class GateVanilla extends Gate {
|
|||
return StringUtils.localize("item.pipeGate.0");
|
||||
case AND_2:
|
||||
return StringUtils.localize("item.pipeGate.1");
|
||||
case AND_3:
|
||||
return StringUtils.localize("item.pipeGate.3");
|
||||
case AND_4:
|
||||
return StringUtils.localize("item.pipeGate.5");
|
||||
case OR_2:
|
||||
return StringUtils.localize("item.pipeGate.2");
|
||||
case AND_3:
|
||||
return StringUtils.localize("item.pipeGate.3");
|
||||
case OR_3:
|
||||
return StringUtils.localize("item.pipeGate.4");
|
||||
case AND_4:
|
||||
return StringUtils.localize("item.pipeGate.5");
|
||||
case OR_4:
|
||||
return StringUtils.localize("item.pipeGate.6");
|
||||
case AND_5:
|
||||
return StringUtils.localize("item.pipeGate.7");
|
||||
case OR_5:
|
||||
return StringUtils.localize("item.pipeGate.8");
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
|
@ -106,9 +110,9 @@ public class GateVanilla extends Gate {
|
|||
|
||||
@Override
|
||||
public GateConditional getConditional() {
|
||||
if (kind == GateKind.OR_2 || kind == GateKind.OR_3 || kind == GateKind.OR_4)
|
||||
if (kind == GateKind.OR_2 || kind == GateKind.OR_3 || kind == GateKind.OR_4 || kind == GateKind.OR_5)
|
||||
return GateConditional.OR;
|
||||
else if (kind == GateKind.AND_2 || kind == GateKind.AND_3 || kind == GateKind.AND_4)
|
||||
else if (kind == GateKind.AND_2 || kind == GateKind.AND_3 || kind == GateKind.AND_4 || kind == GateKind.AND_5)
|
||||
return GateConditional.AND;
|
||||
else
|
||||
return GateConditional.None;
|
||||
|
@ -163,8 +167,12 @@ public class GateVanilla extends Gate {
|
|||
gateDamage = 5;
|
||||
break;
|
||||
case OR_4:
|
||||
default:
|
||||
gateDamage = 6;
|
||||
case AND_5:
|
||||
gateDamage = 7;
|
||||
break;
|
||||
default:
|
||||
gateDamage = 8;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -252,6 +260,12 @@ public class GateVanilla extends Gate {
|
|||
list.add(BuildCraftTransport.triggerYellowSignalActive);
|
||||
list.add(BuildCraftTransport.triggerYellowSignalInactive);
|
||||
}
|
||||
|
||||
if (pipe.gate.kind == GateKind.AND_5 || pipe.gate.kind == GateKind.OR_5) {
|
||||
list.add(BuildCraftTransport.triggerTimerShort);
|
||||
list.add(BuildCraftTransport.triggerTimerMedium);
|
||||
list.add(BuildCraftTransport.triggerTimerLong);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -282,6 +296,10 @@ public class GateVanilla extends Gate {
|
|||
return isGateActive ? GateIconProvider.Gate_Diamond_And_Lit : GateIconProvider.Gate_Diamond_And_Dark;
|
||||
case OR_4:
|
||||
return isGateActive ? GateIconProvider.Gate_Diamond_Or_Lit : GateIconProvider.Gate_Diamond_Or_Dark;
|
||||
case AND_5:
|
||||
return isGateActive ? GateIconProvider.Gate_Quartz_And_Lit : GateIconProvider.Gate_Quartz_And_Dark;
|
||||
case OR_5:
|
||||
return isGateActive ? GateIconProvider.Gate_Quartz_Or_Lit : GateIconProvider.Gate_Quartz_Or_Dark;
|
||||
}
|
||||
} else {
|
||||
switch (kind) {
|
||||
|
@ -301,6 +319,10 @@ public class GateVanilla extends Gate {
|
|||
return isGateActive ? GateIconProvider.Gate_Autarchic_Diamond_And_Lit : GateIconProvider.Gate_Autarchic_Diamond_And_Dark;
|
||||
case OR_4:
|
||||
return isGateActive ? GateIconProvider.Gate_Autarchic_Diamond_Or_Lit : GateIconProvider.Gate_Autarchic_Diamond_Or_Dark;
|
||||
case AND_5:
|
||||
return isGateActive ? GateIconProvider.Gate_Autarchic_Quartz_And_Lit : GateIconProvider.Gate_Autarchic_Quartz_And_Dark;
|
||||
case OR_5:
|
||||
return isGateActive ? GateIconProvider.Gate_Autarchic_Quartz_Or_Lit : GateIconProvider.Gate_Autarchic_Quartz_Or_Dark;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -317,7 +339,7 @@ public class GateVanilla extends Gate {
|
|||
return TEXTURE1;
|
||||
else if (kind == GateKind.AND_2 || kind == GateKind.OR_2)
|
||||
return TEXTURE2;
|
||||
else if (kind == GateKind.AND_3 || kind == GateKind.OR_3)
|
||||
else if (kind == GateKind.AND_3 || kind == GateKind.OR_3 || kind == GateKind.AND_5 || kind == GateKind.OR_5)
|
||||
return TEXTURE3;
|
||||
else
|
||||
return TEXTURE4;
|
||||
|
|
|
@ -29,8 +29,14 @@ public class ItemGate extends ItemBuildCraft {
|
|||
public static final int Autarchic_Gate_Gold_Or = 11;
|
||||
public static final int Autarchic_Gate_Diamond_And = 12;
|
||||
public static final int Autarchic_Gate_Diamond_Or = 13;
|
||||
|
||||
public static final int Gate_Quartz_And = 14;
|
||||
public static final int Gate_Quartz_Or = 15;
|
||||
|
||||
public static final int Autarchic_Gate_Quartz_And = 16;
|
||||
public static final int Autarchic_Gate_Quartz_Or = 17;
|
||||
|
||||
public static final int MAX = 14;
|
||||
public static final int MAX = 18;
|
||||
|
||||
private int series;
|
||||
|
||||
|
@ -65,8 +71,12 @@ public class ItemGate extends ItemBuildCraft {
|
|||
return icons[ItemGate.Gate_Gold_Or];
|
||||
case 5:
|
||||
return icons[ItemGate.Gate_Diamond_And];
|
||||
default:
|
||||
case 6:
|
||||
return icons[ItemGate.Gate_Diamond_Or];
|
||||
case 7:
|
||||
return icons[ItemGate.Gate_Quartz_And];
|
||||
default:
|
||||
return icons[ItemGate.Gate_Quartz_Or];
|
||||
}
|
||||
} else if (series == 1){
|
||||
switch (i) {
|
||||
|
@ -82,8 +92,12 @@ public class ItemGate extends ItemBuildCraft {
|
|||
return icons[ItemGate.Autarchic_Gate_Gold_Or];
|
||||
case 5:
|
||||
return icons[ItemGate.Autarchic_Gate_Diamond_And];
|
||||
default:
|
||||
case 6:
|
||||
return icons[ItemGate.Autarchic_Gate_Diamond_Or];
|
||||
case 7:
|
||||
return icons[ItemGate.Autarchic_Gate_Quartz_And];
|
||||
default:
|
||||
return icons[ItemGate.Autarchic_Gate_Quartz_Or];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -105,6 +119,8 @@ public class ItemGate extends ItemBuildCraft {
|
|||
itemList.add(new ItemStack(this, 1, 4));
|
||||
itemList.add(new ItemStack(this, 1, 5));
|
||||
itemList.add(new ItemStack(this, 1, 6));
|
||||
itemList.add(new ItemStack(this, 1, 7));
|
||||
itemList.add(new ItemStack(this, 1, 8));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -136,7 +152,13 @@ public class ItemGate extends ItemBuildCraft {
|
|||
icons[ItemGate.Autarchic_Gate_Gold_Or] = iconRegister.registerIcon("buildcraft:autarchic_gate_gold_or");
|
||||
icons[ItemGate.Autarchic_Gate_Diamond_And] = iconRegister.registerIcon("buildcraft:autarchic_gate_diamond_and");
|
||||
icons[ItemGate.Autarchic_Gate_Diamond_Or] = iconRegister.registerIcon("buildcraft:autarchic_gate_diamond_or");
|
||||
|
||||
|
||||
|
||||
icons[ItemGate.Gate_Quartz_And] = iconRegister.registerIcon("buildcraft:gate_quartz_and");
|
||||
icons[ItemGate.Gate_Quartz_Or] = iconRegister.registerIcon("buildcraft:gate_quartz_or");
|
||||
|
||||
icons[ItemGate.Autarchic_Gate_Quartz_And] = iconRegister.registerIcon("buildcraft:autarchic_gate_quartz_and");
|
||||
icons[ItemGate.Autarchic_Gate_Quartz_Or] = iconRegister.registerIcon("buildcraft:autarchic_gate_quartz_or");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -349,6 +349,8 @@ public class ContainerGateInterface extends BuildCraftContainer {
|
|||
break;
|
||||
case AND_3:
|
||||
case OR_3:
|
||||
case AND_5:
|
||||
case OR_5:
|
||||
positions = 4;
|
||||
break;
|
||||
case OR_4:
|
||||
|
|
|
@ -181,7 +181,7 @@ public class GuiGateInterface extends GuiAdvancedInterface {
|
|||
slots[1] = new TriggerSlot(62, 44, pipe, 1);
|
||||
slots[2] = new ActionSlot(98, 26, pipe, 0);
|
||||
slots[3] = new ActionSlot(98, 44, pipe, 1);
|
||||
} else if (pipe.gate.kind == GateKind.AND_3 || pipe.gate.kind == GateKind.OR_3) {
|
||||
} else if (pipe.gate.kind == GateKind.AND_3 || pipe.gate.kind == GateKind.OR_3 || pipe.gate.kind == GateKind.AND_5 || pipe.gate.kind == GateKind.OR_5) {
|
||||
nbEntries = 4;
|
||||
|
||||
slots = new AdvancedSlot[12];
|
||||
|
|
76
common/buildcraft/transport/triggers/TriggerQuartzTimer.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
package buildcraft.transport.triggers;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import buildcraft.BuildCraftSilicon;
|
||||
import buildcraft.api.core.SafeTimeTracker;
|
||||
import buildcraft.api.gates.ITriggerParameter;
|
||||
import buildcraft.core.triggers.ActionTriggerIconProvider;
|
||||
import buildcraft.core.triggers.BCTrigger;
|
||||
import buildcraft.transport.ITriggerPipe;
|
||||
import buildcraft.transport.Pipe;
|
||||
|
||||
public class TriggerQuartzTimer extends BCTrigger implements ITriggerPipe {
|
||||
|
||||
public enum Time {
|
||||
Short, Medium, Long
|
||||
}
|
||||
|
||||
public Time time;
|
||||
public SafeTimeTracker pulseTracker;
|
||||
public long delay;
|
||||
|
||||
public TriggerQuartzTimer(int legacyId, Time time) {
|
||||
super(legacyId, "buildcraft.timer." + time.name().toLowerCase(Locale.ENGLISH));
|
||||
|
||||
this.time = time;
|
||||
pulseTracker = new SafeTimeTracker();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconIndex() {
|
||||
switch (time) {
|
||||
case Short:
|
||||
return ActionTriggerIconProvider.Trigger_Timer_Short;
|
||||
case Medium:
|
||||
return ActionTriggerIconProvider.Trigger_Timer_Medium;
|
||||
default:
|
||||
return ActionTriggerIconProvider.Trigger_Timer_Long;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
switch (time) {
|
||||
case Short:
|
||||
return BuildCraftSilicon.timerIntervalShort + " Second Timer";
|
||||
case Medium:
|
||||
return BuildCraftSilicon.timerIntervalMedium + " Second Timer";
|
||||
default:
|
||||
return BuildCraftSilicon.timerIntervalLong + " Second Timer";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasParameter() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTriggerActive(Pipe pipe, ITriggerParameter parameter) {
|
||||
|
||||
if (time == Time.Short) {
|
||||
delay = BuildCraftSilicon.timerIntervalShort * 20; // Multiply the seconds by 20 to convert to ticks
|
||||
} else if (time == Time.Medium) {
|
||||
delay = BuildCraftSilicon.timerIntervalMedium * 20;
|
||||
} else {
|
||||
delay = BuildCraftSilicon.timerIntervalLong * 20;
|
||||
}
|
||||
|
||||
return pulseTracker.markTimeIfDelay(pipe.getWorld(), delay);
|
||||
}
|
||||
|
||||
}
|