This commit is contained in:
Jesse Boyd 2017-05-26 17:54:07 +10:00
parent 31d43b27d8
commit bb92a64be3
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
4 changed files with 47 additions and 49 deletions

View File

@ -351,7 +351,7 @@ public class MainUtil {
return new FaweInputStream(is);
}
boolean legacy;
if (mode > 10) {
if (mode >= 10) {
legacy = false;
mode = -mode + 10;
} else {

View File

@ -71,7 +71,7 @@ public class DefaultMaskParser extends FaweParser<Mask> {
Mask mask = null;
if (command.isEmpty()) {
mask = parseFromInput(StringMan.join(entry.getValue(), ','), context);
} if (dispatcher.get(command) == null) {
} else if (dispatcher.get(command) == null) {
// Legacy patterns
char char0 = command.charAt(0);
boolean charMask = input.length() > 1 && input.charAt(1) != '[';

View File

@ -68,7 +68,7 @@ public class DefaultTransformParser extends FaweParser<ResettableExtent> {
double chance = 1;
if (command.isEmpty()) {
transform = parseFromInput(StringMan.join(entry.getValue(), ','), context);
} if (dispatcher.get(command) == null) {
} else if (dispatcher.get(command) == null) {
// Legacy syntax
int percentIndex = command.indexOf('%');
if (percentIndex != -1) { // Legacy percent pattern

View File

@ -62,8 +62,7 @@ public class HashTagPatternParser extends FaweParser<Pattern> {
double chance = 1;
if (command.isEmpty()) {
pattern = parseFromInput(StringMan.join(entry.getValue(), ','), context);
} else {
if (dispatcher.get(command) == null) {
} else if (dispatcher.get(command) == null) {
// Legacy patterns
char char0 = command.charAt(0);
boolean charMask = input.length() > 1 && input.charAt(1) != '[';
@ -109,7 +108,6 @@ public class HashTagPatternParser extends FaweParser<Pattern> {
}
pattern = (Pattern) dispatcher.call(command, locals, new String[0]);
}
}
patterns.add(pattern);
chances.add(chance);
}