Comment improvements

This commit is contained in:
Dev 2024-02-01 12:35:18 +00:00
parent 16cb48ad70
commit d564a7a992

View File

@ -899,10 +899,12 @@ export class HideoutController
craftingExpAmount += this.hideoutConfig.expCraftAmount; // Default is 10 craftingExpAmount += this.hideoutConfig.expCraftAmount; // Default is 10
} }
// Update variable with time spent crafting item(s)
// 1 point per 8 hours of crafting // 1 point per 8 hours of crafting
hoursCrafting += recipe.productionTime; hoursCrafting += recipe.productionTime;
if ((hoursCrafting / this.hideoutConfig.hoursForSkillCrafting) >= 1) if ((hoursCrafting / this.hideoutConfig.hoursForSkillCrafting) >= 1)
{ {
// Spent enough time crafting to get a bonus xp multipler
const multiplierCrafting = Math.floor(hoursCrafting / this.hideoutConfig.hoursForSkillCrafting); const multiplierCrafting = Math.floor(hoursCrafting / this.hideoutConfig.hoursForSkillCrafting);
craftingExpAmount += 1 * multiplierCrafting; craftingExpAmount += 1 * multiplierCrafting;
hoursCrafting -= this.hideoutConfig.hoursForSkillCrafting * multiplierCrafting; hoursCrafting -= this.hideoutConfig.hoursForSkillCrafting * multiplierCrafting;