From 417a5fabeac5edee9ef5884830e1a5880e8512b1 Mon Sep 17 00:00:00 2001 From: LMBishop <13875753+LMBishop@users.noreply.github.com> Date: Wed, 6 Jul 2022 21:28:01 +0100 Subject: Add extended description to warning type --- .../leonardobishop/quests/common/config/ConfigProblem.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'common/src/main/java') diff --git a/common/src/main/java/com/leonardobishop/quests/common/config/ConfigProblem.java b/common/src/main/java/com/leonardobishop/quests/common/config/ConfigProblem.java index e2fdc093..f9e9de33 100644 --- a/common/src/main/java/com/leonardobishop/quests/common/config/ConfigProblem.java +++ b/common/src/main/java/com/leonardobishop/quests/common/config/ConfigProblem.java @@ -10,7 +10,7 @@ public final class ConfigProblem { public ConfigProblem(ConfigProblemType type, String description, String extendedDescription, String location) { this.type = type; this.description = description == null ? "?" : description; - this.extendedDescription = extendedDescription == null ? "This error has no extended description" : extendedDescription; + this.extendedDescription = extendedDescription; this.location = location == null ? "?" : location; } @@ -36,17 +36,19 @@ public final class ConfigProblem { public enum ConfigProblemType { - ERROR("Error", "E", 1), - WARNING("Warning", "W", 2); + ERROR("Error", "E", 1, "An error prevents a quest from being loaded"), + WARNING("Warning", "W", 2, "A warning indicates a quest may not work as expected"); private final String title; private final String shortened; private final int priority; + private final String description; - ConfigProblemType(String title, String shortened, int priority) { + ConfigProblemType(String title, String shortened, int priority, String description) { this.title = title; this.shortened = shortened; this.priority = priority; + this.description = description; } public String getTitle() { @@ -61,5 +63,8 @@ public final class ConfigProblem { return priority; } + public String getDescription() { + return description; + } } } \ No newline at end of file -- cgit v1.2.3-70-g09d2