From 59f286e65e9c00fd2adf1d2c6f09ac8c7f720ec3 Mon Sep 17 00:00:00 2001 From: Kir_Antipov Date: Tue, 7 Dec 2021 21:32:27 +0300 Subject: [PATCH] Made enum that describes different mod loaders --- src/metadata/mod-loader-type.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/metadata/mod-loader-type.ts diff --git a/src/metadata/mod-loader-type.ts b/src/metadata/mod-loader-type.ts new file mode 100644 index 0000000..9215497 --- /dev/null +++ b/src/metadata/mod-loader-type.ts @@ -0,0 +1,16 @@ +enum ModLoaderType { + Fabric = 1, + Forge, +} + +namespace ModLoaderType { + export function getValues(): ModLoaderType[] { + return Object.values(ModLoaderType).filter(x => typeof x === "number"); + } + + export function toString(target: ModLoaderType): string { + return ModLoaderType[target] ?? target.toString(); + } +} + +export default ModLoaderType;