[Assets] Fix getAssetByID

This commit is contained in:
Beef 2022-10-23 00:05:04 +01:00
parent 3b21f8f345
commit c0fad60389
2 changed files with 2 additions and 2 deletions

2
src/def.d.ts vendored
View file

@ -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;
}
};

View file

@ -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;