z-edit / zedit-unified-patching-framework

A zEdit module which provides a framework for dynamic patch generation, similar to SkyProc/SUM.
MIT License
14 stars 3 forks source link

Add support for providing an isRequiredMaster function #12

Open matortheeternal opened 5 years ago

matortheeternal commented 5 years ago
registerPatcher({
    info: info,
    gameModes: [xelib.gmSSE, xelib.gmTES5],
    settings: {},
    requiredFiles: [],
    getFilesToPatch: function(filenames) {
        return filenames;
    },
    isRequiredMaster: function(plugin) {
        return xelib.HasElement(plugin, 'ARMO');
    }
    execute: (patchFile, helpers, settings, locals) => ({
        initialize: function() {
        },
        process: [{
            load: {
                signature: 'ARMO',
                filter: function(record) {
                  return false;
                }
            },
            patch: function(record) {
            }
        }],
        finalize: function() {
        }
    })
});