[Content Patcher] add TargetName token
Pathoschild opened this issue ยท 1 comments
Add a {{TargetName}}
token that matches the name of the target asset being replaced.
This would be useful for complex packs like Seasonal Outfits. For example, redundant entries like this:
{
"Action": "Load",
"Target": "Characters/Abigail",
"FromFile": "Characters/Abigail/{{season}}_{{weather}}.png",
"When": {
"HasFile:Characters/Abigail/{{season}}_{{weather}}.png": "true"
}
},
{
"Action": "Load",
"Target": "Characters/Penny",
"FromFile": "Characters/Penny/{{season}}_{{weather}}.png",
"When": {
"HasFile:Characters/Penny/{{season}}_{{weather}}.png": "true"
}
},
...
Could be replaced by a single patch:
{
"Action": "Load",
"Target": "Characters/Abigail, Characters/Penny",
"FromFile": "Characters/{{targetName}}/{{season}}_{{weather}}.png",
"When": {
"HasFile:Characters/{{targetName}}/{{season}}_{{weather}}.png": "true"
}
}
Done in the upcoming Content Patcher 1.8 via #419.