Skip to content

Commit 686a146

Browse files
v1.2.2
1 parent 97be5ae commit 686a146

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

dist/index.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,18 @@ ngapp.service('idCacheService', function(patcherService) {
9090
return cache[fileName];
9191
};
9292

93+
let updateNextFormId = function(patchFile, idCache) {
94+
let formIds = Object.values(idCache),
95+
maxFormId = formIds.reduce((a, b) => Math.max(a, b), 0x7FF);
96+
xelib.SetNextObjectID(patchFile, maxFormId + 1);
97+
};
98+
9399
this.cacheRecord = function(patchFile) {
94100
let idCache = prepareIdCache(patchFile),
95101
usedIds = {};
96102

103+
updateNextFormId(patchFile, idCache);
104+
97105
return function(rec, id) {
98106
if (!xelib.IsMaster(rec)) return;
99107
if (usedIds.hasOwnProperty(id))
@@ -241,9 +249,10 @@ ngapp.service('patchBuilder', function($rootScope, $timeout, patcherService, pat
241249
};
242250

243251
let progressDone = function(patchPlugins, success) {
244-
let builtStr = `${patchPlugins.length} patch plugins built`,
245-
successStr = `${success ? 'un' : ''}successfully`;
246-
progressService.progressTitle(`${builtStr} ${successStr}`);
252+
let pluginsStr = `${patchPlugins.length} patch plugins`;
253+
progressService.progressTitle(success ?
254+
`${pluginsStr} built successfully` :
255+
`${pluginsStr} failed to build`);
247256
progressService.progressMessage(success ? 'All Done!' : 'Error');
248257
progressService.allowClose();
249258
};
@@ -773,6 +782,6 @@ ngapp.run(function(patcherService) {
773782
info: module.info,
774783
patcherUrl: fh.pathToFileUrl(module.path),
775784
patcherPath: module.path
776-
}, module.code);
785+
}, module.code, module.info.id);
777786
});
778787
});

dist/module.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"id": "unifiedPatchingFramework",
33
"name": "Unified Patching Framework",
44
"author": "Mator",
5-
"version": "1.2.1",
5+
"version": "1.2.2",
66
"repo": "https://github.com/matortheeternal/zedit-unified-patching-framework",
77
"released": "9/7/2017",
8-
"updated": "5/6/2018",
8+
"updated": "5/7/2018",
99
"description": "A framework for dynamic patchers, similar to SkyProc/SUM."
1010
}

0 commit comments

Comments
 (0)