Skip to content

Commit

Permalink
EphemeralEuphoria craft correct ingrediment result
Browse files Browse the repository at this point in the history
  • Loading branch information
saertna committed Oct 21, 2023
1 parent 8e00d40 commit f29f413
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 2 additions & 3 deletions main.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/MultiSelectModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,14 @@ export class MultiSelectModal extends Modal {
const proportionalAmount = Math.ceil((this.remainingStock[this.getIngerementFromName(increment).name] / totalAvailableIngredients) * 1000);
//const rest = this.remainingStock[this.getIngerementFromName(increment).name] - proportionalAmount;
//console.log(`${this.getIngerementFromName(increment).shortName} ${this.remainingStock[this.getIngerementFromName(increment).name]} shall be ${this.remainingStock[this.getIngerementFromName(increment).name] - rest} = ${this.remainingStock[this.getIngerementFromName(increment).name]} - ${rest}`)
this.remainingStock[this.getIngerementFromName(increment).name] = this.remainingStock[this.getIngerementFromName(increment).name] - proportionalAmount;;
//this.remainingStock[this.getIngerementFromName(increment).name] = this.remainingStock[this.getIngerementFromName(increment).name] - proportionalAmount;
//this.updateIncrementStock(this.getIngerementFromName(increment).varName, this.remainingStock[this.getIngerementFromName(increment).name])
this.updateIncrementStock(this.getIngerementFromName(increment).name, this.remainingStock[this.getIngerementFromName(increment).name] - proportionalAmount)
}
});

//save new stock

// Update the stock information display
this.updateStockInformation();

Expand Down

0 comments on commit f29f413

Please sign in to comment.