Skip to content

Commit ad2c650

Browse files
committed
🐛 Remove duplicate optfeatures; resolves #744
1 parent ffa7074 commit ad2c650

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/dev/ebullient/convert/tools/dnd5e/Json2QuteOptionalFeatureType.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ protected Tools5eQuteNote buildQuteNote() {
3131
List<String> featureKeys = oft.features;
3232
List<JsonNode> nodes = featureKeys.stream()
3333
.map(index::getAliasOrDefault)
34+
.distinct()
3435
.map(index::getNode)
3536
.filter(x -> x != null)
3637
.sorted(Comparator.comparing(SourceField.name::getTextOrEmpty))
@@ -45,8 +46,8 @@ protected Tools5eQuteNote buildQuteNote() {
4546
List<String> text = new ArrayList<>();
4647

4748
for (JsonNode entry : nodes) {
48-
Tools5eIndexType type = Tools5eIndexType.getTypeFromNode(entry);
49-
text.add("- " + type.linkify(index, entry));
49+
Tools5eSources sources = Tools5eSources.findSources(entry);
50+
text.add("- " + linkifier().link(sources));
5051
}
5152
if (text.isEmpty()) {
5253
return null;

0 commit comments

Comments
 (0)