Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* global ngapp, xelib */
- registerPatcher({
- info: info,
- gameModes: [xelib.gmTES5, xelib.gmSSE],
- settings: {
- label: 'Ench Restrict Remover',
- hide: true
- },
- execute: {
- initialize: function(patch, helpers, settigns, locals) {
- let flst = xelib.AddElement(patch, 'FLST\\FLST');
- helpers.cacheRecord(flst, "NER");
- locals.flst = xelib.LongName(flst);
- helpers.loadRecords('KYWD').forEach(kywd => {
- let name = xelib.LongName(kywd);
- if (!name.match(/^(Clothing|Armor(?!Material)|WeapType)/)) return;
- helpers.logMessage("Allowing " + name);
- xelib.AddFormID(flst, name);
- });
- },
- process: [{
- load: {
- signature: 'ENCH',
- filter: function(record) {
- return xelib.HasElement(record, 'ENIT\\Worn Restrictions');
- }
- },
- patch: function(record, helpers, settings, locals) {
- helpers.logMessage('Patching ' + xelib.LongName(record));
- xelib.SetValue(record, 'ENIT\\Worn Restrictions', locals.flst);
- }
- }]
- }
- });
Add Comment
Please, Sign In to add comment