2021-02-15 17:13:43 +01:00
|
|
|
import "reflect-metadata";
|
2021-01-28 09:12:04 +01:00
|
|
|
import Configuration from "./config/Configuration";
|
2021-02-15 17:13:43 +01:00
|
|
|
import {container} from "tsyringe";
|
|
|
|
import FigureConverter from "./figure/FigureConverter";
|
|
|
|
import FurnitureConverter from "./furniture/FurnitureConverter";
|
|
|
|
import PetConverter from "./pet/PetConverter";
|
|
|
|
import EffectConverter from "./effect/EffectConverter";
|
2021-01-28 09:12:04 +01:00
|
|
|
|
|
|
|
(async () => {
|
2021-02-15 17:13:43 +01:00
|
|
|
const config = container.resolve(Configuration);
|
2021-01-28 09:12:04 +01:00
|
|
|
await config.init();
|
|
|
|
|
|
|
|
if (config.getBoolean("convert.figure")) {
|
2021-02-15 17:13:43 +01:00
|
|
|
const figureConverter = container.resolve(FigureConverter);
|
|
|
|
await figureConverter.convertAsync();
|
2021-01-28 09:12:04 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (config.getBoolean("convert.furniture")) {
|
2021-02-15 17:13:43 +01:00
|
|
|
const furnitureConverter = container.resolve(FurnitureConverter);
|
|
|
|
await furnitureConverter.convertAsync();
|
2021-02-02 04:43:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (config.getBoolean("convert.pet")) {
|
2021-02-15 17:13:43 +01:00
|
|
|
const petConverter = container.resolve(PetConverter);
|
|
|
|
await petConverter.convertAsync();
|
|
|
|
}
|
2021-02-02 04:43:38 +01:00
|
|
|
|
2021-02-15 17:13:43 +01:00
|
|
|
if (config.getBoolean("convert.effect")) {
|
|
|
|
const effectConverter = container.resolve(EffectConverter);
|
|
|
|
await effectConverter.convertAsync();
|
2021-02-02 02:13:17 +01:00
|
|
|
}
|
|
|
|
|
2021-01-28 09:12:04 +01:00
|
|
|
console.log('finished!');
|
|
|
|
})()
|