Comparing version 1.1.7 to 1.1.9
{ | ||
"name": "cemu-smm", | ||
"version": "1.1.7", | ||
"version": "1.1.9", | ||
"description": "This is a module to simplify all kinds of tasks with Loadiine Super Mario Maker save files and respectively Cemu", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -16,2 +16,5 @@ const Promise = require("bluebird"); | ||
const SAVE_AMIIBO_OFFSET = 0x85E0; | ||
const SAVE_AMIIBO_LENGTH = 0x14; | ||
const SAVE_CRC_LENGTH = 0x10; | ||
@@ -97,2 +100,8 @@ const SAVE_CRC_PRE_BUF = Buffer.from("0000000000000015", "hex"); | ||
await Promise.all(promises); | ||
for (let i = 0; i < SAVE_ORDER_SIZE; i++) { | ||
fs.access(path.resolve(`${this.pathToSave}/course${i.pad(3)}`), fs.constants.R_OK | fs.constants.W_OK, (err) => { | ||
if (err) return; | ||
this.data.writeUInt8(i, SAVE_ORDER_OFFSET + i); | ||
}) | ||
} | ||
@@ -137,2 +146,8 @@ // recalculate checksum | ||
} | ||
for (let i = 0; i < SAVE_ORDER_SIZE; i++) { | ||
try { | ||
fs.accessSync(path.resolve(`${this.pathToSave}/course${i.pad(3)}`), fs.constants.R_OK | fs.constants.W_OK); | ||
this.data.writeUInt8(i, SAVE_ORDER_OFFSET + i); | ||
} catch (err) {} | ||
} | ||
@@ -268,2 +283,14 @@ // recalculate checksum | ||
unlockAmiibos: async function () { | ||
await new Promise(async (resolve) => { | ||
for (let i = 0; i < SAVE_AMIIBO_LENGTH; i++) { | ||
this.data.writeUInt8(0xFF, SAVE_AMIIBO_OFFSET + i); | ||
} | ||
await this.writeCrc(); | ||
resolve(); | ||
}) | ||
}, | ||
loadCourses: async function () { | ||
@@ -270,0 +297,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1853
195138
18