@slot-engine/core 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3550,9 +3550,9 @@ var GeneratedReelSet = class extends ReelSet {
|
|
|
3550
3550
|
`Error generating reels for game mode "${this.associatedGameModeName}". It's not defined in the game config.`
|
|
3551
3551
|
);
|
|
3552
3552
|
}
|
|
3553
|
+
const outputDir = import_path7.default.join(config.rootDir, config.outputDir);
|
|
3553
3554
|
const filePath = import_path7.default.join(
|
|
3554
|
-
|
|
3555
|
-
config.outputDir,
|
|
3555
|
+
outputDir,
|
|
3556
3556
|
`reels_${this.associatedGameModeName}-${this.id}.csv`
|
|
3557
3557
|
);
|
|
3558
3558
|
const exists = import_fs5.default.existsSync(filePath);
|
|
@@ -3699,12 +3699,13 @@ var GeneratedReelSet = class extends ReelSet {
|
|
|
3699
3699
|
}
|
|
3700
3700
|
const csvString = csvRows.map((row) => row.join(",")).join("\n");
|
|
3701
3701
|
if (import_worker_threads5.isMainThread) {
|
|
3702
|
+
createDirIfNotExists(outputDir);
|
|
3702
3703
|
import_fs5.default.writeFileSync(filePath, csvString);
|
|
3703
|
-
this.reels = this.parseReelsetCSV(filePath, config);
|
|
3704
3704
|
console.log(
|
|
3705
3705
|
`Generated reelset ${this.id} for game mode ${this.associatedGameModeName}`
|
|
3706
3706
|
);
|
|
3707
3707
|
}
|
|
3708
|
+
this.reels = this.parseReelsetCSV(filePath, config);
|
|
3708
3709
|
return this;
|
|
3709
3710
|
}
|
|
3710
3711
|
};
|