Skip to content

Commit

Permalink
🐛 🎨 padding around spellcasting header/footer entries
Browse files Browse the repository at this point in the history
  • Loading branch information
ebullient committed Oct 17, 2023
1 parent e5cf6ae commit 71ddc24
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,11 @@ public String toString() {

/** Formatted description: renders all attributes (other than name) */
public String getDesc() {
List<String> text = new ArrayList<>(headerEntries);
List<String> text = new ArrayList<>();
if (!headerEntries.isEmpty()) {
text.addAll(headerEntries);
text.add("");
}

appendList(text, "At will", will);
if (daily != null && !daily.isEmpty()) {
Expand All @@ -378,8 +382,10 @@ public String getDesc() {
if (spells != null && !spells.isEmpty()) {
spells.forEach((k, v) -> appendList(text, spellToTitle(k, v), v.spells));
}

text.addAll(footerEntries);
if (!footerEntries.isEmpty()) {
text.add("");
text.addAll(footerEntries);
}
return String.join("\n", text);
}

Expand Down

0 comments on commit 71ddc24

Please sign in to comment.