From 99f53a1322b643349d23acf9ff2ac746bbe7e080 Mon Sep 17 00:00:00 2001 From: "Aidan C. Brady" Date: Sun, 10 Nov 2013 18:54:30 -0500 Subject: [PATCH] Some fancy sounds and tooltips --- .../mekanism/client/ClientPlayerTickHandler.java | 2 +- common/mekanism/client/gui/GuiConfiguration.java | 12 +++++++++++- common/mekanism/client/gui/GuiItemStackFilter.java | 9 ++++++++- .../mekanism/client/gui/GuiLogisticalSorter.java | 13 +++++++++++++ common/mekanism/client/gui/GuiOreDictFilter.java | 1 + .../sound/etc/{ChanSwitch.ogg => Ding.ogg} | Bin 6 files changed, 34 insertions(+), 3 deletions(-) rename resources/assets/mekanism/sound/etc/{ChanSwitch.ogg => Ding.ogg} (100%) diff --git a/common/mekanism/client/ClientPlayerTickHandler.java b/common/mekanism/client/ClientPlayerTickHandler.java index 38e625f96..d726d6200 100644 --- a/common/mekanism/client/ClientPlayerTickHandler.java +++ b/common/mekanism/client/ClientPlayerTickHandler.java @@ -109,7 +109,7 @@ public class ClientPlayerTickHandler implements ITickHandler int newChan = item.getChannel(stack) < 9 ? item.getChannel(stack)+1 : 1; item.setChannel(stack, newChan); PacketHandler.sendPacket(Transmission.SERVER, new PacketWalkieTalkieState().setParams(newChan)); - Minecraft.getMinecraft().sndManager.playSoundFX("mekanism:etc.ChanSwitch", 1.0F, 1.0F); + Minecraft.getMinecraft().sndManager.playSoundFX("mekanism:etc.Ding", 1.0F, 1.0F); lastTickUpdate = true; } } diff --git a/common/mekanism/client/gui/GuiConfiguration.java b/common/mekanism/client/gui/GuiConfiguration.java index 4c6c9dde0..066a615af 100644 --- a/common/mekanism/client/gui/GuiConfiguration.java +++ b/common/mekanism/client/gui/GuiConfiguration.java @@ -208,6 +208,16 @@ public class GuiConfiguration extends GuiMekanism drawCreativeTabHoveringText("None", xAxis, yAxis); } } + + if(xAxis >= 156 && xAxis <= 170 && yAxis >= 6 && yAxis <= 20) + { + drawCreativeTabHoveringText("Auto-eject", xAxis, yAxis); + } + + if(xAxis >= 156 && xAxis <= 170 && yAxis >= 21 && yAxis <= 35) + { + drawCreativeTabHoveringText("Strict Input", xAxis, yAxis); + } } @Override @@ -255,7 +265,7 @@ public class GuiConfiguration extends GuiMekanism if(xAxis >= 80 && xAxis <= 96 && yAxis >= 49 && yAxis <= 65) { - mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F); + mc.sndManager.playSoundFX("mekanism:etc.Ding", 1.0F, 1.0F); PacketHandler.sendPacket(Transmission.SERVER, new PacketConfigurationUpdate().setParams(ConfigurationPacket.EJECT_COLOR, Object3D.get(tile))); } diff --git a/common/mekanism/client/gui/GuiItemStackFilter.java b/common/mekanism/client/gui/GuiItemStackFilter.java index 70ddbdb8f..605112a53 100644 --- a/common/mekanism/client/gui/GuiItemStackFilter.java +++ b/common/mekanism/client/gui/GuiItemStackFilter.java @@ -300,15 +300,22 @@ public class GuiItemStackFilter extends GuiMekanism { ItemStack stack = mc.thePlayer.inventory.getItemStack(); - if(stack != null) + if(stack != null && !Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { filter.itemType = stack.copy(); filter.itemType.stackSize = 1; } + else if(stack == null && Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) + { + filter.itemType = null; + } + + mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F); } if(xAxis >= 12 && xAxis <= 28 && yAxis >= 44 && yAxis <= 60) { + mc.sndManager.playSoundFX("mekanism:etc.Ding", 1.0F, 1.0F); filter.color = TransporterUtils.increment(filter.color); } diff --git a/common/mekanism/client/gui/GuiLogisticalSorter.java b/common/mekanism/client/gui/GuiLogisticalSorter.java index 82a8af3ae..355b84a1b 100644 --- a/common/mekanism/client/gui/GuiLogisticalSorter.java +++ b/common/mekanism/client/gui/GuiLogisticalSorter.java @@ -178,6 +178,7 @@ public class GuiLogisticalSorter extends GuiMekanism data.add(0); PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data)); + mc.sndManager.playSoundFX("mekanism:etc.Ding", 1.0F, 1.0F); } if(xAxis >= 12 && xAxis <= 26 && yAxis >= 110 && yAxis <= 124) @@ -186,6 +187,7 @@ public class GuiLogisticalSorter extends GuiMekanism data.add(1); PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data)); + mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F); } if(xAxis >= 12 && xAxis <= 26 && yAxis >= 84 && yAxis <= 98) @@ -194,6 +196,7 @@ public class GuiLogisticalSorter extends GuiMekanism data.add(2); PacketHandler.sendPacket(Transmission.SERVER, new PacketTileEntity().setParams(Object3D.get(tileEntity), data)); + mc.sndManager.playSoundFX("random.click", 1.0F, 1.0F); } } } @@ -345,6 +348,16 @@ public class GuiLogisticalSorter extends GuiMekanism } } + if(xAxis >= 12 && xAxis <= 26 && yAxis >= 110 && yAxis <= 124) + { + drawCreativeTabHoveringText("Auto-eject", xAxis, yAxis); + } + + if(xAxis >= 12 && xAxis <= 26 && yAxis >= 84 && yAxis <= 98) + { + drawCreativeTabHoveringText("Round robin", xAxis, yAxis); + } + super.drawGuiContainerForegroundLayer(mouseX, mouseY); } diff --git a/common/mekanism/client/gui/GuiOreDictFilter.java b/common/mekanism/client/gui/GuiOreDictFilter.java index 5456b31cf..6e19333d1 100644 --- a/common/mekanism/client/gui/GuiOreDictFilter.java +++ b/common/mekanism/client/gui/GuiOreDictFilter.java @@ -292,6 +292,7 @@ public class GuiOreDictFilter extends GuiMekanism if(xAxis >= 12 && xAxis <= 28 && yAxis >= 44 && yAxis <= 60) { + mc.sndManager.playSoundFX("mekanism:etc.Ding", 1.0F, 1.0F); filter.color = TransporterUtils.increment(filter.color); } diff --git a/resources/assets/mekanism/sound/etc/ChanSwitch.ogg b/resources/assets/mekanism/sound/etc/Ding.ogg similarity index 100% rename from resources/assets/mekanism/sound/etc/ChanSwitch.ogg rename to resources/assets/mekanism/sound/etc/Ding.ogg