Skip to content

Commit

Permalink
Add unmerged resources to 'remainings'
Browse files Browse the repository at this point in the history
  • Loading branch information
portlek committed Jul 12, 2024
1 parent 8903cf9 commit 2e779d1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public Collection<FileResource> merge(final Collection<FileResource> resources)

final MultiMap<Key, Atlas> atlases = new MultiMap<>();
final MultiMap<Key, Model> models = new MultiMap<>();
final HashSet<FileResource> remainings = new HashSet<>();
for (final FileResource resource : simplified) {
if (resource instanceof FileResourceAtlas) {
final Atlas atlas = ((FileResourceAtlas) resource).atlas;
Expand All @@ -32,6 +33,9 @@ public Collection<FileResource> merge(final Collection<FileResource> resources)
models.put(model.key(), model);
}
// TODO: portlek, Merge more things.
else {
remainings.add(resource);
}
}

final Collection<Atlas> mergedAtlases = new HashSet<>(atlases.keys().size());
Expand Down Expand Up @@ -81,6 +85,7 @@ public Collection<FileResource> merge(final Collection<FileResource> resources)
mergedResources.addAll(
mergedModels.stream().map(FileResources::model).collect(Collectors.toSet())
);
mergedResources.addAll(remainings);
return mergedResources;
}

Expand Down

0 comments on commit 2e779d1

Please sign in to comment.