Remove unneeded explanation, change behaviour of quantity slots a bit
This commit is contained in:
@@ -57,7 +57,29 @@ public abstract class ContainerBase extends Container {
|
||||
|
||||
if (slot instanceof SlotSpecimen) {
|
||||
if (((SlotSpecimen) slot).isSizeAllowed()) {
|
||||
if (player.inventory.getItemStack() != null) {
|
||||
if (slot.getStack() != null) {
|
||||
if (GuiScreen.isShiftKeyDown()) {
|
||||
slot.putStack(null);
|
||||
} else {
|
||||
int amount = slot.getStack().stackSize;
|
||||
|
||||
if (clickedButton == 0) {
|
||||
amount--;
|
||||
|
||||
if (amount < 1) {
|
||||
amount = 1;
|
||||
}
|
||||
} else if (clickedButton == 1) {
|
||||
amount++;
|
||||
|
||||
if (amount > 64) {
|
||||
amount = 64;
|
||||
}
|
||||
}
|
||||
|
||||
slot.getStack().stackSize = amount;
|
||||
}
|
||||
} else if (player.inventory.getItemStack() != null) {
|
||||
int amount = player.inventory.getItemStack().stackSize;
|
||||
|
||||
if (clickedButton == 1) {
|
||||
@@ -68,28 +90,6 @@ public abstract class ContainerBase extends Container {
|
||||
toPut.stackSize = amount;
|
||||
|
||||
slot.putStack(toPut);
|
||||
} else if (slot.getStack() != null) {
|
||||
if (GuiScreen.isShiftKeyDown()) {
|
||||
slot.putStack(null);
|
||||
} else {
|
||||
int amount = slot.getStack().stackSize;
|
||||
|
||||
if (clickedButton == 0) {
|
||||
amount++;
|
||||
|
||||
if (amount > 64) {
|
||||
amount = 64;
|
||||
}
|
||||
} else if (clickedButton == 1) {
|
||||
amount--;
|
||||
|
||||
if (amount < 1) {
|
||||
amount = 1;
|
||||
}
|
||||
}
|
||||
|
||||
slot.getStack().stackSize = amount;
|
||||
}
|
||||
}
|
||||
} else if (player.inventory.getItemStack() == null) {
|
||||
slot.putStack(null);
|
||||
|
||||
@@ -49,8 +49,8 @@ public class ContainerGrid extends ContainerBase {
|
||||
// I'm overriding detectAndSendChanges() here because the default check
|
||||
// checks if the item stacks are equal, and if so, then it will only send the new slot contents.
|
||||
// The thing is though, when the grid replaces the slots with new items from the storage
|
||||
// system, the item stack replaced WILL be the same!
|
||||
// That's why we override this here to get rid of the check and ALWAYS send slot changes.
|
||||
// system, the item stack replaced WILL be the same and thus changes will not be sent!
|
||||
// That is why we override here to get rid of the check and ALWAYS send slot changes.
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
for (int i = 0; i < this.inventorySlots.size(); ++i) {
|
||||
|
||||
@@ -248,7 +248,7 @@ public class GuiGrid extends GuiBase {
|
||||
if (grid.isConnected()) {
|
||||
TileController controller = grid.getController();
|
||||
|
||||
if (isHoveringOverSlot() && container.getPlayer().inventory.getItemStack() != null) {
|
||||
if (isHoveringOverSlot() && container.getPlayer().inventory.getItemStack() != null && (clickedButton == 0 || clickedButton == 1)) {
|
||||
RefinedStorage.NETWORK.sendToServer(new MessageStoragePush(controller.getPos().getX(), controller.getPos().getY(), controller.getPos().getZ(), -1, clickedButton == 1));
|
||||
} else if (isHoveringOverItemInSlot() && container.getPlayer().inventory.getItemStack() == null) {
|
||||
boolean half = clickedButton == 1;
|
||||
|
||||
@@ -39,13 +39,5 @@ public class GuiInterface extends GuiBase {
|
||||
drawString(7, 7, t("gui.refinedstorage:interface.import"));
|
||||
drawString(7, 42, t("gui.refinedstorage:interface.export"));
|
||||
drawString(7, 123, t("container.inventory"));
|
||||
|
||||
if (inBounds(162, 42, 7, 7, mouseX, mouseY)) {
|
||||
String message = t("gui.refinedstorage:interface.export.explanation.0");
|
||||
message += "\n" + t("gui.refinedstorage:interface.export.explanation.1");
|
||||
message += "\n" + t("gui.refinedstorage:interface.export.explanation.2");
|
||||
|
||||
drawTooltip(mouseX, mouseY, message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,9 +17,6 @@ gui.refinedstorage:constructor=Constructor
|
||||
gui.refinedstorage:relay=Relay
|
||||
gui.refinedstorage:interface.import=Interface Import
|
||||
gui.refinedstorage:interface.export=Interface Export
|
||||
gui.refinedstorage:interface.export.explanation.0=Top slots: items you want exported
|
||||
gui.refinedstorage:interface.export.explanation.1=Clear a slot: mouse click + SHIFT
|
||||
gui.refinedstorage:interface.export.explanation.2=Incr. or decr. a slot: left/ right mouse click
|
||||
|
||||
misc.refinedstorage:energy_stored=%d / %d RF
|
||||
misc.refinedstorage:energy_usage=Usage: %d RF/t
|
||||
|
||||
@@ -17,9 +17,6 @@ gui.refinedstorage:constructor=Constructor
|
||||
gui.refinedstorage:relay=Relais
|
||||
gui.refinedstorage:interface.import=Interface Import
|
||||
gui.refinedstorage:interface.export=Interface Export
|
||||
gui.refinedstorage:interface.export.explanation.0=Bovenste slots: items die je wilt exporten
|
||||
gui.refinedstorage:interface.export.explanation.1=Slot leegmaken: muisklik + SHIFT
|
||||
gui.refinedstorage:interface.export.explanation.2=Verhoog of verklein aantal: links/ rechts muisklik
|
||||
|
||||
misc.refinedstorage:energy_stored=%d / %d RF
|
||||
misc.refinedstorage:energy_usage=Vebruik: %d RF/t
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.8 KiB |
Reference in New Issue
Block a user