[ContentPatcher] Support includes for dynamic tokens#1172
Open
Mushymato wants to merge 1 commit into
Open
Conversation
15de6a1 to
a651a2f
Compare
1cbe06a to
045b5f7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a way to include dynamic tokens from another file like so:
The file
dt_include/standard.jsonis only allowed to haveDynamicTokenssection, and dynamic tokens defined inside will behaves as if they were defined at the position of the include incontent.json. You can have nested includes, but not repeated include of same file (at the moment).Whenis supported for dynamic token includes, and tokens within a include is only evaluated if the include's conditions are all true.If the
Whensection on an include contains aHasModcondition that will never be true (i.e. mod not installed), the tokens inside will not be added.In this example, if the dynamic token
"MyTok"is defined withindt_include/cmct.jsonand nowhere else, it will be valid only ifSpiderbuttons.CMCTis installed and invalid otherwise.On the other hand if
MyTokis defined like this in content.json, it will only be unready ifSpiderbuttons.CMCTis not installed, rather than invalid.Examples
DT_Includes.zip