[Content Patcher] don't require dependency for custom tokens protected by HasMod
Pathoschild opened this issue ยท 2 comments
If a content pack only uses custom tokens with an appropriate HasMod
condition, don't require an explicit dependency on the mod that provides them.
The simplest cases are easy to handle with some basic condition preparsing:
"HasMod": "example.id",
"HasMod:example.id": "true"
Handling HasMod
conditions with dynamic tokens is trickier, since validation needs the full token context and may change when the context changes:
"HasMod:{{DynamicToken}}": "{{AnotherDynamicToken}}" // which mod is this?
Even worse, a HasMod
condition can use a mod-provided token. That means whether a HasMod
condition is valid depends on other HasMod
tokens or even itself:
"HasMod": "spacechase0.spaceCore, {{spacecore:json-assets-id}}"