132 lines
2.9 KiB
TypeScript
Raw Normal View History

2022-08-20 13:36:46 +01:00
import { SptLogger } from "@spt-aki/models/spt/logging/SptLogger";
import { IConfig } from "models/IConfig";
import { inject, injectable } from "tsyringe";
import { CWX_ConfigHandler } from "./configHandler";
@injectable()
export class CWX_Logging
{
private config: IConfig;
constructor(
@inject("WinstonLogger") private logger: SptLogger,
@inject("CWX_ConfigHandler") private configHandler: CWX_ConfigHandler
)
{}
public SendLogging(): void
{
this.config = this.configHandler.getConfig();
// globals
this.NoFallDamage();
this.OpenFlea();
this.QuickScav();
// ragfair
this.StaticTrader();
this.RoublesOnly();
this.DisableBSGBlacklist();
// location
this.TurnLootOff();
// inraid
this.TurnPVEOff();
2022-08-26 20:37:27 +01:00
// items
this.changeShrapProps();
this.changeMaxAmmoForKS23();
this.removeDevFromBlacklist();
2022-08-26 20:37:27 +01:00
2022-08-20 13:36:46 +01:00
}
private NoFallDamage(): void
{
if (this.config.globalsConfig.noFallDamage)
{
this.logger.info("No Fall Damage Activated");
}
}
private OpenFlea(): void
{
if (this.config.globalsConfig.openFlea)
{
this.logger.info("Open Flea Activated");
}
}
private QuickScav(): void
{
if (this.config.globalsConfig.quickScav)
{
this.logger.info("Quick Scav Activated");
}
}
private StaticTrader(): void
{
if (this.config.ragfairConfig.staticTrader)
{
2022-08-26 20:37:27 +01:00
this.logger.info("Static Trader Activated");
2022-08-20 13:36:46 +01:00
}
}
private RoublesOnly(): void
{
if (this.config.ragfairConfig.roublesOnly)
{
2022-08-26 20:37:27 +01:00
this.logger.info("Roubles Only Activated");
2022-08-20 13:36:46 +01:00
}
}
private DisableBSGBlacklist(): void
{
if (this.config.ragfairConfig.disableBSGBlacklist)
{
2022-08-26 20:37:27 +01:00
this.logger.info("Disable BSG Blacklist Activated");
2022-08-20 13:36:46 +01:00
}
}
private TurnLootOff(): void
{
if (this.config.locationConfig.turnLootOff)
{
2022-08-26 20:37:27 +01:00
this.logger.info("Turn Loot Off Activated");
2022-08-20 13:36:46 +01:00
}
}
private TurnPVEOff(): void
{
if (this.config.inraidConfig.turnPVEOff)
{
2022-08-26 20:37:27 +01:00
this.logger.info("Turn PVE Off Activated");
}
}
private changeShrapProps(): void
2022-08-26 20:37:27 +01:00
{
if (this.config.itemsConfig.changeShrapProps)
{
this.logger.info("Change Shrap Props Activated");
}
}
private changeMaxAmmoForKS23(): void
2022-08-26 20:37:27 +01:00
{
if (this.config.itemsConfig.changeMaxAmmoForKS23)
{
this.logger.info("Change Max Ammo For KS23 Activated");
2022-08-20 13:36:46 +01:00
}
}
private removeDevFromBlacklist(): void
{
if (this.config.itemsConfig.removeDevFromBlacklist)
{
this.logger.info("Remove Dev From Blacklist Activated");
}
}
2022-08-20 13:36:46 +01:00
}