187 lines
4.2 KiB
TypeScript
Raw Normal View History

2022-08-20 13:36:46 +01:00
import { SptLogger } from "@spt-aki/models/spt/logging/SptLogger";
import { ICwxConfig } from "models/IConfig";
2022-08-20 13:36:46 +01:00
import { inject, injectable } from "tsyringe";
import { CwxConfigHandler } from "./configHandler";
2022-08-20 13:36:46 +01:00
@injectable()
export class CwxLogging
2022-08-20 13:36:46 +01:00
{
private config: ICwxConfig;
2022-08-20 13:36:46 +01:00
constructor(
@inject("WinstonLogger") private logger: SptLogger,
@inject("CwxConfigHandler") private configHandler: CwxConfigHandler
2022-08-20 13:36:46 +01:00
)
{}
public sendLogging(): void
2022-08-20 13:36:46 +01:00
{
this.config = this.configHandler.getConfig();
// globals
this.noFallDamage();
this.openFlea();
this.quickScav();
2022-08-20 13:36:46 +01:00
// ragfair
this.staticTrader();
this.roublesOnly();
this.disableBSGBlacklist();
2022-08-20 13:36:46 +01:00
// location
this.turnLootOff();
2022-08-20 13:36:46 +01:00
// inraid
this.turnPVEOff();
2022-12-25 15:41:36 +00:00
this.extendRaidTimes();
2022-08-26 20:37:27 +01:00
// items
this.changeShrapProps();
this.changeMaxAmmoForKS23();
this.removeDevFromBlacklist();
2022-12-25 15:41:36 +00:00
this.inspectAllItems();
2022-08-26 20:37:27 +01:00
// airdrops
this.enableAllTheTime();
this.changeFlightHeight();
this.changeStartTime();
this.changePlaneVolume();
2022-08-20 13:36:46 +01:00
}
2022-12-25 15:41:36 +00:00
private noFallDamage(): void
2022-08-20 13:36:46 +01:00
{
if (this.config.globalsConfig.noFallDamage)
{
this.logger.info("No Fall Damage Activated");
}
}
private openFlea(): void
2022-08-20 13:36:46 +01:00
{
if (this.config.globalsConfig.openFlea)
{
this.logger.info("Open Flea Activated");
}
}
private quickScav(): void
2022-08-20 13:36:46 +01:00
{
if (this.config.globalsConfig.quickScav)
{
this.logger.info("Quick Scav Activated");
}
}
private staticTrader(): void
2022-08-20 13:36:46 +01:00
{
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
2022-08-20 13:36:46 +01:00
{
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
2022-08-20 13:36:46 +01:00
{
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
2022-08-20 13:36:46 +01:00
{
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
2022-08-20 13:36:46 +01:00
{
if (this.config.inraidConfig.turnPVEOff)
{
2022-08-26 20:37:27 +01:00
this.logger.info("Turn PVE Off Activated");
}
}
2022-12-25 15:41:36 +00:00
private extendRaidTimes()
{
if (this.config.inraidConfig.extendRaidTimes)
{
this.logger.info("Extend Raid Times 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-12-25 15:41:36 +00:00
private inspectAllItems(): void
{
if (this.config.itemsConfig.inspectAllItems)
{
this.logger.info("Inspect All Items Activated");
}
}
private enableAllTheTime(): void
{
if (this.config.airdropConfig.enableAllTheTime)
{
this.logger.info("Enable Airdrops All The Time Activated");
}
}
private changeFlightHeight(): void
{
if (this.config.airdropConfig.changeFlightHeight)
{
this.logger.info("Change Flight Height Activated");
}
}
private changeStartTime(): void
{
if (this.config.airdropConfig.changeStartTime)
{
this.logger.info("Change Start Time Activated");
}
}
private changePlaneVolume(): void
{
if (this.config.airdropConfig.changePlaneVolume)
{
this.logger.info("Change Plane Volume Activated");
}
}
2022-08-20 13:36:46 +01:00
}