Closed roidy closed 2 years ago
This is a great idea. I need to give it a quick test once I'm back at my computer before I merge but the code looks good to me.
Updated it to change the hash setting name based on the template. Each template will need a separate hash value so SV knows when its xml needs to be rewritten and the skin reloaded.
Also, I switched the template name to be passed as a keyword argument rather than passing the whole params dictionary. That's more future proofing than an immediate issue though.
Allow for building multiple skinvariable templates:-
RunScript(script.skinvariables,action=buildvariables)
Will build the default script-skinvariables-includes.xml from the template skinvariables.xml/jsonRunScript(script.skinvariables,action=buildvariables,template=backgrounds)
Will build script-skinvariables-backgrounds-includes.xml from the template skinvariables-backgrounds.xml/jsonSkinvariable include files can get very large and hard to navigate, this pull request allows the includes to be built in smaller more modular chunks.
Also I found myself needing to manually edit small portions of the generated includes, meaning that if another part of the template needed to be changed I would lose all of my manual edits, this way I can split the template, allowing manual changes to be made where necessary and still rebuild other parts without losing my manual changes.