Skip to content

Commit

Permalink
Small tweaks to combined items text
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulvdberge committed Aug 9, 2016
1 parent c3690f7 commit 4bbaf4e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/main/java/refinedstorage/item/ItemGridFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void addInformation(ItemStack stack, EntityPlayer player, List<String> to

ItemHandlerGridFilter items = new ItemHandlerGridFilter(stack);

ItemPattern.combineItems(tooltip, items.getFilteredItems());
ItemPattern.combineItems(tooltip, false, items.getFilteredItems());
}

public static int getCompare(ItemStack stack) {
Expand Down
10 changes: 4 additions & 6 deletions src/main/java/refinedstorage/item/ItemPattern.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ public void addInformation(ItemStack pattern, EntityPlayer player, List<String>
if (GuiScreen.isShiftKeyDown() || isProcessing(pattern)) {
tooltip.add(TextFormatting.YELLOW + I18n.format("misc.refinedstorage:pattern.inputs") + TextFormatting.RESET);

combineItems(tooltip, getInputs(pattern));
combineItems(tooltip, true, getInputs(pattern));

tooltip.add(TextFormatting.YELLOW + I18n.format("misc.refinedstorage:pattern.outputs") + TextFormatting.RESET);
}

combineItems(tooltip, getOutputs(pattern));
combineItems(tooltip, true, getOutputs(pattern));
}
}

public static void combineItems(List<String> tooltip, ItemStack... stacks) {
public static void combineItems(List<String> tooltip, boolean displayAmount, ItemStack... stacks) {
Set<Integer> combinedIndices = new HashSet<>();

for (int i = 0; i < stacks.length; ++i) {
Expand All @@ -61,9 +61,7 @@ public static void combineItems(List<String> tooltip, ItemStack... stacks) {
}
}

if (amount != 1) {
data += " (" + amount + "x)";
}
data = (displayAmount ? (TextFormatting.WHITE + String.valueOf(amount) + " ") : "") + TextFormatting.GRAY + data;

tooltip.add(data);
}
Expand Down

This file was deleted.

0 comments on commit 4bbaf4e

Please sign in to comment.