From 0844ce3a92f2c8ff023bf3cf4364b18483cc72d7 Mon Sep 17 00:00:00 2001 From: Kir_Antipov Date: Tue, 7 Dec 2021 21:40:57 +0300 Subject: [PATCH] Implemented factory for `ModMetadataReader`s --- src/metadata/mod-metadata-reader-factory.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/metadata/mod-metadata-reader-factory.ts diff --git a/src/metadata/mod-metadata-reader-factory.ts b/src/metadata/mod-metadata-reader-factory.ts new file mode 100644 index 0000000..3abf394 --- /dev/null +++ b/src/metadata/mod-metadata-reader-factory.ts @@ -0,0 +1,11 @@ +import ModLoaderType from "./mod-loader-type"; +import ModMetadataReader from "./mod-metadata-reader"; + +export default class ModMetadataReaderFactory { + public create(loaderType: ModLoaderType): ModMetadataReader { + switch (loaderType) { + default: + throw new Error(`Unknown mod loader "${ModLoaderType.toString(loaderType)}"`); + } + } +}