mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-15 07:05:51 +01:00
Accept true/false values in English if preferred
This commit is contained in:
parent
2a86b00e97
commit
232b636022
@ -164,7 +164,8 @@ public class OptionsPrompt extends QuestsEditorNumericPrompt {
|
||||
&& input.equalsIgnoreCase(Lang.get("cmdClear")) == false) {
|
||||
try {
|
||||
boolean b = Boolean.parseBoolean(input);
|
||||
if (input.equalsIgnoreCase("t") || input.equalsIgnoreCase(Lang.get("true"))
|
||||
if (input.equalsIgnoreCase("t") || input.equalsIgnoreCase("true")
|
||||
|| input.equalsIgnoreCase(Lang.get("true"))
|
||||
|| input.equalsIgnoreCase(Lang.get("yesWord"))) {
|
||||
b = true;
|
||||
}
|
||||
|
@ -663,9 +663,13 @@ public class RequirementsPrompt extends QuestsEditorNumericPrompt {
|
||||
String[] args = input.split(" ");
|
||||
LinkedList<Boolean> booleans = new LinkedList<Boolean>();
|
||||
for (String s : args) {
|
||||
if (s.equalsIgnoreCase(Lang.get("true")) || s.equalsIgnoreCase(Lang.get("yesWord"))) {
|
||||
if (input.equalsIgnoreCase("t") || input.equalsIgnoreCase("true")
|
||||
|| s.equalsIgnoreCase(Lang.get("true"))
|
||||
|| s.equalsIgnoreCase(Lang.get("yesWord"))) {
|
||||
booleans.add(true);
|
||||
} else if (s.equalsIgnoreCase(Lang.get("false")) || s.equalsIgnoreCase(Lang.get("noWord"))) {
|
||||
} else if (input.equalsIgnoreCase("f") || input.equalsIgnoreCase("false")
|
||||
|| s.equalsIgnoreCase(Lang.get("false"))
|
||||
|| s.equalsIgnoreCase(Lang.get("noWord"))) {
|
||||
booleans.add(false);
|
||||
} else {
|
||||
String text = Lang.get("reqTrueFalseError");
|
||||
|
Loading…
Reference in New Issue
Block a user