Skip to content

Commit

Permalink
♻️ Use target as the source for dynamic text
Browse files Browse the repository at this point in the history
This is a very minor change to make it easier to pull the mod
application out into another function. I've done it a separate commit to
make it easier to see and because the comment just above this line makes
me a little leery that it's intentional that this takes copyTo instead
of target - but looking at the code I can't see any reason that would
actually make a difference.
  • Loading branch information
miscoined authored and ebullient committed Jul 8, 2024
1 parent e3f1371 commit 9a8adca
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ protected JsonNode mergeNodes(Tools5eIndexType type, String originKey, JsonNode
// pre-convert any dynamic text
JsonNode copyMetaMod = MetaFields._mod.getFrom(_copy);
for (Entry<String, JsonNode> entry : iterableFields(copyMetaMod)) {
// use the copyTo value as the attribute source for resolving dynamic text
entry.setValue(resolveDynamicText(originKey, entry.getValue(), copyTo));
// use the target value as the attribute source for resolving dynamic text
entry.setValue(resolveDynamicText(originKey, entry.getValue(), target));
}

// Now iterate and apply mod rules
Expand Down

0 comments on commit 9a8adca

Please sign in to comment.