How to use the @ffxiv-teamcraft/simulator.CraftingActionsRegistry.deserializeRotation function in @ffxiv-teamcraft/simulator

To help you get started, we’ve selected a few @ffxiv-teamcraft/simulator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ffxiv-teamcraft / ffxiv-teamcraft / functions / index.js View on Github external
res.set('Access-Control-Max-Age', '3600');
  if (req.method === 'OPTIONS') {
    // Send response to OPTIONS requests
    res.status(204).send('');
  } else {
    const stats = new CrafterStats(
      req.body.stats.jobId,
      req.body.stats.craftsmanship,
      req.body.stats.control,
      req.body.stats.cp,
      req.body.stats.specialist,
      req.body.stats.level,
      req.body.stats.levels
    );
    const solver = new Solver(req.body.recipe, stats, req.body.configuration);
    const seed = req.body.seed ? CraftingActionsRegistry.deserializeRotation(req.body.seed) : undefined;
    return res.json(CraftingActionsRegistry.serializeRotation(solver.run(seed)));
  }
});
github ffxiv-teamcraft / ffxiv-teamcraft / apps / client / src / app / pages / simulator / components / rotation-panel / rotation-panel.component.ts View on Github external
openMacroPopup(simulation: Simulation): void {
    this.dialog.create({
      nzContent: MacroPopupComponent,
      nzComponentParams: {
        rotation: CraftingActionsRegistry.deserializeRotation(this.rotation.rotation),
        job: this.rotation.recipe.job,
        simulation: simulation.clone(),
        food: this.foods.find(f => this.rotation.food && f.itemId === this.rotation.food.id && f.hq === this.rotation.food.hq),
        medicine: this.medicines.find(f => this.rotation.medicine && f.itemId === this.rotation.medicine.id && f.hq === this.rotation.medicine.hq),
        freeCompanyActions: this.freeCompanyActions.filter(action => this.rotation.freeCompanyActions.indexOf(action.actionId) > -1)
      },
      nzTitle: this.translate.instant('SIMULATOR.Generate_ingame_macro'),
      nzFooter: null
    });
  }
github ffxiv-teamcraft / ffxiv-teamcraft / apps / client / src / app / pages / simulator / components / solver-popup / solver-popup.component.ts View on Github external
this.http.post(`https://us-central1-ffxivteamcraft.cloudfunctions.net/solver  `, gcfParams).subscribe(res => {
      this.ref.close(CraftingActionsRegistry.deserializeRotation(res));
    });
  }
github ffxiv-teamcraft / ffxiv-teamcraft / apps / client / src / app / pages / rotation-overlay / rotation-overlay / rotation-overlay.component.ts View on Github external
map((rotation: any) => {
        rotation.actions = CraftingActionsRegistry.deserializeRotation(rotation.rotation);
        return rotation;
      })
    );