Event Editor cleanup. Bump version number

This commit is contained in:
PikaMug 2019-04-06 12:12:32 -04:00
parent cc48563c03
commit a5a9c7fedd
4 changed files with 12 additions and 14 deletions

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>me.blackvein.quests</groupId> <groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId> <artifactId>quests-parent</artifactId>
<version>3.6.5</version> <version>3.6.6</version>
</parent> </parent>
<artifactId>quests-main</artifactId> <artifactId>quests-main</artifactId>

View File

@ -403,17 +403,17 @@ public class EventFactory implements ConversationAbandonedListener {
@Override @Override
public String getPromptText(ConversationContext context) { public String getPromptText(ConversationContext context) {
String text = ChatColor.RED + Lang.get("eventEditorDeletePrompt") + "(" + ChatColor.GOLD + (String) context.getSessionData(CK.ED_EVENT_DELETE) + ChatColor.RED + ")"; String text = ChatColor.RED + Lang.get("eventEditorDeletePrompt") + " (" + ChatColor.GOLD + (String) context.getSessionData(CK.ED_EVENT_DELETE) + ChatColor.RED + ")";
text += ChatColor.YELLOW + Lang.get("yesWord") + "/" + Lang.get("noWord"); text += ChatColor.YELLOW + Lang.get("yesWord") + "/" + Lang.get("noWord");
return text; return text;
} }
@Override @Override
public Prompt acceptInput(ConversationContext context, String input) { public Prompt acceptInput(ConversationContext context, String input) {
if (input.equalsIgnoreCase(Lang.get("yesWord"))) { if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yesWord"))) {
deleteEvent(context); deleteEvent(context);
return new MenuPrompt(); return new MenuPrompt();
} else if (input.equalsIgnoreCase(Lang.get("noWord"))) { } else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase(Lang.get("noWord"))) {
return new MenuPrompt(); return new MenuPrompt();
} else { } else {
return new DeletePrompt(); return new DeletePrompt();
@ -658,10 +658,10 @@ public class EventFactory implements ConversationAbandonedListener {
@Override @Override
public Prompt acceptInput(ConversationContext context, String input) { public Prompt acceptInput(ConversationContext context, String input) {
if (input.equalsIgnoreCase(Lang.get("yesWord"))) { if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yesWord"))) {
clearData(context); clearData(context);
return new MenuPrompt(); return new MenuPrompt();
} else if (input.equalsIgnoreCase(Lang.get("noWord"))) { } else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase(Lang.get("noWord"))) {
return new CreateMenuPrompt(); return new CreateMenuPrompt();
} else { } else {
((Player) context.getForWhom()).sendMessage(ChatColor.RED + Lang.get("invalidOption")); ((Player) context.getForWhom()).sendMessage(ChatColor.RED + Lang.get("invalidOption"));
@ -693,7 +693,7 @@ public class EventFactory implements ConversationAbandonedListener {
@Override @Override
public String getPromptText(ConversationContext context) { public String getPromptText(ConversationContext context) {
String text = ChatColor.RED + Lang.get("eventEditorFinishAndSave") + "(" + ChatColor.GOLD + (String) context.getSessionData(CK.E_NAME) + ChatColor.RED + ")"; String text = ChatColor.YELLOW + Lang.get("questEditorSave") + " \"" + ChatColor.AQUA + context.getSessionData(CK.E_NAME) + ChatColor.YELLOW + "\"?\n";
if (modified.isEmpty() == false) { if (modified.isEmpty() == false) {
text += ChatColor.RED + Lang.get("eventEditorModifiedNote") + "\n"; text += ChatColor.RED + Lang.get("eventEditorModifiedNote") + "\n";
for (String s : modified) { for (String s : modified) {
@ -701,16 +701,15 @@ public class EventFactory implements ConversationAbandonedListener {
} }
text += ChatColor.RED + Lang.get("eventEditorForcedToQuit") + "\n"; text += ChatColor.RED + Lang.get("eventEditorForcedToQuit") + "\n";
} }
text += ChatColor.YELLOW + Lang.get("yesWord") + "/" + Lang.get("noWord"); return text + ChatColor.GREEN + "1 - " + Lang.get("yesWord") + "\n" + "2 - " + Lang.get("noWord");
return text;
} }
@Override @Override
public Prompt acceptInput(ConversationContext context, String input) { public Prompt acceptInput(ConversationContext context, String input) {
if (input.equalsIgnoreCase(Lang.get("yesWord"))) { if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yesWord"))) {
saveEvent(context); saveEvent(context);
return new MenuPrompt(); return new MenuPrompt();
} else if (input.equalsIgnoreCase(Lang.get("noWord"))) { } else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase(Lang.get("noWord"))) {
return new CreateMenuPrompt(); return new CreateMenuPrompt();
} else { } else {
((Player) context.getForWhom()).sendMessage(ChatColor.RED + Lang.get("invalidOption")); ((Player) context.getForWhom()).sendMessage(ChatColor.RED + Lang.get("invalidOption"));

View File

@ -1780,10 +1780,10 @@ public class QuestFactory implements ConversationAbandonedListener {
@Override @Override
public Prompt acceptInput(ConversationContext context, String input) { public Prompt acceptInput(ConversationContext context, String input) {
if (input.equalsIgnoreCase(Lang.get("yesWord"))) { if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yesWord"))) {
deleteQuest(context); deleteQuest(context);
return Prompt.END_OF_CONVERSATION; return Prompt.END_OF_CONVERSATION;
} else if (input.equalsIgnoreCase(Lang.get("noWord"))) { } else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase(Lang.get("noWord"))) {
return new MenuPrompt(); return new MenuPrompt();
} else { } else {
return new DeletePrompt(); return new DeletePrompt();

View File

@ -320,7 +320,6 @@ eventEditorSaved: "Event saved, Quests and Events reloaded."
eventEditorEnterEventName: "Enter an Event name, <cancel>" eventEditorEnterEventName: "Enter an Event name, <cancel>"
eventEditorDeletePrompt: "Are you sure you want to delete the Event?" eventEditorDeletePrompt: "Are you sure you want to delete the Event?"
eventEditorQuitWithoutSaving: "Are you sure you want to quit without saving?" eventEditorQuitWithoutSaving: "Are you sure you want to quit without saving?"
eventEditorFinishAndSave: "Are you sure you want to finish and save the Event?"
eventEditorModifiedNote: 'Note: You have modified an Event that the following Quests use:' eventEditorModifiedNote: 'Note: You have modified an Event that the following Quests use:'
eventEditorForcedToQuit: "If you save the Event, anyone who is actively doing any of these Quests will be forced to quit them." eventEditorForcedToQuit: "If you save the Event, anyone who is actively doing any of these Quests will be forced to quit them."
eventEditorEventInUse: "The following Quests use the Event" eventEditorEventInUse: "The following Quests use the Event"