Added an option to toggle oredict subsitutions for patterns.

It adds a backward compatibility to convert current patterns to use
oredict by default, which should be removed with rv4 stable.

Closes #1156
This commit is contained in:
yueh
2015-09-22 00:24:40 +02:00
parent 888b3e5600
commit 1e7126f98e
13 changed files with 249 additions and 86 deletions
@@ -164,6 +164,7 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
}
final boolean isCrafting = details.isCraftable();
final boolean substitute = details.canSubstitute();
final IAEItemStack[] in = details.getCondensedInputs();
final IAEItemStack[] out = details.getCondensedOutputs();
@@ -195,6 +196,11 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
lines.add( ( first ? with : and ) + anIn.getStackSize() + ' ' + Platform.getItemDisplayName( anIn ) );
first = false;
}
final String substitutionLabel = GuiText.Substitute.getLocal() + " ";
final String canSubstitute = substitute ? GuiText.Yes.getLocal() : GuiText.No.getLocal();
lines.add( substitutionLabel + canSubstitute );
}
@Override