update mods
This commit is contained in:
parent
0d0c9e1232
commit
93e3c05838
@ -1,7 +1,7 @@
|
|||||||
import type { DependencyContainer } from "tsyringe";
|
import type { DependencyContainer } from "tsyringe";
|
||||||
import { IMod } from "../types/@types/external/mod";
|
import { IMod } from "../types/@types/external/mod";
|
||||||
|
|
||||||
import type { Logger } from "../types/utils/Logger";
|
import type { ILogger } from "../types/@types/spt/utils/ILogger";
|
||||||
import { ConfigServer, ConfigTypes } from "../types/servers/ConfigServer";
|
import { ConfigServer, ConfigTypes } from "../types/servers/ConfigServer";
|
||||||
import { IBotConfig } from "../types/@types/spt/config/IBotConfig";
|
import { IBotConfig } from "../types/@types/spt/config/IBotConfig";
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ class Mod implements IMod
|
|||||||
public delayedLoad(container: DependencyContainer): void
|
public delayedLoad(container: DependencyContainer): void
|
||||||
{
|
{
|
||||||
// get logger
|
// get logger
|
||||||
const logger = container.resolve<Logger>("WinstonLogger");
|
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
|
|
||||||
// get the config server
|
// get the config server
|
||||||
const configServer = container.resolve<ConfigServer>("ConfigServer");
|
const configServer = container.resolve<ConfigServer>("ConfigServer");
|
||||||
@ -23,7 +23,7 @@ class Mod implements IMod
|
|||||||
// Required - ConfigTypes.BOT is the enum of the config we want, others include ConfigTypes.Airdrop
|
// Required - ConfigTypes.BOT is the enum of the config we want, others include ConfigTypes.Airdrop
|
||||||
const botConfig = configServer.getConfig<IBotConfig>(ConfigTypes.BOT);
|
const botConfig = configServer.getConfig<IBotConfig>(ConfigTypes.BOT);
|
||||||
|
|
||||||
// log the pmc difficulty
|
// log the original pmc difficulty
|
||||||
logger.info(`here is the original bot pmc difficulty: ${botConfig.pmc.difficulty}`)
|
logger.info(`here is the original bot pmc difficulty: ${botConfig.pmc.difficulty}`)
|
||||||
|
|
||||||
// adjust the difficulty
|
// adjust the difficulty
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import type { DependencyContainer } from "tsyringe";
|
import type { DependencyContainer } from "tsyringe";
|
||||||
|
|
||||||
import { IMod } from "../types/@types/external/mod";
|
import { IMod } from "../types/@types/external/mod";
|
||||||
import type { Logger } from "../types/utils/Logger";
|
import type { ILogger } from "../types/@types/spt/utils/ILogger";
|
||||||
import * as modConfig from "../config/config.json";
|
import * as modConfig from "../config/config.json";
|
||||||
|
|
||||||
class Mod implements IMod
|
class Mod implements IMod
|
||||||
@ -13,9 +13,9 @@ class Mod implements IMod
|
|||||||
public delayedLoad(container: DependencyContainer): void
|
public delayedLoad(container: DependencyContainer): void
|
||||||
{
|
{
|
||||||
// get logger
|
// get logger
|
||||||
const logger = container.resolve<Logger>("WinstonLogger");
|
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
|
|
||||||
// log the 'myProperty' property to the console
|
// log the 'myProperty' value to the console
|
||||||
logger.info(`here is the value from my config: ${modConfig.myProperty}`);
|
logger.info(`here is the value from my config: ${modConfig.myProperty}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user