updates
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import type { LocalizedString } from './shared-types';
|
||||
import { dataSets, loadModels } from './loadModels';
|
||||
|
||||
export interface MetaGroup {
|
||||
readonly meta_group_id: number;
|
||||
readonly name: LocalizedString;
|
||||
readonly type_ids: number[];
|
||||
readonly icon_id?: number;
|
||||
readonly icon_suffix?: string;
|
||||
}
|
||||
|
||||
export function getMetaGroup(meta_group_id: number): MetaGroup {
|
||||
if (!dataSets.loaded) loadModels();
|
||||
const data = dataSets.meta_groups[String(meta_group_id)];
|
||||
if (!data) throw new Error(`Meta group ID ${meta_group_id} not found in reference data`);
|
||||
return data;
|
||||
}
|
||||
Reference in New Issue
Block a user