forked from CWX/CWX-mods
bump version
This commit is contained in:
parent
d1fce092e9
commit
cb18454a5d
@ -15,5 +15,9 @@
|
|||||||
},
|
},
|
||||||
"inraidConfig": {
|
"inraidConfig": {
|
||||||
"turnPVEOff": true
|
"turnPVEOff": true
|
||||||
|
},
|
||||||
|
"itemsConfig": {
|
||||||
|
"changeShrapProps": true,
|
||||||
|
"changeMaxAmmoForKS23": true
|
||||||
}
|
}
|
||||||
}
|
}
|
4
Live/CWX_DebugTool/dist/config/config.json
vendored
4
Live/CWX_DebugTool/dist/config/config.json
vendored
@ -15,5 +15,9 @@
|
|||||||
},
|
},
|
||||||
"inraidConfig": {
|
"inraidConfig": {
|
||||||
"turnPVEOff": true
|
"turnPVEOff": true
|
||||||
|
},
|
||||||
|
"itemsConfig": {
|
||||||
|
"changeShrapProps": true,
|
||||||
|
"changeMaxAmmoForKS23": true
|
||||||
}
|
}
|
||||||
}
|
}
|
7
Live/CWX_DebugTool/dist/models/IConfig.ts
vendored
7
Live/CWX_DebugTool/dist/models/IConfig.ts
vendored
@ -5,6 +5,7 @@ export interface IConfig
|
|||||||
ragfairConfig: ragfairConfig
|
ragfairConfig: ragfairConfig
|
||||||
locationConfig: locationConfig
|
locationConfig: locationConfig
|
||||||
inraidConfig: inraidConfig
|
inraidConfig: inraidConfig
|
||||||
|
itemsConfig: itemsConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface globalsConfig
|
export interface globalsConfig
|
||||||
@ -30,3 +31,9 @@ export interface inraidConfig
|
|||||||
{
|
{
|
||||||
turnPVEOff: boolean
|
turnPVEOff: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface itemsConfig
|
||||||
|
{
|
||||||
|
changeShrapProps: boolean
|
||||||
|
changeMaxAmmoForKS23: boolean
|
||||||
|
}
|
49
Live/CWX_DebugTool/dist/src/itemsConfig.ts
vendored
Normal file
49
Live/CWX_DebugTool/dist/src/itemsConfig.ts
vendored
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
import { inject, injectable } from "tsyringe";
|
||||||
|
|
||||||
|
import { CWX_ConfigHandler } from "./configHandler";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
|
import { IConfig } from "models/IConfig";
|
||||||
|
|
||||||
|
@injectable()
|
||||||
|
export class CWX_ItemsConfig
|
||||||
|
{
|
||||||
|
private tables: Record<string, ITemplateItem>;
|
||||||
|
private config: IConfig;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
@inject("DatabaseServer") private databaseServer: DatabaseServer,
|
||||||
|
@inject("CWX_ConfigHandler") private configHandler: CWX_ConfigHandler
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
public applyChanges(): void
|
||||||
|
{
|
||||||
|
this.tables = this.databaseServer.getTables().templates.items;
|
||||||
|
this.config = this.configHandler.getConfig();
|
||||||
|
|
||||||
|
this.changeShrapProps();
|
||||||
|
this.changeMaxAmmoForKS23();
|
||||||
|
}
|
||||||
|
|
||||||
|
private changeShrapProps(): void
|
||||||
|
{
|
||||||
|
const shrap = this.tables["5e85a9a6eacf8c039e4e2ac1"];
|
||||||
|
|
||||||
|
if (this.config.itemsConfig.changeShrapProps)
|
||||||
|
{
|
||||||
|
shrap._props.Damage = 200;
|
||||||
|
shrap._props.InitialSpeed = 1000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private changeMaxAmmoForKS23(): void
|
||||||
|
{
|
||||||
|
const ks23 = this.tables["5f647d9f8499b57dc40ddb93"];
|
||||||
|
|
||||||
|
if (this.config.itemsConfig.changeMaxAmmoForKS23)
|
||||||
|
{
|
||||||
|
ks23._props.Cartridges[0]._max_count = 30;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
31
Live/CWX_DebugTool/dist/src/logging.ts
vendored
31
Live/CWX_DebugTool/dist/src/logging.ts
vendored
@ -33,6 +33,11 @@ export class CWX_Logging
|
|||||||
|
|
||||||
// inraid
|
// inraid
|
||||||
this.TurnPVEOff();
|
this.TurnPVEOff();
|
||||||
|
|
||||||
|
// items
|
||||||
|
this.changeShrapProps();
|
||||||
|
this.changeMaxAmmoForKS23();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private NoFallDamage(): void
|
private NoFallDamage(): void
|
||||||
@ -63,7 +68,7 @@ export class CWX_Logging
|
|||||||
{
|
{
|
||||||
if (this.config.ragfairConfig.staticTrader)
|
if (this.config.ragfairConfig.staticTrader)
|
||||||
{
|
{
|
||||||
this.logger.info("Static Trader Activated")
|
this.logger.info("Static Trader Activated");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,7 +76,7 @@ export class CWX_Logging
|
|||||||
{
|
{
|
||||||
if (this.config.ragfairConfig.roublesOnly)
|
if (this.config.ragfairConfig.roublesOnly)
|
||||||
{
|
{
|
||||||
this.logger.info("Roubles Only Activated")
|
this.logger.info("Roubles Only Activated");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +84,7 @@ export class CWX_Logging
|
|||||||
{
|
{
|
||||||
if (this.config.ragfairConfig.disableBSGBlacklist)
|
if (this.config.ragfairConfig.disableBSGBlacklist)
|
||||||
{
|
{
|
||||||
this.logger.info("Disable BSG Blacklist Activated")
|
this.logger.info("Disable BSG Blacklist Activated");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +92,7 @@ export class CWX_Logging
|
|||||||
{
|
{
|
||||||
if (this.config.locationConfig.turnLootOff)
|
if (this.config.locationConfig.turnLootOff)
|
||||||
{
|
{
|
||||||
this.logger.info("Turn Loot Off Activated")
|
this.logger.info("Turn Loot Off Activated");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,7 +100,23 @@ export class CWX_Logging
|
|||||||
{
|
{
|
||||||
if (this.config.inraidConfig.turnPVEOff)
|
if (this.config.inraidConfig.turnPVEOff)
|
||||||
{
|
{
|
||||||
this.logger.info("Turn PVE Off Activated")
|
this.logger.info("Turn PVE Off Activated");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private changeShrapProps():void
|
||||||
|
{
|
||||||
|
if (this.config.itemsConfig.changeShrapProps)
|
||||||
|
{
|
||||||
|
this.logger.info("Change Shrap Props Activated");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private changeMaxAmmoForKS23():void
|
||||||
|
{
|
||||||
|
if (this.config.itemsConfig.changeMaxAmmoForKS23)
|
||||||
|
{
|
||||||
|
this.logger.info("Change Max Ammo For KS23 Activated");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
3
Live/CWX_DebugTool/dist/src/mod.ts
vendored
3
Live/CWX_DebugTool/dist/src/mod.ts
vendored
@ -7,6 +7,7 @@ import { CWX_Logging } from "./logging";
|
|||||||
import { CWX_RagfairConfig } from "./ragfairConfig";
|
import { CWX_RagfairConfig } from "./ragfairConfig";
|
||||||
import { CWX_LocationConfig } from "./locationConfig";
|
import { CWX_LocationConfig } from "./locationConfig";
|
||||||
import { CWX_InraidConfig } from "./inraidConfig";
|
import { CWX_InraidConfig } from "./inraidConfig";
|
||||||
|
import { CWX_ItemsConfig } from "./itemsConfig";
|
||||||
|
|
||||||
|
|
||||||
class CWX_DebugTool implements IPostDBLoadMod
|
class CWX_DebugTool implements IPostDBLoadMod
|
||||||
@ -18,6 +19,7 @@ class CWX_DebugTool implements IPostDBLoadMod
|
|||||||
container.register<CWX_RagfairConfig>("CWX_RagfairConfig", CWX_RagfairConfig);
|
container.register<CWX_RagfairConfig>("CWX_RagfairConfig", CWX_RagfairConfig);
|
||||||
container.register<CWX_LocationConfig>("CWX_LocationConfig", CWX_LocationConfig);
|
container.register<CWX_LocationConfig>("CWX_LocationConfig", CWX_LocationConfig);
|
||||||
container.register<CWX_InraidConfig>("CWX_InraidConfig", CWX_InraidConfig);
|
container.register<CWX_InraidConfig>("CWX_InraidConfig", CWX_InraidConfig);
|
||||||
|
container.register<CWX_ItemsConfig>("CWX_ItemsConfig", CWX_ItemsConfig);
|
||||||
container.register<CWX_Logging>("CWX_Logging", CWX_Logging);
|
container.register<CWX_Logging>("CWX_Logging", CWX_Logging);
|
||||||
|
|
||||||
|
|
||||||
@ -25,6 +27,7 @@ class CWX_DebugTool implements IPostDBLoadMod
|
|||||||
container.resolve<CWX_RagfairConfig>("CWX_RagfairConfig").applyChanges();
|
container.resolve<CWX_RagfairConfig>("CWX_RagfairConfig").applyChanges();
|
||||||
container.resolve<CWX_LocationConfig>("CWX_LocationConfig").applyChanges();
|
container.resolve<CWX_LocationConfig>("CWX_LocationConfig").applyChanges();
|
||||||
container.resolve<CWX_InraidConfig>("CWX_InraidConfig").applyChanges();
|
container.resolve<CWX_InraidConfig>("CWX_InraidConfig").applyChanges();
|
||||||
|
container.resolve<CWX_ItemsConfig>("CWX_ItemsConfig").applyChanges();
|
||||||
|
|
||||||
if (container.resolve<CWX_ConfigHandler>("CWX_ConfigHandler").getConfig().showLogs)
|
if (container.resolve<CWX_ConfigHandler>("CWX_ConfigHandler").getConfig().showLogs)
|
||||||
{
|
{
|
||||||
|
@ -5,6 +5,7 @@ export interface IConfig
|
|||||||
ragfairConfig: ragfairConfig
|
ragfairConfig: ragfairConfig
|
||||||
locationConfig: locationConfig
|
locationConfig: locationConfig
|
||||||
inraidConfig: inraidConfig
|
inraidConfig: inraidConfig
|
||||||
|
itemsConfig: itemsConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface globalsConfig
|
export interface globalsConfig
|
||||||
@ -30,3 +31,9 @@ export interface inraidConfig
|
|||||||
{
|
{
|
||||||
turnPVEOff: boolean
|
turnPVEOff: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface itemsConfig
|
||||||
|
{
|
||||||
|
changeShrapProps: boolean
|
||||||
|
changeMaxAmmoForKS23: boolean
|
||||||
|
}
|
49
Live/CWX_DebugTool/src/itemsConfig.ts
Normal file
49
Live/CWX_DebugTool/src/itemsConfig.ts
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
import { inject, injectable } from "tsyringe";
|
||||||
|
|
||||||
|
import { CWX_ConfigHandler } from "./configHandler";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
|
import { IConfig } from "models/IConfig";
|
||||||
|
|
||||||
|
@injectable()
|
||||||
|
export class CWX_ItemsConfig
|
||||||
|
{
|
||||||
|
private tables: Record<string, ITemplateItem>;
|
||||||
|
private config: IConfig;
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
@inject("DatabaseServer") private databaseServer: DatabaseServer,
|
||||||
|
@inject("CWX_ConfigHandler") private configHandler: CWX_ConfigHandler
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
public applyChanges(): void
|
||||||
|
{
|
||||||
|
this.tables = this.databaseServer.getTables().templates.items;
|
||||||
|
this.config = this.configHandler.getConfig();
|
||||||
|
|
||||||
|
this.changeShrapProps();
|
||||||
|
this.changeMaxAmmoForKS23();
|
||||||
|
}
|
||||||
|
|
||||||
|
private changeShrapProps(): void
|
||||||
|
{
|
||||||
|
const shrap = this.tables["5e85a9a6eacf8c039e4e2ac1"];
|
||||||
|
|
||||||
|
if (this.config.itemsConfig.changeShrapProps)
|
||||||
|
{
|
||||||
|
shrap._props.Damage = 200;
|
||||||
|
shrap._props.InitialSpeed = 1000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private changeMaxAmmoForKS23(): void
|
||||||
|
{
|
||||||
|
const ks23 = this.tables["5f647d9f8499b57dc40ddb93"];
|
||||||
|
|
||||||
|
if (this.config.itemsConfig.changeMaxAmmoForKS23)
|
||||||
|
{
|
||||||
|
ks23._props.Cartridges[0]._max_count = 30;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -33,6 +33,11 @@ export class CWX_Logging
|
|||||||
|
|
||||||
// inraid
|
// inraid
|
||||||
this.TurnPVEOff();
|
this.TurnPVEOff();
|
||||||
|
|
||||||
|
// items
|
||||||
|
this.changeShrapProps();
|
||||||
|
this.changeMaxAmmoForKS23();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private NoFallDamage(): void
|
private NoFallDamage(): void
|
||||||
@ -63,7 +68,7 @@ export class CWX_Logging
|
|||||||
{
|
{
|
||||||
if (this.config.ragfairConfig.staticTrader)
|
if (this.config.ragfairConfig.staticTrader)
|
||||||
{
|
{
|
||||||
this.logger.info("Static Trader Activated")
|
this.logger.info("Static Trader Activated");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,7 +76,7 @@ export class CWX_Logging
|
|||||||
{
|
{
|
||||||
if (this.config.ragfairConfig.roublesOnly)
|
if (this.config.ragfairConfig.roublesOnly)
|
||||||
{
|
{
|
||||||
this.logger.info("Roubles Only Activated")
|
this.logger.info("Roubles Only Activated");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +84,7 @@ export class CWX_Logging
|
|||||||
{
|
{
|
||||||
if (this.config.ragfairConfig.disableBSGBlacklist)
|
if (this.config.ragfairConfig.disableBSGBlacklist)
|
||||||
{
|
{
|
||||||
this.logger.info("Disable BSG Blacklist Activated")
|
this.logger.info("Disable BSG Blacklist Activated");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,7 +92,7 @@ export class CWX_Logging
|
|||||||
{
|
{
|
||||||
if (this.config.locationConfig.turnLootOff)
|
if (this.config.locationConfig.turnLootOff)
|
||||||
{
|
{
|
||||||
this.logger.info("Turn Loot Off Activated")
|
this.logger.info("Turn Loot Off Activated");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,7 +100,23 @@ export class CWX_Logging
|
|||||||
{
|
{
|
||||||
if (this.config.inraidConfig.turnPVEOff)
|
if (this.config.inraidConfig.turnPVEOff)
|
||||||
{
|
{
|
||||||
this.logger.info("Turn PVE Off Activated")
|
this.logger.info("Turn PVE Off Activated");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private changeShrapProps():void
|
||||||
|
{
|
||||||
|
if (this.config.itemsConfig.changeShrapProps)
|
||||||
|
{
|
||||||
|
this.logger.info("Change Shrap Props Activated");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private changeMaxAmmoForKS23():void
|
||||||
|
{
|
||||||
|
if (this.config.itemsConfig.changeMaxAmmoForKS23)
|
||||||
|
{
|
||||||
|
this.logger.info("Change Max Ammo For KS23 Activated");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -7,6 +7,7 @@ import { CWX_Logging } from "./logging";
|
|||||||
import { CWX_RagfairConfig } from "./ragfairConfig";
|
import { CWX_RagfairConfig } from "./ragfairConfig";
|
||||||
import { CWX_LocationConfig } from "./locationConfig";
|
import { CWX_LocationConfig } from "./locationConfig";
|
||||||
import { CWX_InraidConfig } from "./inraidConfig";
|
import { CWX_InraidConfig } from "./inraidConfig";
|
||||||
|
import { CWX_ItemsConfig } from "./itemsConfig";
|
||||||
|
|
||||||
|
|
||||||
class CWX_DebugTool implements IPostDBLoadMod
|
class CWX_DebugTool implements IPostDBLoadMod
|
||||||
@ -18,6 +19,7 @@ class CWX_DebugTool implements IPostDBLoadMod
|
|||||||
container.register<CWX_RagfairConfig>("CWX_RagfairConfig", CWX_RagfairConfig);
|
container.register<CWX_RagfairConfig>("CWX_RagfairConfig", CWX_RagfairConfig);
|
||||||
container.register<CWX_LocationConfig>("CWX_LocationConfig", CWX_LocationConfig);
|
container.register<CWX_LocationConfig>("CWX_LocationConfig", CWX_LocationConfig);
|
||||||
container.register<CWX_InraidConfig>("CWX_InraidConfig", CWX_InraidConfig);
|
container.register<CWX_InraidConfig>("CWX_InraidConfig", CWX_InraidConfig);
|
||||||
|
container.register<CWX_ItemsConfig>("CWX_ItemsConfig", CWX_ItemsConfig);
|
||||||
container.register<CWX_Logging>("CWX_Logging", CWX_Logging);
|
container.register<CWX_Logging>("CWX_Logging", CWX_Logging);
|
||||||
|
|
||||||
|
|
||||||
@ -25,6 +27,7 @@ class CWX_DebugTool implements IPostDBLoadMod
|
|||||||
container.resolve<CWX_RagfairConfig>("CWX_RagfairConfig").applyChanges();
|
container.resolve<CWX_RagfairConfig>("CWX_RagfairConfig").applyChanges();
|
||||||
container.resolve<CWX_LocationConfig>("CWX_LocationConfig").applyChanges();
|
container.resolve<CWX_LocationConfig>("CWX_LocationConfig").applyChanges();
|
||||||
container.resolve<CWX_InraidConfig>("CWX_InraidConfig").applyChanges();
|
container.resolve<CWX_InraidConfig>("CWX_InraidConfig").applyChanges();
|
||||||
|
container.resolve<CWX_ItemsConfig>("CWX_ItemsConfig").applyChanges();
|
||||||
|
|
||||||
if (container.resolve<CWX_ConfigHandler>("CWX_ConfigHandler").getConfig().showLogs)
|
if (container.resolve<CWX_ConfigHandler>("CWX_ConfigHandler").getConfig().showLogs)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user