Add stock control to Formulaic Assemblicator

This commit is contained in:
aidancbrady committed 2017-04-28 02:53:53 -04:00
1 parent b0dd7a10e7
commit 8a65923dc6
5 files changed
+155 -16

No files matched your search

@@ -100,7 +100,12 @@ public class GuiFormulaicAssemblicator extends GuiMekanism
if(xAxis >= 107 && xAxis <= 123 && yAxis >= 75 && yAxis <= 91)
{
drawCreativeTabHoveringText(LangUtils.localize("gui.autoModeToggle") + " " + LangUtils.transOnOff(!tileEntity.autoMode), xAxis, yAxis);
drawCreativeTabHoveringText(LangUtils.localize("gui.autoModeToggle") + ": " + LangUtils.transOnOff(tileEntity.autoMode), xAxis, yAxis);
}
if(xAxis >= 26 && xAxis <= 42 && yAxis >= 75 && yAxis <= 91)
{
drawCreativeTabHoveringText(LangUtils.localize("gui.stockControl") + ": " + LangUtils.transOnOff(tileEntity.stockControl), xAxis, yAxis);
}
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
@@ -179,9 +184,18 @@ public class GuiFormulaicAssemblicator extends GuiMekanism
else {
drawTexturedModalRect(guiWidth + 107, guiHeight + 75, 176 + 46, 16, 16, 16);
}
if(xAxis >= 26 && xAxis <= 42 && yAxis >= 75 && yAxis <= 91)
{
drawTexturedModalRect(guiWidth + 26, guiHeight + 75, 176 + 62, 48 + 0, 16, 16);
}
else {
drawTexturedModalRect(guiWidth + 26, guiHeight + 75, 176 + 62, 48 + 16, 16, 16);
}
}
else {
drawTexturedModalRect(guiWidth + 107, guiHeight + 75, 176 + 46, 32, 16, 16);
drawTexturedModalRect(guiWidth + 26, guiHeight + 75, 176 + 62, 48 + 32, 16, 16);
}
if(tileEntity.operatingTicks > 0)
@@ -223,7 +237,7 @@ public class GuiFormulaicAssemblicator extends GuiMekanism
private boolean canEncode()
{
return tileEntity.formula == null && !tileEntity.inventory.get(2).isEmpty() && tileEntity.inventory.get(2).getItem() instanceof ItemCraftingFormula &&
((ItemCraftingFormula)tileEntity.inventory.get(2).getItem()).getInventory(tileEntity.inventory.get(2)).isEmpty();
((ItemCraftingFormula)tileEntity.inventory.get(2).getItem()).getInventory(tileEntity.inventory.get(2)) == null;
}
@Override
@@ -296,6 +310,16 @@ public class GuiFormulaicAssemblicator extends GuiMekanism
Mekanism.packetHandler.sendToServer(new TileEntityMessage(Coord4D.get(tileEntity), data));
}
if(xAxis >= 26 && xAxis <= 42 && yAxis >= 75 && yAxis <= 91)
{
SoundHandler.playSound(SoundEvents.UI_BUTTON_CLICK);
ArrayList data = new ArrayList();
data.add(5);
Mekanism.packetHandler.sendToServer(new TileEntityMessage(Coord4D.get(tileEntity), data));
}
}
}
}