@slot-engine/core 0.0.6 → 0.0.8

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.d.mts CHANGED
@@ -941,7 +941,7 @@ interface GameContextServices {
941
941
 
942
942
  declare class OptimizationParameters {
943
943
  protected parameters: OptimizationParametersOpts;
944
- constructor(opts?: OptimizationParametersOpts);
944
+ constructor(opts?: Partial<OptimizationParametersOpts>);
945
945
  static DEFAULT_PARAMETERS: OptimizationParametersOpts;
946
946
  getParameters(): OptimizationParametersOpts;
947
947
  }
package/dist/index.d.ts CHANGED
@@ -941,7 +941,7 @@ interface GameContextServices {
941
941
 
942
942
  declare class OptimizationParameters {
943
943
  protected parameters: OptimizationParametersOpts;
944
- constructor(opts?: OptimizationParametersOpts);
944
+ constructor(opts?: Partial<OptimizationParametersOpts>);
945
945
  static DEFAULT_PARAMETERS: OptimizationParametersOpts;
946
946
  getParameters(): OptimizationParametersOpts;
947
947
  }
package/dist/index.js CHANGED
@@ -1690,12 +1690,16 @@ Simulating game mode: ${mode}`);
1690
1690
  "publish_files",
1691
1691
  "index.json"
1692
1692
  );
1693
- const modes = Object.entries(this.gameConfig.gameModes).map(([mode, modeConfig]) => ({
1694
- name: mode,
1695
- cost: modeConfig.cost,
1696
- events: `books_${mode}.jsonl.zst`,
1697
- weights: `lookUpTable_${mode}_0.csv`
1698
- }));
1693
+ const modes = Object.keys(this.simRunsAmount).map((id) => {
1694
+ const mode = this.gameConfig.gameModes[id];
1695
+ (0, import_assert6.default)(mode, `Game mode "${id}" not found in game config.`);
1696
+ return {
1697
+ name: mode.name,
1698
+ cost: mode.cost,
1699
+ events: `books_${mode.name}.jsonl.zst`,
1700
+ weights: `lookUpTable_${mode.name}_0.csv`
1701
+ };
1702
+ });
1699
1703
  writeFile(outputFilePath, JSON.stringify({ modes }, null, 2));
1700
1704
  }
1701
1705
  async writeBooksJson(gameMode) {