From c114d4285f24f575f85bc28900ed431b97a2fd73 Mon Sep 17 00:00:00 2001 From: Dev Date: Sun, 28 Jul 2024 13:19:52 +0100 Subject: [PATCH] Removed redundant function --- project/src/helpers/WeightedRandomHelper.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/project/src/helpers/WeightedRandomHelper.ts b/project/src/helpers/WeightedRandomHelper.ts index aa79b482..c45ca01d 100644 --- a/project/src/helpers/WeightedRandomHelper.ts +++ b/project/src/helpers/WeightedRandomHelper.ts @@ -2,20 +2,6 @@ import { injectable } from "tsyringe"; @injectable() export class WeightedRandomHelper { - /** - * @deprecated USE getWeightedValue() WHERE POSSIBLE - * Gets a tplId from a weighted dictionary - * @param {tplId: weighting[]} itemArray - * @returns tplId - */ - public getWeightedInventoryItem(itemArray: { [tplId: string]: unknown } | ArrayLike): string { - const itemKeys = Object.keys(itemArray); - const weights = Object.values(itemArray); - const chosenItem = this.weightedRandom(itemKeys, weights); - - return chosenItem.item; - } - /** * Choos an item from the passed in array based on the weightings of each * @param itemArray Items and weights to use