"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class target {
    preSptLoad(container) {
        const logger = container.resolve("WinstonLogger");
    }
    postDBLoad(container) {
        const databaseServer = container.resolve("DatabaseServer");
        const tables = databaseServer.getTables();
        const ImporterUtil = container.resolve("ImporterUtil");
        const locales = Object.values(tables.locales.global);
        const PreSptModLoader = container.resolve("PreSptModLoader");
        const logger = container.resolve("WinstonLogger");
        const db = ImporterUtil.loadRecursive(`${PreSptModLoader.getModPath("AT-freedom")}db/`);
        const allitems = tables.templates.items;
        //添加mod物品的items
        for (const item in db.items) {
            tables.templates.items[item] = db.items[item];
        }
        //添加文字说明
        for (const description in db.locales["ATdescription"]) {
            tables.locales.global['ch'][description] = db.locales["ATdescription"][description];
        }
        for (const endescription in db.locales["ATdescriptionen"]) {
            tables.locales.global['en'][endescription] = db.locales["ATdescriptionen"][endescription];
        }
        //添加物品的跳蚤分类
        for (const ha in db.templates.handbook) {
            tables.templates.handbook.Items.push(db.templates.handbook[ha]);
        }
        //枪管增加技能核心配件	
        function peijian(A, B) {
            for (const item in tables.templates.items) {
                if (tables.templates.items[item]._props.Slots) {
                    for (const slot in tables.templates.items[item]._props.Slots) {
                        for (const filter in tables.templates.items[item]._props.Slots[slot]._props.filters[0].Filter) {
                            if (tables.templates.items[item]._props.Slots[slot]._props.filters[0].Filter[filter] === A) {
                                tables.templates.items[item]._props.Slots[slot]._props.filters[0].Filter.push(B);
                            }
                        }
                    }
                }
            }
        }
        //添加商人售卖，本框架给的毛商
        for (const newitems in db.traders) {
            for (const item in db.traders[newitems].assort.items) {
                tables.traders[newitems].assort.items.unshift(db.traders[newitems].assort.items[item]);
            }
            for (const item in db.traders[newitems].assort.barter_scheme) {
                tables.traders[newitems].assort.barter_scheme[item] = db.traders[newitems].assort.barter_scheme[item];
            }
            for (const item in db.traders[newitems].assort.loyal_level_items) {
                tables.traders[newitems].assort.loyal_level_items[item] = db.traders[newitems].assort.loyal_level_items[item];
            }
        }
    }
}
module.exports = { mod: new target() };
//# sourceMappingURL=mod.js.map