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>
<groupId>me.blackvein.quests</groupId>
<artifactId>quests-parent</artifactId>
<version>3.6.5</version>
<version>3.6.6</version>
</parent>
<artifactId>quests-main</artifactId>

View File

@ -410,10 +410,10 @@ public class EventFactory implements ConversationAbandonedListener {
@Override
public Prompt acceptInput(ConversationContext context, String input) {
if (input.equalsIgnoreCase(Lang.get("yesWord"))) {
if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yesWord"))) {
deleteEvent(context);
return new MenuPrompt();
} else if (input.equalsIgnoreCase(Lang.get("noWord"))) {
} else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase(Lang.get("noWord"))) {
return new MenuPrompt();
} else {
return new DeletePrompt();
@ -658,10 +658,10 @@ public class EventFactory implements ConversationAbandonedListener {
@Override
public Prompt acceptInput(ConversationContext context, String input) {
if (input.equalsIgnoreCase(Lang.get("yesWord"))) {
if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yesWord"))) {
clearData(context);
return new MenuPrompt();
} else if (input.equalsIgnoreCase(Lang.get("noWord"))) {
} else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase(Lang.get("noWord"))) {
return new CreateMenuPrompt();
} else {
((Player) context.getForWhom()).sendMessage(ChatColor.RED + Lang.get("invalidOption"));
@ -693,7 +693,7 @@ public class EventFactory implements ConversationAbandonedListener {
@Override
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) {
text += ChatColor.RED + Lang.get("eventEditorModifiedNote") + "\n";
for (String s : modified) {
@ -701,16 +701,15 @@ public class EventFactory implements ConversationAbandonedListener {
}
text += ChatColor.RED + Lang.get("eventEditorForcedToQuit") + "\n";
}
text += ChatColor.YELLOW + Lang.get("yesWord") + "/" + Lang.get("noWord");
return text;
return text + ChatColor.GREEN + "1 - " + Lang.get("yesWord") + "\n" + "2 - " + Lang.get("noWord");
}
@Override
public Prompt acceptInput(ConversationContext context, String input) {
if (input.equalsIgnoreCase(Lang.get("yesWord"))) {
if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yesWord"))) {
saveEvent(context);
return new MenuPrompt();
} else if (input.equalsIgnoreCase(Lang.get("noWord"))) {
} else if (input.equalsIgnoreCase("2") || input.equalsIgnoreCase(Lang.get("noWord"))) {
return new CreateMenuPrompt();
} else {
((Player) context.getForWhom()).sendMessage(ChatColor.RED + Lang.get("invalidOption"));

View File

@ -1780,10 +1780,10 @@ public class QuestFactory implements ConversationAbandonedListener {
@Override
public Prompt acceptInput(ConversationContext context, String input) {
if (input.equalsIgnoreCase(Lang.get("yesWord"))) {
if (input.equalsIgnoreCase("1") || input.equalsIgnoreCase(Lang.get("yesWord"))) {
deleteQuest(context);
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();
} else {
return new DeletePrompt();

View File

@ -320,7 +320,6 @@ eventEditorSaved: "Event saved, Quests and Events reloaded."
eventEditorEnterEventName: "Enter an Event name, <cancel>"
eventEditorDeletePrompt: "Are you sure you want to delete the Event?"
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:'
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"