[Assets] Fix getAssetByID
This commit is contained in:
parent
3b21f8f345
commit
c0fad60389
2 changed files with 2 additions and 2 deletions
2
src/def.d.ts
vendored
2
src/def.d.ts
vendored
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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;
|
Loading…
Reference in a new issue