From b7cc231d8943e7391482d4f2380f6fbcdbb422d3 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 15 Nov 2023 18:54:27 +0100 Subject: [PATCH] add notes export --- megamek/src/megamek/utilities/MechCacheCSVTool.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/megamek/src/megamek/utilities/MechCacheCSVTool.java b/megamek/src/megamek/utilities/MechCacheCSVTool.java index e01ef0c9ff..fee5662360 100644 --- a/megamek/src/megamek/utilities/MechCacheCSVTool.java +++ b/megamek/src/megamek/utilities/MechCacheCSVTool.java @@ -22,6 +22,9 @@ import java.util.ArrayList; import java.util.List; import java.util.Vector; + +import megamek.codeUtilities.ObjectUtility; +import megamek.codeUtilities.StringUtility; import megamek.common.*; import megamek.common.annotations.Nullable; import megamek.common.templates.TROView; @@ -219,7 +222,13 @@ public static void main(String... args) { csvLine.append(entity.getFluff().getOverview().isBlank() ? "no" : "yes").append(DELIM); csvLine.append(entity.getFluff().getDeployment().isBlank() ? "no" : "yes").append(DELIM); csvLine.append(entity.getFluff().getHistory().isBlank() ? "no" : "yes").append(DELIM); - csvLine.append(entity.getFluff().getNotes().isBlank() ? "no" : "yes").append(DELIM); + + String notes = entity.getFluff().getNotes(); + if (!StringUtility.isNullOrBlank(notes)) { + csvLine.append(notes); + } else { + csvLine.append("--"); + } } csvLine.append("\n");