Password objectives separable by semicolon, fixes #1823

This commit is contained in:
PikaMug 2021-10-27 05:01:01 -04:00
parent d80b09c64f
commit 5b0ab9c817

View File

@ -1162,12 +1162,11 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
final List<String> displays = (List<String>) context.getSessionData(stagePrefix final List<String> displays = (List<String>) context.getSessionData(stagePrefix
+ CK.S_PASSWORD_DISPLAYS); + CK.S_PASSWORD_DISPLAYS);
if (displays != null) { if (displays != null) {
displays.add(input); displays.addAll(Arrays.asList(input.split(Lang.get("charSemi"))));
} }
context.setSessionData(stagePrefix + CK.S_PASSWORD_DISPLAYS, displays); context.setSessionData(stagePrefix + CK.S_PASSWORD_DISPLAYS, displays);
} else { } else {
final List<String> displays = new LinkedList<>(); final List<String> displays = new LinkedList<>(Arrays.asList(input.split(Lang.get("charSemi"))));
displays.add(input);
context.setSessionData(stagePrefix + CK.S_PASSWORD_DISPLAYS, displays); context.setSessionData(stagePrefix + CK.S_PASSWORD_DISPLAYS, displays);
} }
} }
@ -1211,12 +1210,11 @@ public class StageMainPrompt extends QuestsEditorNumericPrompt {
final List<String> phrases = (List<String>) context.getSessionData(stagePrefix final List<String> phrases = (List<String>) context.getSessionData(stagePrefix
+ CK.S_PASSWORD_PHRASES); + CK.S_PASSWORD_PHRASES);
if (phrases != null) { if (phrases != null) {
phrases.add(input); phrases.addAll(Arrays.asList(input.split(Lang.get("charSemi"))));
} }
context.setSessionData(stagePrefix + CK.S_PASSWORD_PHRASES, phrases); context.setSessionData(stagePrefix + CK.S_PASSWORD_PHRASES, phrases);
} else { } else {
final List<String> phrases = new LinkedList<>(); final List<String> phrases = new LinkedList<>(Arrays.asList(input.split(Lang.get("charSemi"))));
phrases.add(input);
context.setSessionData(stagePrefix + CK.S_PASSWORD_PHRASES, phrases); context.setSessionData(stagePrefix + CK.S_PASSWORD_PHRASES, phrases);
} }
} }