Skip to content

Commit db8fa4c

Browse files
committed
Fixed simplify.resources.generatePatches
1 parent f0eae70 commit db8fa4c

3 files changed

Lines changed: 4 additions & 16 deletions

File tree

assets/mods/simplify/ccmod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "Simplify",
3-
"version": "2.14.2",
3+
"version": "2.14.3",
44
"title": "Simplify",
55
"description": "Library mod for CCLoader2.",
66
"repository": "https://github.com/CCDirectLink/CCLoader",

assets/mods/simplify/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"prestart": "prestart.js",
77
"plugin": "plugin.js",
88
"hidden": true,
9-
"version": "2.14.2",
9+
"version": "2.14.3",
1010
"ccmodDependencies": {
1111
"ccloader": "^2.22.0",
1212
"crosscode": "^1.0.0"

assets/mods/simplify/postloadModule.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import CustomDebugState from './lib/custom-debug-state.js';
2929
const baseDir = mod.baseDirectory.substr(7);
3030
const assets = window.simplify.getAssets(mod);
3131
for (const asset of assets) {
32-
if(asset.endsWith('.patch')) {
32+
if(!asset.endsWith('.json')) {
3333
continue;
3434
}
3535

@@ -96,19 +96,7 @@ import CustomDebugState from './lib/custom-debug-state.js';
9696
* @returns {Promise<string>}
9797
*/
9898
loadFile(path, callback, errorCb) {
99-
const result = new Promise((resolve, reject) => {
100-
path = this._stripAssets(path);
101-
102-
const req = new XMLHttpRequest();
103-
req.open('GET', path, true);
104-
req.onreadystatechange = function(){
105-
if(req.readyState === 4 && req.status >= 200 && req.status < 300) {
106-
resolve(req.responseText);
107-
}
108-
};
109-
req.onerror = err => reject(err);
110-
req.send();
111-
});
99+
const result = fetch(this._stripAssets(path)).then(resp => resp.text());
112100

113101
if (callback || errorCb) {
114102
result

0 commit comments

Comments
 (0)