From c0fad60389383e998e5202df1ea5080dfe926816 Mon Sep 17 00:00:00 2001 From: Beef Date: Sun, 23 Oct 2022 00:05:04 +0100 Subject: [PATCH] [Assets] Fix getAssetByID --- src/def.d.ts | 2 +- src/ui/assets.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/def.d.ts b/src/def.d.ts index d565e3a..bdf9be6 100644 --- a/src/def.d.ts +++ b/src/def.d.ts @@ -63,7 +63,7 @@ interface VendettaObject { all: Assets; find: (filter: (a: any) => void) => Asset | null | undefined; getAssetByName: (name: string) => Asset; - getAssetByID: (name: string) => Asset; + getAssetByID: (id: number) => Asset; getAssetIDByName: (name: string) => number; } }; diff --git a/src/ui/assets.ts b/src/ui/assets.ts index 366cb9d..7b3a00d 100644 --- a/src/ui/assets.ts +++ b/src/ui/assets.ts @@ -23,5 +23,5 @@ export default function patchAssets() { export const find = (filter: (a: any) => void): Asset | null | undefined => Object.values(all).find(filter); export const getAssetByName = (name: string): Asset => all[name]; -export const getAssetByID = (name: string): Asset => assetsModule.getAssetByID(name); +export const getAssetByID = (id: number): Asset => assetsModule.getAssetByID(id); export const getAssetIDByName = (name: string) => all[name]?.id; \ No newline at end of file