Fixes a bug caused by "-" being consumed
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good
This commit is contained in:
@@ -88,16 +88,21 @@ public enum SmithPreset {
|
||||
*/
|
||||
public static String replacePreset(String possiblePreset) {
|
||||
boolean negated = false;
|
||||
if (possiblePreset.startsWith("-")) {
|
||||
negated = true;
|
||||
possiblePreset = possiblePreset.substring(1);
|
||||
}
|
||||
|
||||
String upperCasedPreset = possiblePreset.replace('-', '_').toUpperCase();
|
||||
if (!upperCasedPreset.startsWith("PRESET:")) {
|
||||
if (possiblePreset.startsWith("-")) {
|
||||
negated = true;
|
||||
}
|
||||
|
||||
if ((negated && !upperCasedPreset.startsWith("_PRESET:")) && !upperCasedPreset.startsWith("PRESET:")) {
|
||||
return possiblePreset;
|
||||
}
|
||||
|
||||
//Strip the "-" here to prevent stripping for material names
|
||||
if (negated) {
|
||||
upperCasedPreset = upperCasedPreset.substring(1);
|
||||
}
|
||||
|
||||
//Parse the input
|
||||
SmithPresetFilter filter = null;
|
||||
SmithPreset preset;
|
||||
|
||||
Reference in New Issue
Block a user