Cleanup requirements and objectives prompts

This commit is contained in:
PikaMug 2019-07-20 23:24:30 -04:00
parent 17c6fe2cab
commit e6ab635d60
3 changed files with 15 additions and 18 deletions

View File

@ -1277,7 +1277,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
public String getPromptText(ConversationContext context) {
String text = ChatColor.LIGHT_PURPLE + "- " + Lang.get("stageEditorCustom") + " -\n";
if (plugin.getCustomObjectives().isEmpty()) {
text += ChatColor.BOLD + "" + ChatColor.DARK_PURPLE + "(" + Lang.get("stageEditorNoModules") + ") ";
text += ChatColor.DARK_PURPLE + "(" + Lang.get("stageEditorNoModules") + ") ";
} else {
for (CustomObjective co : plugin.getCustomObjectives()) {
text += ChatColor.DARK_PURPLE + " - " + co.getName() + "\n";
@ -1415,7 +1415,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
@SuppressWarnings("unchecked")
@Override
public String getPromptText(ConversationContext context) {
String text = ChatColor.BOLD + "" + ChatColor.AQUA + "- ";
String text = ChatColor.AQUA + "- ";
LinkedList<String> list = (LinkedList<String>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES);
LinkedList<Entry<String, Object>> datamapList = (LinkedList<Entry<String, Object>>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA);
String objName = list.getLast();
@ -1434,7 +1434,7 @@ public class CreateStagePrompt extends FixedSetPrompt {
for (Entry<String, Object> datamap : found.getData()) {
for (Entry<String, Object> currentData : datamapList) {
if (currentData.getKey().equals(datamap.getKey())) {
text += ChatColor.BOLD + "" + ChatColor.DARK_BLUE + index + " - " + ChatColor.RESET + ChatColor.BLUE + datamap.getKey();
text += ChatColor.BLUE + "" + ChatColor.BOLD + index + ChatColor.RESET + ChatColor.YELLOW + " - " + datamap.getKey();
if (currentData.getValue() != null) {
text += ChatColor.GREEN + " (" + currentData.getValue().toString() + ")\n";
} else {
@ -1444,16 +1444,13 @@ public class CreateStagePrompt extends FixedSetPrompt {
}
}
}
text += ChatColor.BOLD + "" + ChatColor.DARK_BLUE + index + " - " + ChatColor.AQUA + Lang.get("done");
text += ChatColor.GREEN + "" + ChatColor.BOLD + index + ChatColor.YELLOW + " - " + Lang.get("done");
return text;
}
@Override
public Prompt acceptInput(ConversationContext context, String input) {
@SuppressWarnings("unchecked")
//LinkedList<Entry<String, Object>> datamapList = (LinkedList<Entry<String, Object>>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES_DATA);
LinkedList<String> list = (LinkedList<String>) context.getSessionData(pref + CK.S_CUSTOM_OBJECTIVES);
String objName = list.getLast();
CustomObjective found = null;

View File

@ -477,7 +477,7 @@ public class RequirementsPrompt extends FixedSetPrompt {
public String getPromptText(ConversationContext context) {
String text = ChatColor.LIGHT_PURPLE + Lang.get("customRequirementsTitle") + "\n";
if (plugin.getCustomRequirements().isEmpty()) {
text += ChatColor.BOLD + "" + ChatColor.DARK_PURPLE + "(" + Lang.get("stageEditorNoModules") + ") ";
text += ChatColor.DARK_PURPLE + "(" + Lang.get("stageEditorNoModules") + ") ";
} else {
for (CustomRequirement cr : plugin.getCustomRequirements()) {
text += ChatColor.DARK_PURPLE + " - " + cr.getName() + "\n";
@ -556,7 +556,7 @@ public class RequirementsPrompt extends FixedSetPrompt {
@SuppressWarnings("unchecked")
@Override
public String getPromptText(ConversationContext context) {
String text = ChatColor.BOLD + "" + ChatColor.AQUA + "- ";
String text = ChatColor.AQUA + "- ";
LinkedList<String> list = (LinkedList<String>) context.getSessionData(CK.REQ_CUSTOM);
LinkedList<Map<String, Object>> datamapList = (LinkedList<Map<String, Object>>) context.getSessionData(CK.REQ_CUSTOM_DATA);
String reqName = list.getLast();
@ -569,7 +569,7 @@ public class RequirementsPrompt extends FixedSetPrompt {
}
Collections.sort(datamapKeys);
for (String dataKey : datamapKeys) {
text += ChatColor.BOLD + "" + ChatColor.DARK_BLUE + index + " - " + ChatColor.RESET + ChatColor.BLUE + dataKey;
text += ChatColor.BLUE + "" + ChatColor.BOLD + index + ChatColor.RESET + ChatColor.YELLOW + " - " + dataKey;
if (datamap.get(dataKey) != null) {
text += ChatColor.GREEN + " (" + datamap.get(dataKey).toString() + ")\n";
} else {
@ -577,7 +577,7 @@ public class RequirementsPrompt extends FixedSetPrompt {
}
index++;
}
text += ChatColor.BOLD + "" + ChatColor.DARK_BLUE + index + " - " + ChatColor.AQUA + Lang.get("done");
text += ChatColor.GREEN + "" + ChatColor.BOLD + index + ChatColor.YELLOW + " - " + Lang.get("done");
return text;
}

View File

@ -848,7 +848,7 @@ public class RewardsPrompt extends FixedSetPrompt {
public String getPromptText(ConversationContext context) {
String text = ChatColor.LIGHT_PURPLE + Lang.get("customRewardsTitle") + "\n";
if (plugin.getCustomRewards().isEmpty()) {
text += ChatColor.BOLD + "" + ChatColor.DARK_PURPLE + "(" + Lang.get("stageEditorNoModules") + ") ";
text += ChatColor.DARK_PURPLE + "(" + Lang.get("stageEditorNoModules") + ") ";
} else {
for (CustomReward cr : plugin.getCustomRewards()) {
text += ChatColor.DARK_PURPLE + " - " + cr.getName() + "\n";
@ -927,7 +927,7 @@ public class RewardsPrompt extends FixedSetPrompt {
@SuppressWarnings("unchecked")
@Override
public String getPromptText(ConversationContext context) {
String text = ChatColor.BOLD + "" + ChatColor.AQUA + "- ";
String text = ChatColor.AQUA + "- ";
LinkedList<String> list = (LinkedList<String>) context.getSessionData(CK.REW_CUSTOM);
LinkedList<Map<String, Object>> datamapList = (LinkedList<Map<String, Object>>) context.getSessionData(CK.REW_CUSTOM_DATA);
String rewName = list.getLast();
@ -940,7 +940,7 @@ public class RewardsPrompt extends FixedSetPrompt {
}
Collections.sort(datamapKeys);
for (String dataKey : datamapKeys) {
text += ChatColor.BOLD + "" + ChatColor.DARK_BLUE + index + " - " + ChatColor.RESET + ChatColor.BLUE + dataKey;
text += ChatColor.BLUE + "" + ChatColor.BOLD + index + ChatColor.RESET + ChatColor.YELLOW + " - " + dataKey;
if (datamap.get(dataKey) != null) {
text += ChatColor.GREEN + " (" + datamap.get(dataKey).toString() + ")\n";
} else {
@ -948,7 +948,7 @@ public class RewardsPrompt extends FixedSetPrompt {
}
index++;
}
text += ChatColor.BOLD + "" + ChatColor.DARK_BLUE + index + " - " + ChatColor.AQUA + Lang.get("done");
text += ChatColor.GREEN + "" + ChatColor.BOLD + index + ChatColor.YELLOW + " - " + Lang.get("done");
return text;
}