2022-08-20 13:36:46 +01:00
|
|
|
import { SptLogger } from "@spt-aki/models/spt/logging/SptLogger";
|
2022-10-19 17:27:45 +01:00
|
|
|
import { ICwxConfig } from "models/IConfig";
|
2022-08-20 13:36:46 +01:00
|
|
|
import { inject, injectable } from "tsyringe";
|
2022-10-19 17:27:45 +01:00
|
|
|
import { CwxConfigHandler } from "./configHandler";
|
2022-08-20 13:36:46 +01:00
|
|
|
|
|
|
|
@injectable()
|
2022-10-19 17:27:45 +01:00
|
|
|
export class CwxLogging
|
2022-08-20 13:36:46 +01:00
|
|
|
{
|
2022-10-19 17:27:45 +01:00
|
|
|
private config: ICwxConfig;
|
2022-08-20 13:36:46 +01:00
|
|
|
|
|
|
|
constructor(
|
|
|
|
@inject("WinstonLogger") private logger: SptLogger,
|
2022-10-19 17:27:45 +01:00
|
|
|
@inject("CwxConfigHandler") private configHandler: CwxConfigHandler
|
2022-08-20 13:36:46 +01:00
|
|
|
)
|
|
|
|
{}
|
|
|
|
|
2022-10-19 17:27:45 +01:00
|
|
|
public sendLogging(): void
|
2022-08-20 13:36:46 +01:00
|
|
|
{
|
|
|
|
this.config = this.configHandler.getConfig();
|
|
|
|
|
|
|
|
// globals
|
2022-10-19 17:27:45 +01:00
|
|
|
this.noFallDamage();
|
|
|
|
this.openFlea();
|
|
|
|
this.quickScav();
|
2022-08-20 13:36:46 +01:00
|
|
|
|
|
|
|
// ragfair
|
2022-10-19 17:27:45 +01:00
|
|
|
this.staticTrader();
|
|
|
|
this.roublesOnly();
|
|
|
|
this.disableBSGBlacklist();
|
2022-08-20 13:36:46 +01:00
|
|
|
|
|
|
|
// location
|
2022-10-19 17:27:45 +01:00
|
|
|
this.turnLootOff();
|
2022-08-20 13:36:46 +01:00
|
|
|
|
|
|
|
// inraid
|
2022-10-19 17:27:45 +01:00
|
|
|
this.turnPVEOff();
|
2022-08-26 20:37:27 +01:00
|
|
|
|
|
|
|
// items
|
|
|
|
this.changeShrapProps();
|
|
|
|
this.changeMaxAmmoForKS23();
|
2022-09-19 00:12:56 +01:00
|
|
|
this.removeDevFromBlacklist();
|
2022-08-26 20:37:27 +01:00
|
|
|
|
2022-10-19 17:27:45 +01:00
|
|
|
// airdrops
|
|
|
|
this.enableAllTheTime();
|
|
|
|
this.changeFlightHeight();
|
|
|
|
this.changeStartTime();
|
|
|
|
this.changePlaneVolume();
|
|
|
|
|
2022-08-20 13:36:46 +01:00
|
|
|
}
|
|
|
|
|
2022-10-19 17:27:45 +01:00
|
|
|
private noFallDamage(): void
|
2022-08-20 13:36:46 +01:00
|
|
|
{
|
|
|
|
if (this.config.globalsConfig.noFallDamage)
|
|
|
|
{
|
|
|
|
this.logger.info("No Fall Damage Activated");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-19 17:27:45 +01:00
|
|
|
private openFlea(): void
|
2022-08-20 13:36:46 +01:00
|
|
|
{
|
|
|
|
if (this.config.globalsConfig.openFlea)
|
|
|
|
{
|
|
|
|
this.logger.info("Open Flea Activated");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-19 17:27:45 +01:00
|
|
|
private quickScav(): void
|
2022-08-20 13:36:46 +01:00
|
|
|
{
|
|
|
|
if (this.config.globalsConfig.quickScav)
|
|
|
|
{
|
|
|
|
this.logger.info("Quick Scav Activated");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-19 17:27:45 +01:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-19 17:27:45 +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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-19 17:27:45 +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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-19 17:27:45 +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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-19 17:27:45 +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-09-19 00:12:56 +01:00
|
|
|
private changeShrapProps(): void
|
2022-08-26 20:37:27 +01:00
|
|
|
{
|
|
|
|
if (this.config.itemsConfig.changeShrapProps)
|
|
|
|
{
|
|
|
|
this.logger.info("Change Shrap Props Activated");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-19 00:12:56 +01:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|
2022-09-19 00:12:56 +01:00
|
|
|
|
|
|
|
private removeDevFromBlacklist(): void
|
|
|
|
{
|
|
|
|
if (this.config.itemsConfig.removeDevFromBlacklist)
|
|
|
|
{
|
|
|
|
this.logger.info("Remove Dev From Blacklist Activated");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-10-19 17:27:45 +01:00
|
|
|
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
|
|
|
}
|