forked from CWX/CWX-mods
bump 3.4.0
This commit is contained in:
parent
4213fd746f
commit
a0b59a71fd
@ -5,7 +5,7 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace CWX_BushWhacker
|
namespace CWX_BushWhacker
|
||||||
{
|
{
|
||||||
[BepInPlugin("com.cwx.bushwhacker", "cwx-bushwhacker", "1.2.7")]
|
[BepInPlugin("com.cwx.bushwhacker", "cwx-bushwhacker", "1.2.8")]
|
||||||
public class BushWhacker : BaseUnityPlugin
|
public class BushWhacker : BaseUnityPlugin
|
||||||
{
|
{
|
||||||
public void Start()
|
public void Start()
|
||||||
|
Binary file not shown.
@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net472</TargetFramework>
|
<TargetFramework>net472</TargetFramework>
|
||||||
<AssemblyName>CWX-BushWhacker</AssemblyName>
|
<AssemblyName>CWX-BushWhacker</AssemblyName>
|
||||||
<Version>1.4.7</Version>
|
<Version>1.2.8</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
Binary file not shown.
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net472</TargetFramework>
|
<TargetFramework>net472</TargetFramework>
|
||||||
<Version>1.4.7</Version>
|
<Version>1.4.8</Version>
|
||||||
<AssemblyName>CWX-DeSharpener</AssemblyName>
|
<AssemblyName>CWX-DeSharpener</AssemblyName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace CWX_DeSharpener
|
namespace CWX_DeSharpener
|
||||||
{
|
{
|
||||||
[BepInPlugin("com.CWX.DeSharpener", "CWX-DeSharpener", "1.4.7")]
|
[BepInPlugin("com.CWX.DeSharpener", "CWX-DeSharpener", "1.4.8")]
|
||||||
public class DeSharpener : BaseUnityPlugin
|
public class DeSharpener : BaseUnityPlugin
|
||||||
{
|
{
|
||||||
private void Awake()
|
private void Awake()
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"quickScav": true
|
"quickScav": true
|
||||||
},
|
},
|
||||||
"ragfairConfig": {
|
"ragfairConfig": {
|
||||||
"staticTrader": true,
|
"staticTrader": false,
|
||||||
"roublesOnly": true,
|
"roublesOnly": true,
|
||||||
"disableBSGBlacklist": true
|
"disableBSGBlacklist": true
|
||||||
},
|
},
|
||||||
@ -14,18 +14,19 @@
|
|||||||
"turnLootOff": true
|
"turnLootOff": true
|
||||||
},
|
},
|
||||||
"inraidConfig": {
|
"inraidConfig": {
|
||||||
"turnPVEOff": true
|
"turnPVEOff": true,
|
||||||
|
"extendRaidTimes": true
|
||||||
},
|
},
|
||||||
"itemsConfig": {
|
"itemsConfig": {
|
||||||
"changeShrapProps": true,
|
"changeShrapProps": true,
|
||||||
"changeMaxAmmoForKS23": true,
|
"changeMaxAmmoForKS23": true,
|
||||||
"removeDevFromBlacklist": true
|
"removeDevFromBlacklist": true,
|
||||||
|
"inspectAllItems": true
|
||||||
},
|
},
|
||||||
"airdropConfig": {
|
"airdropConfig": {
|
||||||
"enableAllTheTime": true,
|
"enableAllTheTime": true,
|
||||||
"changeFlightHeight": true,
|
"changeFlightHeight": true,
|
||||||
"changeStartTime": true,
|
"changeStartTime": true,
|
||||||
"changePlaneVolume": true
|
"changePlaneVolume": true
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
9
Live/CWX_DebugTool/dist/config/config.json
vendored
9
Live/CWX_DebugTool/dist/config/config.json
vendored
@ -6,7 +6,7 @@
|
|||||||
"quickScav": true
|
"quickScav": true
|
||||||
},
|
},
|
||||||
"ragfairConfig": {
|
"ragfairConfig": {
|
||||||
"staticTrader": true,
|
"staticTrader": false,
|
||||||
"roublesOnly": true,
|
"roublesOnly": true,
|
||||||
"disableBSGBlacklist": true
|
"disableBSGBlacklist": true
|
||||||
},
|
},
|
||||||
@ -14,18 +14,19 @@
|
|||||||
"turnLootOff": true
|
"turnLootOff": true
|
||||||
},
|
},
|
||||||
"inraidConfig": {
|
"inraidConfig": {
|
||||||
"turnPVEOff": true
|
"turnPVEOff": true,
|
||||||
|
"extendRaidTimes": true
|
||||||
},
|
},
|
||||||
"itemsConfig": {
|
"itemsConfig": {
|
||||||
"changeShrapProps": true,
|
"changeShrapProps": true,
|
||||||
"changeMaxAmmoForKS23": true,
|
"changeMaxAmmoForKS23": true,
|
||||||
"removeDevFromBlacklist": true
|
"removeDevFromBlacklist": true,
|
||||||
|
"inspectAllItems": true
|
||||||
},
|
},
|
||||||
"airdropConfig": {
|
"airdropConfig": {
|
||||||
"enableAllTheTime": true,
|
"enableAllTheTime": true,
|
||||||
"changeFlightHeight": true,
|
"changeFlightHeight": true,
|
||||||
"changeStartTime": true,
|
"changeStartTime": true,
|
||||||
"changePlaneVolume": true
|
"changePlaneVolume": true
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
2
Live/CWX_DebugTool/dist/models/IConfig.ts
vendored
2
Live/CWX_DebugTool/dist/models/IConfig.ts
vendored
@ -31,6 +31,7 @@ export interface LocationConfig
|
|||||||
export interface InraidConfig
|
export interface InraidConfig
|
||||||
{
|
{
|
||||||
turnPVEOff: boolean
|
turnPVEOff: boolean
|
||||||
|
extendRaidTimes: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ItemsConfig
|
export interface ItemsConfig
|
||||||
@ -38,6 +39,7 @@ export interface ItemsConfig
|
|||||||
changeShrapProps: boolean
|
changeShrapProps: boolean
|
||||||
changeMaxAmmoForKS23: boolean
|
changeMaxAmmoForKS23: boolean
|
||||||
removeDevFromBlacklist: boolean
|
removeDevFromBlacklist: boolean
|
||||||
|
inspectAllItems: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AirdropConfig
|
export interface AirdropConfig
|
||||||
|
25
Live/CWX_DebugTool/dist/src/inraidConfig.ts
vendored
25
Live/CWX_DebugTool/dist/src/inraidConfig.ts
vendored
@ -3,19 +3,23 @@ import { inject, injectable } from "tsyringe";
|
|||||||
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
||||||
|
import { ILocationData, ILocations } from "@spt-aki/models/spt/server/ILocations";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { InraidConfig } from "models/IConfig";
|
||||||
|
|
||||||
import { CwxConfigHandler } from "./configHandler";
|
import { CwxConfigHandler } from "./configHandler";
|
||||||
import { InraidConfig } from "models/IConfig";
|
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
export class CwxInraidConfig
|
export class CwxInraidConfig
|
||||||
{
|
{
|
||||||
private tables: IInRaidConfig;
|
private tables: IInRaidConfig;
|
||||||
private config: InraidConfig;
|
private config: InraidConfig;
|
||||||
|
private locations: ILocations;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@inject("ConfigServer") private configServer: ConfigServer,
|
@inject("ConfigServer") private configServer: ConfigServer,
|
||||||
@inject("CwxConfigHandler") private configHandler: CwxConfigHandler
|
@inject("CwxConfigHandler") private configHandler: CwxConfigHandler,
|
||||||
|
@inject("DatabaseServer") private databaseServer: DatabaseServer
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -23,8 +27,10 @@ export class CwxInraidConfig
|
|||||||
{
|
{
|
||||||
this.config = this.configHandler.getConfig().inraidConfig;
|
this.config = this.configHandler.getConfig().inraidConfig;
|
||||||
this.tables = this.configServer.getConfig(ConfigTypes.IN_RAID);
|
this.tables = this.configServer.getConfig(ConfigTypes.IN_RAID);
|
||||||
|
this.locations = this.databaseServer.getTables().locations;
|
||||||
|
|
||||||
this.turnPVEOff();
|
this.turnPVEOff();
|
||||||
|
this.extendRaidTimes();
|
||||||
}
|
}
|
||||||
|
|
||||||
private turnPVEOff(): void
|
private turnPVEOff(): void
|
||||||
@ -34,4 +40,19 @@ export class CwxInraidConfig
|
|||||||
this.tables.raidMenuSettings.enablePve = false;
|
this.tables.raidMenuSettings.enablePve = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private extendRaidTimes(): void
|
||||||
|
{
|
||||||
|
if (this.config.extendRaidTimes)
|
||||||
|
{
|
||||||
|
for (const i in this.locations)
|
||||||
|
{
|
||||||
|
if (i !== "base")
|
||||||
|
{
|
||||||
|
this.locations[i].base.EscapeTimeLimit = 300;
|
||||||
|
this.locations[i].base.exit_access_time = 300;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
15
Live/CWX_DebugTool/dist/src/itemsConfig.ts
vendored
15
Live/CWX_DebugTool/dist/src/itemsConfig.ts
vendored
@ -31,6 +31,7 @@ export class CwxItemsConfig
|
|||||||
//this.changeShrapProps();
|
//this.changeShrapProps();
|
||||||
//this.changeMaxAmmoForKS23();
|
//this.changeMaxAmmoForKS23();
|
||||||
//this.removeDevFromBlacklist();
|
//this.removeDevFromBlacklist();
|
||||||
|
this.inspectAllItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -62,4 +63,18 @@ export class CwxItemsConfig
|
|||||||
this.itemConfig.blacklist.splice(this.itemConfig.blacklist.indexOf("58ac60eb86f77401897560ff"));
|
this.itemConfig.blacklist.splice(this.itemConfig.blacklist.indexOf("58ac60eb86f77401897560ff"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private inspectAllItems(): void
|
||||||
|
{
|
||||||
|
if (this.config.inspectAllItems)
|
||||||
|
{
|
||||||
|
for (const item in this.tables)
|
||||||
|
{
|
||||||
|
if (this.tables[item]._props.ExaminedByDefault)
|
||||||
|
{
|
||||||
|
this.tables[item]._props.ExaminedByDefault = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
18
Live/CWX_DebugTool/dist/src/logging.ts
vendored
18
Live/CWX_DebugTool/dist/src/logging.ts
vendored
@ -33,11 +33,13 @@ export class CwxLogging
|
|||||||
|
|
||||||
// inraid
|
// inraid
|
||||||
this.turnPVEOff();
|
this.turnPVEOff();
|
||||||
|
this.extendRaidTimes();
|
||||||
|
|
||||||
// items
|
// items
|
||||||
this.changeShrapProps();
|
this.changeShrapProps();
|
||||||
this.changeMaxAmmoForKS23();
|
this.changeMaxAmmoForKS23();
|
||||||
this.removeDevFromBlacklist();
|
this.removeDevFromBlacklist();
|
||||||
|
this.inspectAllItems();
|
||||||
|
|
||||||
// airdrops
|
// airdrops
|
||||||
this.enableAllTheTime();
|
this.enableAllTheTime();
|
||||||
@ -111,6 +113,14 @@ export class CwxLogging
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private extendRaidTimes()
|
||||||
|
{
|
||||||
|
if (this.config.inraidConfig.extendRaidTimes)
|
||||||
|
{
|
||||||
|
this.logger.info("Extend Raid Times Activated");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private changeShrapProps(): void
|
private changeShrapProps(): void
|
||||||
{
|
{
|
||||||
if (this.config.itemsConfig.changeShrapProps)
|
if (this.config.itemsConfig.changeShrapProps)
|
||||||
@ -135,6 +145,14 @@ export class CwxLogging
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private inspectAllItems(): void
|
||||||
|
{
|
||||||
|
if (this.config.itemsConfig.inspectAllItems)
|
||||||
|
{
|
||||||
|
this.logger.info("Inspect All Items Activated");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private enableAllTheTime(): void
|
private enableAllTheTime(): void
|
||||||
{
|
{
|
||||||
if (this.config.airdropConfig.enableAllTheTime)
|
if (this.config.airdropConfig.enableAllTheTime)
|
||||||
|
@ -31,6 +31,7 @@ export interface LocationConfig
|
|||||||
export interface InraidConfig
|
export interface InraidConfig
|
||||||
{
|
{
|
||||||
turnPVEOff: boolean
|
turnPVEOff: boolean
|
||||||
|
extendRaidTimes: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ItemsConfig
|
export interface ItemsConfig
|
||||||
@ -38,6 +39,7 @@ export interface ItemsConfig
|
|||||||
changeShrapProps: boolean
|
changeShrapProps: boolean
|
||||||
changeMaxAmmoForKS23: boolean
|
changeMaxAmmoForKS23: boolean
|
||||||
removeDevFromBlacklist: boolean
|
removeDevFromBlacklist: boolean
|
||||||
|
inspectAllItems: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AirdropConfig
|
export interface AirdropConfig
|
||||||
|
@ -3,19 +3,23 @@ import { inject, injectable } from "tsyringe";
|
|||||||
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
||||||
|
import { ILocationData, ILocations } from "@spt-aki/models/spt/server/ILocations";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { InraidConfig } from "models/IConfig";
|
||||||
|
|
||||||
import { CwxConfigHandler } from "./configHandler";
|
import { CwxConfigHandler } from "./configHandler";
|
||||||
import { InraidConfig } from "models/IConfig";
|
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
export class CwxInraidConfig
|
export class CwxInraidConfig
|
||||||
{
|
{
|
||||||
private tables: IInRaidConfig;
|
private tables: IInRaidConfig;
|
||||||
private config: InraidConfig;
|
private config: InraidConfig;
|
||||||
|
private locations: ILocations;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@inject("ConfigServer") private configServer: ConfigServer,
|
@inject("ConfigServer") private configServer: ConfigServer,
|
||||||
@inject("CwxConfigHandler") private configHandler: CwxConfigHandler
|
@inject("CwxConfigHandler") private configHandler: CwxConfigHandler,
|
||||||
|
@inject("DatabaseServer") private databaseServer: DatabaseServer
|
||||||
)
|
)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -23,8 +27,10 @@ export class CwxInraidConfig
|
|||||||
{
|
{
|
||||||
this.config = this.configHandler.getConfig().inraidConfig;
|
this.config = this.configHandler.getConfig().inraidConfig;
|
||||||
this.tables = this.configServer.getConfig(ConfigTypes.IN_RAID);
|
this.tables = this.configServer.getConfig(ConfigTypes.IN_RAID);
|
||||||
|
this.locations = this.databaseServer.getTables().locations;
|
||||||
|
|
||||||
this.turnPVEOff();
|
this.turnPVEOff();
|
||||||
|
this.extendRaidTimes();
|
||||||
}
|
}
|
||||||
|
|
||||||
private turnPVEOff(): void
|
private turnPVEOff(): void
|
||||||
@ -34,4 +40,19 @@ export class CwxInraidConfig
|
|||||||
this.tables.raidMenuSettings.enablePve = false;
|
this.tables.raidMenuSettings.enablePve = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private extendRaidTimes(): void
|
||||||
|
{
|
||||||
|
if (this.config.extendRaidTimes)
|
||||||
|
{
|
||||||
|
for (const i in this.locations)
|
||||||
|
{
|
||||||
|
if (i !== "base")
|
||||||
|
{
|
||||||
|
this.locations[i].base.EscapeTimeLimit = 300;
|
||||||
|
this.locations[i].base.exit_access_time = 300;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -31,6 +31,7 @@ export class CwxItemsConfig
|
|||||||
//this.changeShrapProps();
|
//this.changeShrapProps();
|
||||||
//this.changeMaxAmmoForKS23();
|
//this.changeMaxAmmoForKS23();
|
||||||
//this.removeDevFromBlacklist();
|
//this.removeDevFromBlacklist();
|
||||||
|
this.inspectAllItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -62,4 +63,15 @@ export class CwxItemsConfig
|
|||||||
this.itemConfig.blacklist.splice(this.itemConfig.blacklist.indexOf("58ac60eb86f77401897560ff"));
|
this.itemConfig.blacklist.splice(this.itemConfig.blacklist.indexOf("58ac60eb86f77401897560ff"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private inspectAllItems(): void
|
||||||
|
{
|
||||||
|
if (this.config.inspectAllItems)
|
||||||
|
{
|
||||||
|
for (const item in this.tables)
|
||||||
|
{
|
||||||
|
this.tables[item]._props.ExaminedByDefault = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -33,11 +33,13 @@ export class CwxLogging
|
|||||||
|
|
||||||
// inraid
|
// inraid
|
||||||
this.turnPVEOff();
|
this.turnPVEOff();
|
||||||
|
this.extendRaidTimes();
|
||||||
|
|
||||||
// items
|
// items
|
||||||
this.changeShrapProps();
|
this.changeShrapProps();
|
||||||
this.changeMaxAmmoForKS23();
|
this.changeMaxAmmoForKS23();
|
||||||
this.removeDevFromBlacklist();
|
this.removeDevFromBlacklist();
|
||||||
|
this.inspectAllItems();
|
||||||
|
|
||||||
// airdrops
|
// airdrops
|
||||||
this.enableAllTheTime();
|
this.enableAllTheTime();
|
||||||
@ -111,6 +113,14 @@ export class CwxLogging
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private extendRaidTimes()
|
||||||
|
{
|
||||||
|
if (this.config.inraidConfig.extendRaidTimes)
|
||||||
|
{
|
||||||
|
this.logger.info("Extend Raid Times Activated");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private changeShrapProps(): void
|
private changeShrapProps(): void
|
||||||
{
|
{
|
||||||
if (this.config.itemsConfig.changeShrapProps)
|
if (this.config.itemsConfig.changeShrapProps)
|
||||||
@ -135,6 +145,14 @@ export class CwxLogging
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private inspectAllItems(): void
|
||||||
|
{
|
||||||
|
if (this.config.itemsConfig.inspectAllItems)
|
||||||
|
{
|
||||||
|
this.logger.info("Inspect All Items Activated");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private enableAllTheTime(): void
|
private enableAllTheTime(): void
|
||||||
{
|
{
|
||||||
if (this.config.airdropConfig.enableAllTheTime)
|
if (this.config.airdropConfig.enableAllTheTime)
|
||||||
|
@ -8,7 +8,6 @@ import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
|||||||
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
||||||
import { IHideoutSettingsBase } from "../models/eft/hideout/IHideoutSettingsBase";
|
import { IHideoutSettingsBase } from "../models/eft/hideout/IHideoutSettingsBase";
|
||||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { ILanguageBase } from "../models/spt/server/ILocaleBase";
|
|
||||||
import { ISettingsBase } from "../models/spt/server/ISettingsBase";
|
import { ISettingsBase } from "../models/spt/server/ISettingsBase";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
@ -54,7 +53,7 @@ export declare class DataCallbacks {
|
|||||||
getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutArea[]>;
|
getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutArea[]>;
|
||||||
gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutProduction[]>;
|
gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutProduction[]>;
|
||||||
getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutScavCase[]>;
|
getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutScavCase[]>;
|
||||||
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILanguageBase[]>;
|
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, string>>;
|
||||||
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
|
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
|
||||||
getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,6 @@ export declare class DialogueCallbacks extends OnUpdate {
|
|||||||
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
friendRequest(url: string, request: IFriendRequestData, sessionID: string): INullResponseData;
|
friendRequest(url: string, request: IFriendRequestData, sessionID: string): INullResponseData;
|
||||||
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
|
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
|
||||||
onUpdate(timeSinceLastRun: number): boolean;
|
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,6 @@ import { OnLoad } from "../di/OnLoad";
|
|||||||
export declare class HandbookCallbacks extends OnLoad {
|
export declare class HandbookCallbacks extends OnLoad {
|
||||||
protected handbookController: HandbookController;
|
protected handbookController: HandbookController;
|
||||||
constructor(handbookController: HandbookController);
|
constructor(handbookController: HandbookController);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,6 @@ export declare class HideoutCallbacks extends OnUpdate {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
onUpdate(timeSinceLastRun: number): boolean;
|
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import { HttpServer } from "../servers/HttpServer";
|
|||||||
export declare class HttpCallbacks extends OnLoad {
|
export declare class HttpCallbacks extends OnLoad {
|
||||||
protected httpServer: HttpServer;
|
protected httpServer: HttpServer;
|
||||||
constructor(httpServer: HttpServer);
|
constructor(httpServer: HttpServer);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
getImage(): string;
|
getImage(): string;
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,6 @@ export declare class InsuranceCallbacks extends OnUpdate {
|
|||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
onUpdate(secondsSinceLastRun: number): boolean;
|
onUpdate(secondsSinceLastRun: number): Promise<boolean>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ import { PostAkiModLoader } from "../loaders/PostAkiModLoader";
|
|||||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { HttpFileUtil } from "../utils/HttpFileUtil";
|
import { HttpFileUtil } from "../utils/HttpFileUtil";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
declare class ModCallbacks extends OnLoad {
|
declare class ModCallbacks extends OnLoad {
|
||||||
@ -10,10 +11,11 @@ declare class ModCallbacks extends OnLoad {
|
|||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected httpFileUtil: HttpFileUtil;
|
protected httpFileUtil: HttpFileUtil;
|
||||||
protected postAkiModLoader: PostAkiModLoader;
|
protected postAkiModLoader: PostAkiModLoader;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, postAkiModLoader: PostAkiModLoader, configServer: ConfigServer);
|
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, postAkiModLoader: PostAkiModLoader, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
sendBundle(sessionID: string, req: any, resp: any, body: any): void;
|
sendBundle(sessionID: string, req: any, resp: any, body: any): void;
|
||||||
getBundles(url: string, info: any, sessionID: string): string;
|
getBundles(url: string, info: any, sessionID: string): string;
|
||||||
|
@ -3,6 +3,6 @@ import { OnLoad } from "../di/OnLoad";
|
|||||||
export declare class PresetCallbacks extends OnLoad {
|
export declare class PresetCallbacks extends OnLoad {
|
||||||
protected presetController: PresetController;
|
protected presetController: PresetController;
|
||||||
constructor(presetController: PresetController);
|
constructor(presetController: PresetController);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,6 @@ import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferReque
|
|||||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||||
import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData";
|
import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData";
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { RagfairServer } from "../servers/RagfairServer";
|
import { RagfairServer } from "../servers/RagfairServer";
|
||||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||||
@ -24,14 +23,13 @@ import { JsonUtil } from "../utils/JsonUtil";
|
|||||||
*/
|
*/
|
||||||
export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected logger: ILogger;
|
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected ragfairServer: RagfairServer;
|
protected ragfairServer: RagfairServer;
|
||||||
protected ragfairController: RagfairController;
|
protected ragfairController: RagfairController;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
|
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>;
|
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>;
|
||||||
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
|
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
|
||||||
@ -39,6 +37,6 @@ export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
|||||||
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
onUpdate(timeSinceLastRun: number): boolean;
|
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||||
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
|
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import { SaveServer } from "../servers/SaveServer";
|
|||||||
export declare class SaveCallbacks extends OnLoadOnUpdate {
|
export declare class SaveCallbacks extends OnLoadOnUpdate {
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
constructor(saveServer: SaveServer);
|
constructor(saveServer: SaveServer);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
onUpdate(secondsSinceLastRun: number): boolean;
|
onUpdate(secondsSinceLastRun: number): Promise<boolean>;
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,8 @@ export declare class TraderCallbacks extends OnLoadOnUpdate {
|
|||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected traderController: TraderController;
|
protected traderController: TraderController;
|
||||||
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);
|
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
onUpdate(): boolean;
|
onUpdate(): Promise<boolean>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>;
|
getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>;
|
||||||
/**
|
/**
|
||||||
|
@ -57,6 +57,12 @@ export declare class BotController {
|
|||||||
* @returns IBotBase array
|
* @returns IBotBase array
|
||||||
*/
|
*/
|
||||||
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
||||||
|
/**
|
||||||
|
* Get the difficulty passed in, if its not "asoline", get selected difficulty from config
|
||||||
|
* @param requestedDifficulty
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getPMCDifficulty(requestedDifficulty: string): string;
|
||||||
/**
|
/**
|
||||||
* Get the max number of bots allowed on a map
|
* Get the max number of bots allowed on a map
|
||||||
* Looks up location player is entering when getting cap value
|
* Looks up location player is entering when getting cap value
|
||||||
|
@ -8,13 +8,15 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
|||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
export declare class CustomizationController {
|
export declare class CustomizationController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper);
|
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
||||||
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
||||||
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -1,59 +1,37 @@
|
|||||||
import { ApplicationContext } from "../context/ApplicationContext";
|
import { ApplicationContext } from "../context/ApplicationContext";
|
||||||
import { GameEventHelper } from "../helpers/GameEventHelper";
|
|
||||||
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||||
import { Config } from "../models/eft/common/IGlobals";
|
|
||||||
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
|
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
|
||||||
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||||
import { IServerDetails } from "../models/eft/game/IServerDetails";
|
import { IServerDetails } from "../models/eft/game/IServerDetails";
|
||||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||||
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
||||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||||
import { ISeasonalEvent } from "../models/spt/config/ISeasonalEventConfig";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||||
import { Watermark } from "../utils/Watermark";
|
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||||
export declare class GameController {
|
export declare class GameController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected watermark: Watermark;
|
|
||||||
protected httpServerHelper: HttpServerHelper;
|
protected httpServerHelper: HttpServerHelper;
|
||||||
protected localeService: LocaleService;
|
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected gameEventHelper: GameEventHelper;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected applicationContext: ApplicationContext;
|
protected applicationContext: ApplicationContext;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
protected coreConfig: ICoreConfig;
|
protected coreConfig: ICoreConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, watermark: Watermark, httpServerHelper: HttpServerHelper, localeService: LocaleService, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, gameEventHelper: GameEventHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||||
/**
|
/**
|
||||||
* Check if current date falls inside any of the seasons events pased in, if so, handle them
|
* Blank out the "test" mail message from prapor
|
||||||
* @param seasonalEvents events to check for
|
|
||||||
*/
|
*/
|
||||||
protected checkForAndEnableSeasonalEvents(seasonalEvents: ISeasonalEvent[]): void;
|
protected removePraporTestMessage(): void;
|
||||||
/**
|
|
||||||
* Make adjusted to server code based on the name of the event passed in
|
|
||||||
* @param globalConfig globals.json
|
|
||||||
* @param eventName Name of the event to enable. e.g. Christmas
|
|
||||||
*/
|
|
||||||
protected updateGlobalEvents(globalConfig: Config, eventName: string): void;
|
|
||||||
/**
|
|
||||||
* Read in data from seasonalEvents.json and add found equipment items to bots
|
|
||||||
* @param eventName Name of the event to read equipment in from config
|
|
||||||
*/
|
|
||||||
protected addEventGearToScavs(eventName: string): void;
|
|
||||||
/**
|
|
||||||
* Set Khorovod(dancing tree) chance to 100% on all maps that support it
|
|
||||||
*/
|
|
||||||
protected enableDancingTree(): void;
|
|
||||||
/**
|
/**
|
||||||
* Make non-trigger-spawned raiders spawn earlier + always
|
* Make non-trigger-spawned raiders spawn earlier + always
|
||||||
*/
|
*/
|
||||||
@ -61,6 +39,5 @@ export declare class GameController {
|
|||||||
protected logProfileDetails(fullProfile: IAkiProfile): void;
|
protected logProfileDetails(fullProfile: IAkiProfile): void;
|
||||||
getGameConfig(sessionID: string): IGameConfigResponse;
|
getGameConfig(sessionID: string): IGameConfigResponse;
|
||||||
getServer(): IServerDetails[];
|
getServer(): IServerDetails[];
|
||||||
protected addPumpkinsToScavBackpacks(): void;
|
|
||||||
getValidGameVersion(): ICheckVersionResponse;
|
getValidGameVersion(): ICheckVersionResponse;
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,25 @@
|
|||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
|
||||||
import { PaymentService } from "../services/PaymentService";
|
|
||||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
|
||||||
import { HealthHelper } from "../helpers/HealthHelper";
|
import { HealthHelper } from "../helpers/HealthHelper";
|
||||||
|
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IHealthTreatmentRequestData } from "../models/eft/health/IHealthTreatmentRequestData";
|
import { IHealthTreatmentRequestData } from "../models/eft/health/IHealthTreatmentRequestData";
|
||||||
import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestData";
|
import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestData";
|
||||||
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
|
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
|
||||||
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { PaymentService } from "../services/PaymentService";
|
||||||
export declare class HealthController {
|
export declare class HealthController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected healthHelper: HealthHelper;
|
protected healthHelper: HealthHelper;
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, healthHelper: HealthHelper);
|
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper);
|
||||||
/**
|
/**
|
||||||
* stores in-raid player health
|
* stores in-raid player health
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
|
@ -18,7 +18,9 @@ import { ConfigServer } from "../servers/ConfigServer";
|
|||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
|
import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
|
||||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||||
|
import { CustomLocationWaveService } from "../services/CustomLocationWaveService";
|
||||||
import { MatchLocationService } from "../services/MatchLocationService";
|
import { MatchLocationService } from "../services/MatchLocationService";
|
||||||
|
import { OpenZoneService } from "../services/OpenZoneService";
|
||||||
import { ProfileSnapshotService } from "../services/ProfileSnapshotService";
|
import { ProfileSnapshotService } from "../services/ProfileSnapshotService";
|
||||||
export declare class MatchController {
|
export declare class MatchController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
@ -29,12 +31,14 @@ export declare class MatchController {
|
|||||||
protected botLootCacheService: BotLootCacheService;
|
protected botLootCacheService: BotLootCacheService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected profileSnapshotService: ProfileSnapshotService;
|
protected profileSnapshotService: ProfileSnapshotService;
|
||||||
|
protected customLocationWaveService: CustomLocationWaveService;
|
||||||
|
protected openZoneService: OpenZoneService;
|
||||||
protected botGenerationCacheService: BotGenerationCacheService;
|
protected botGenerationCacheService: BotGenerationCacheService;
|
||||||
protected applicationContext: ApplicationContext;
|
protected applicationContext: ApplicationContext;
|
||||||
protected matchConfig: IMatchConfig;
|
protected matchConfig: IMatchConfig;
|
||||||
protected inraidConfig: IInRaidConfig;
|
protected inraidConfig: IInRaidConfig;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext);
|
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext);
|
||||||
getEnabled(): boolean;
|
getEnabled(): boolean;
|
||||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||||
|
@ -5,6 +5,7 @@ import { QuestConditionHelper } from "../helpers/QuestConditionHelper";
|
|||||||
import { QuestHelper } from "../helpers/QuestHelper";
|
import { QuestHelper } from "../helpers/QuestHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
import { IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
import { IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
||||||
|
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||||
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
||||||
@ -15,6 +16,7 @@ import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
import { LocaleService } from "../services/LocaleService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { PlayerService } from "../services/PlayerService";
|
import { PlayerService } from "../services/PlayerService";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
export declare class QuestController {
|
export declare class QuestController {
|
||||||
@ -29,9 +31,10 @@ export declare class QuestController {
|
|||||||
protected questConditionHelper: QuestConditionHelper;
|
protected questConditionHelper: QuestConditionHelper;
|
||||||
protected playerService: PlayerService;
|
protected playerService: PlayerService;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get all quests visible to player
|
* Get all quests visible to player
|
||||||
* Exclude quests with incomplete preconditions (level/loyalty)
|
* Exclude quests with incomplete preconditions (level/loyalty)
|
||||||
@ -56,6 +59,13 @@ export declare class QuestController {
|
|||||||
*/
|
*/
|
||||||
acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Look for an accepted quest inside player profile, return matching
|
||||||
|
* @param pmcData Profile to search through
|
||||||
|
* @param acceptedQuest Quest to search for
|
||||||
|
* @returns IRepeatableQuest
|
||||||
|
*/
|
||||||
|
protected getRepeatableQuestFromProfile(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData): IRepeatableQuest;
|
||||||
/**
|
/**
|
||||||
* Update completed quest in profile
|
* Update completed quest in profile
|
||||||
* Add newly unlocked quests to profile
|
* Add newly unlocked quests to profile
|
||||||
|
@ -67,16 +67,16 @@ export declare class RagfairController {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult;
|
getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult;
|
||||||
/**
|
/**
|
||||||
* Get offers for the client based on type of search being performed
|
* Get offers for the client based on type of search being performed
|
||||||
* @param searchRequest Client search request data
|
* @param searchRequest Client search request data
|
||||||
* @param itemsToAdd
|
* @param itemsToAdd
|
||||||
* @param assorts
|
* @param traderAssorts Trader assorts
|
||||||
* @param pmcProfile Player profile
|
* @param pmcProfile Player profile
|
||||||
* @returns array of offers
|
* @returns array of offers
|
||||||
*/
|
*/
|
||||||
protected getOffersForSearchType(searchRequest: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
protected getOffersForSearchType(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
||||||
/**
|
/**
|
||||||
* Get categories for the type of search being performed, linked/required/all
|
* Get categories for the type of search being performed, linked/required/all
|
||||||
* @param searchRequest Client search request data
|
* @param searchRequest Client search request data
|
||||||
|
@ -98,6 +98,13 @@ export declare class RepeatableQuestController {
|
|||||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
|
/**
|
||||||
|
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
||||||
|
* @param repeatableConfig daily/weekly config
|
||||||
|
* @param pmcData Profile to search
|
||||||
|
* @returns IPmcDataRepeatableQuest
|
||||||
|
*/
|
||||||
|
protected getRepeatableQuestSubTypeFromProfile(repeatableConfig: IRepeatableQuestConfig, pmcData: IPmcData): IPmcDataRepeatableQuest;
|
||||||
/**
|
/**
|
||||||
* This method is called by GetClientRepeatableQuests and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
|
* This method is called by GetClientRepeatableQuests and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
|
||||||
* It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest
|
* It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest
|
||||||
|
2
Live/CWX_DebugTool/types/di/OnLoad.d.ts
vendored
2
Live/CWX_DebugTool/types/di/OnLoad.d.ts
vendored
@ -1,4 +1,4 @@
|
|||||||
export declare class OnLoad {
|
export declare class OnLoad {
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { OnLoad } from "./OnLoad";
|
import { OnLoad } from "./OnLoad";
|
||||||
import { OnUpdate } from "./OnUpdate";
|
import { OnUpdate } from "./OnUpdate";
|
||||||
export declare class OnLoadOnUpdate implements OnLoad, OnUpdate {
|
export declare class OnLoadOnUpdate implements OnLoad, OnUpdate {
|
||||||
onUpdate(timeSinceLastRun: number): boolean;
|
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
|
2
Live/CWX_DebugTool/types/di/OnUpdate.d.ts
vendored
2
Live/CWX_DebugTool/types/di/OnUpdate.d.ts
vendored
@ -1,4 +1,4 @@
|
|||||||
export declare class OnUpdate {
|
export declare class OnUpdate {
|
||||||
onUpdate(timeSinceLastRun: number): boolean;
|
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
|
181
Live/CWX_DebugTool/types/generators/BotEquipmentModGenerator.d.ts
vendored
Normal file
181
Live/CWX_DebugTool/types/generators/BotEquipmentModGenerator.d.ts
vendored
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||||
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
|
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
|
||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { ProbabilityHelper } from "../helpers/ProbabilityHelper";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { Mods, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { ITemplateItem, Slot } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
||||||
|
import { BotEquipmentModPoolService } from "../services/BotEquipmentModPoolService";
|
||||||
|
import { BotModLimits, BotWeaponModLimitService } from "../services/BotWeaponModLimitService";
|
||||||
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
export declare class BotEquipmentModGenerator {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected probabilityHelper: ProbabilityHelper;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected botEquipmentFilterService: BotEquipmentFilterService;
|
||||||
|
protected itemFilterService: ItemFilterService;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected botWeaponModLimitService: BotWeaponModLimitService;
|
||||||
|
protected botHelper: BotHelper;
|
||||||
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
|
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
|
protected botEquipmentModPoolService: BotEquipmentModPoolService;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected botConfig: IBotConfig;
|
||||||
|
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Check mods are compatible and add to array
|
||||||
|
* @param equipment Equipment item to add mods to
|
||||||
|
* @param modPool Mod list to choose frm
|
||||||
|
* @param parentId parentid of item to add mod to
|
||||||
|
* @param parentTemplate template objet of item to add mods to
|
||||||
|
* @param modSpawnChances dictionary of mod items and their chance to spawn for this bot type
|
||||||
|
* @param botRole the bot role being generated for
|
||||||
|
* @param forceSpawn should this mod be forced to spawn
|
||||||
|
* @returns Item + compatible mods as an array
|
||||||
|
*/
|
||||||
|
generateModsForEquipment(equipment: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, botRole: string, forceSpawn?: boolean): Item[];
|
||||||
|
/**
|
||||||
|
* Add mods to a weapon using the provided mod pool
|
||||||
|
* @param sessionId session id
|
||||||
|
* @param weapon Weapon to add mods to
|
||||||
|
* @param modPool Pool of compatible mods to attach to weapon
|
||||||
|
* @param weaponParentId parentId of weapon
|
||||||
|
* @param parentWeaponTemplate Weapon which mods will be generated on
|
||||||
|
* @param modSpawnChances Mod spawn chances
|
||||||
|
* @param ammoTpl Ammo tpl to use when generating magazines/cartridges
|
||||||
|
* @param botRole Role of bot weapon is generated for
|
||||||
|
* @param botLevel lvel of the bot weapon is being generated for
|
||||||
|
* @param modLimits limits placed on certian mod types per gun
|
||||||
|
* @param botEquipmentRole role of bot when accessing bot.json equipment config settings
|
||||||
|
* @returns Weapon + mods array
|
||||||
|
*/
|
||||||
|
generateModsForWeapon(sessionId: string, weapon: Item[], modPool: Mods, weaponParentId: string, parentWeaponTemplate: ITemplateItem, modSpawnChances: ModsChances, ammoTpl: string, botRole: string, botLevel: number, modLimits: BotModLimits, botEquipmentRole: string): Item[];
|
||||||
|
/**
|
||||||
|
* Get a Slot property for an item (chamber/cartridge/slot)
|
||||||
|
* @param modSlot e.g patron_in_weapon
|
||||||
|
* @param parentTemplate item template
|
||||||
|
* @returns Slot item
|
||||||
|
*/
|
||||||
|
protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot;
|
||||||
|
/**
|
||||||
|
* randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot
|
||||||
|
* never return true for an item that has 0% spawn chance
|
||||||
|
* @param itemSlot slot the item sits in
|
||||||
|
* @param modSlot slot the mod sits in
|
||||||
|
* @param modSpawnChances Chances for various mod spawns
|
||||||
|
* @returns boolean true if it should spawn
|
||||||
|
*/
|
||||||
|
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param modSlot Slot mod will fit into
|
||||||
|
* @param isRandomisableSlot Will generate a randomised mod pool if true
|
||||||
|
* @param modsParent Parent slot the item will be a part of
|
||||||
|
* @param botEquipBlacklist Blacklist to prevent mods from being picked
|
||||||
|
* @param itemModPool Pool of items to pick from
|
||||||
|
* @param weapon array with only weapon tpl in it, ready for mods to be added
|
||||||
|
* @param ammoTpl ammo tpl to use if slot requires a cartridge to be added (e.g. mod_magazine)
|
||||||
|
* @param parentTemplate Parent item the mod will go into
|
||||||
|
* @returns ITemplateItem
|
||||||
|
*/
|
||||||
|
protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record<string, string[]>, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record<string, string[]>, weapon: Item[], ammoTpl: string, parentTemplate: ITemplateItem): [boolean, ITemplateItem];
|
||||||
|
/**
|
||||||
|
* Create a mod item with parameters as properties
|
||||||
|
* @param modId _id
|
||||||
|
* @param modTpl _tpl
|
||||||
|
* @param parentId parentId
|
||||||
|
* @param modSlot slotId
|
||||||
|
* @param modTemplate Used to add additional properites in the upd object
|
||||||
|
* @returns Item object
|
||||||
|
*/
|
||||||
|
protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item;
|
||||||
|
/**
|
||||||
|
* Get a list of containers that hold ammo
|
||||||
|
* e.g. mod_magazine / patron_in_weapon_000
|
||||||
|
* @returns string array
|
||||||
|
*/
|
||||||
|
protected getAmmoContainers(): string[];
|
||||||
|
/**
|
||||||
|
* Get a random mod from an items compatible mods Filter array
|
||||||
|
* @param modTpl ???? default value to return if nothing found
|
||||||
|
* @param parentSlot item mod will go into, used to get combatible items
|
||||||
|
* @param modSlot Slot to get mod to fill
|
||||||
|
* @param items items to ensure picked mod is compatible with
|
||||||
|
* @returns item tpl
|
||||||
|
*/
|
||||||
|
protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
|
||||||
|
/**
|
||||||
|
* Log errors if mod is not compatible with slot
|
||||||
|
* @param modToAdd template of mod to check
|
||||||
|
* @param itemSlot slot the item will be placed in
|
||||||
|
* @param modSlot slot the mod will fill
|
||||||
|
* @param parentTemplate tempalte of the mods parent item
|
||||||
|
* @returns true if valid
|
||||||
|
*/
|
||||||
|
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], itemSlot: Slot, modSlot: string, parentTemplate: ITemplateItem): boolean;
|
||||||
|
/**
|
||||||
|
* Find mod tpls of a provided type and add to modPool
|
||||||
|
* @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope)
|
||||||
|
* @param modTemplate db object for modItem we get compatible mods from
|
||||||
|
* @param modPool Pool of mods we are adding to
|
||||||
|
*/
|
||||||
|
protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void;
|
||||||
|
/**
|
||||||
|
* Get the possible items that fit a slot
|
||||||
|
* @param parentItemId item tpl to get compatible items for
|
||||||
|
* @param modSlot Slot item should fit in
|
||||||
|
* @param botEquipBlacklist equipment that should not be picked
|
||||||
|
* @returns array of compatible items for that slot
|
||||||
|
*/
|
||||||
|
protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[];
|
||||||
|
/**
|
||||||
|
* Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist
|
||||||
|
* @param allowedMods base mods to filter
|
||||||
|
* @param botEquipBlacklist equipment blacklist
|
||||||
|
* @param modSlot slot mods belong to
|
||||||
|
* @returns Filtered array of mod tpls
|
||||||
|
*/
|
||||||
|
protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[];
|
||||||
|
/**
|
||||||
|
* With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines.
|
||||||
|
* Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0.
|
||||||
|
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
||||||
|
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
||||||
|
* @param items The items where the CylinderMagazine's camora are appended to
|
||||||
|
* @param modPool modPool which should include available cartrigdes
|
||||||
|
* @param parentId The CylinderMagazine's UID
|
||||||
|
* @param parentTemplate The CylinderMagazine's template
|
||||||
|
*/
|
||||||
|
protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void;
|
||||||
|
/**
|
||||||
|
* Take a record of camoras and merge the compatable shells into one array
|
||||||
|
* @param camorasWithShells camoras we want to merge into one array
|
||||||
|
* @returns string array of shells fro luitple camora sources
|
||||||
|
*/
|
||||||
|
protected mergeCamoraPoolsTogether(camorasWithShells: Record<string, string[]>): string[];
|
||||||
|
/**
|
||||||
|
* Filter out non-whitelisted weapon scopes
|
||||||
|
* @param weapon Weapon scopes will be added to
|
||||||
|
* @param scopes Full scope pool
|
||||||
|
* @param botWeaponSightWhitelist whitelist of scope types by weapon base type
|
||||||
|
* @returns array of scope tpls that have been filtered
|
||||||
|
*/
|
||||||
|
protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record<string, string[]>): string[];
|
||||||
|
}
|
@ -1,16 +1,16 @@
|
|||||||
import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
|
import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
|
||||||
import { BotHelper } from "../helpers/BotHelper";
|
import { BotHelper } from "../helpers/BotHelper";
|
||||||
import { GameEventHelper } from "../helpers/GameEventHelper";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||||
import { Health as PmcHealth, IBotBase, Skills } from "../models/eft/common/tables/IBotBase";
|
import { Health as PmcHealth, IBotBase, Skills } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Health, IBotType, Inventory } from "../models/eft/common/tables/IBotType";
|
import { Health, IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
||||||
|
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
@ -29,10 +29,10 @@ export declare class BotGenerator {
|
|||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
protected botDifficultyHelper: BotDifficultyHelper;
|
protected botDifficultyHelper: BotDifficultyHelper;
|
||||||
protected gameEventHelper: GameEventHelper;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Generate a player scav bot object
|
* Generate a player scav bot object
|
||||||
* @param role e.g. assault / pmcbot
|
* @param role e.g. assault / pmcbot
|
||||||
@ -42,23 +42,12 @@ export declare class BotGenerator {
|
|||||||
*/
|
*/
|
||||||
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
||||||
/**
|
/**
|
||||||
* Generate an array of bot objects based on a condition for a raid with
|
* Create x number of bots of the type/side/difficulty defined in botGenerationDetails
|
||||||
* @param sessionId session id
|
* @param sessionId Session id
|
||||||
* @param botGenerationDetails details on how to generate the bots
|
* @param botGenerationDetails details on how to generate bots
|
||||||
* @returns Generated bots in array
|
* @returns array of bots
|
||||||
*/
|
*/
|
||||||
generateByCondition(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase[];
|
prepareAndGenerateBots(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase[];
|
||||||
/**
|
|
||||||
* Get the PMCs wildSpawnType value
|
|
||||||
* @param role "usec" / "bear"
|
|
||||||
* @returns wildSpawnType value as string
|
|
||||||
*/
|
|
||||||
protected getPmcRoleByDescription(role: string): string;
|
|
||||||
/**
|
|
||||||
* Get a randomised PMC side based on bot config value 'isUsec'
|
|
||||||
* @returns pmc side as string
|
|
||||||
*/
|
|
||||||
protected getRandomisedPmcSide(): string;
|
|
||||||
/**
|
/**
|
||||||
* Get a clone of the database\bots\base.json file
|
* Get a clone of the database\bots\base.json file
|
||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
@ -94,11 +83,6 @@ export declare class BotGenerator {
|
|||||||
*/
|
*/
|
||||||
protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth;
|
protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth;
|
||||||
protected generateSkills(skillsObj: Skills): Skills;
|
protected generateSkills(skillsObj: Skills): Skills;
|
||||||
/**
|
|
||||||
* Iterate through bots inventory and loot to find and remove christmas items (as defined in GameEventHelper)
|
|
||||||
* @param nodeInventory Bots inventory to iterate over
|
|
||||||
*/
|
|
||||||
protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void;
|
|
||||||
/**
|
/**
|
||||||
* Generate a random Id for a bot and apply to bots _id and aid value
|
* Generate a random Id for a bot and apply to bots _id and aid value
|
||||||
* @param bot bot to update
|
* @param bot bot to update
|
||||||
@ -106,12 +90,6 @@ export declare class BotGenerator {
|
|||||||
*/
|
*/
|
||||||
protected generateId(bot: IBotBase): IBotBase;
|
protected generateId(bot: IBotBase): IBotBase;
|
||||||
protected generateInventoryID(profile: IBotBase): IBotBase;
|
protected generateInventoryID(profile: IBotBase): IBotBase;
|
||||||
/**
|
|
||||||
* Get the difficulty passed in, if its not "asoline", get selected difficulty from config
|
|
||||||
* @param requestedDifficulty
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
protected getPMCDifficulty(requestedDifficulty: string): string;
|
|
||||||
/**
|
/**
|
||||||
* Add a side-specific (usec/bear) dogtag item to a bots inventory
|
* Add a side-specific (usec/bear) dogtag item to a bots inventory
|
||||||
* @param bot bot to add dogtag to
|
* @param bot bot to add dogtag to
|
||||||
|
@ -4,13 +4,15 @@ import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
|||||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||||
import { Chances, Generation, IBotType, Inventory, Mods } from "../models/eft/common/tables/IBotType";
|
import { Chances, Generation, IBotType, Inventory, Mods } from "../models/eft/common/tables/IBotType";
|
||||||
import { EquipmentSlots } from "../models/enums/EquipmentSlots";
|
import { EquipmentSlots } from "../models/enums/EquipmentSlots";
|
||||||
import { IBotConfig, RandomisationDetails } from "../models/spt/config/IBotConfig";
|
import { EquipmentFilterDetails, IBotConfig, RandomisationDetails } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { BotEquipmentModPoolService } from "../services/BotEquipmentModPoolService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { BotEquipmentModGenerator } from "./BotEquipmentModGenerator";
|
||||||
import { BotLootGenerator } from "./BotLootGenerator";
|
import { BotLootGenerator } from "./BotLootGenerator";
|
||||||
import { BotWeaponGenerator } from "./BotWeaponGenerator";
|
import { BotWeaponGenerator } from "./BotWeaponGenerator";
|
||||||
export declare class BotInventoryGenerator {
|
export declare class BotInventoryGenerator {
|
||||||
@ -24,9 +26,11 @@ export declare class BotInventoryGenerator {
|
|||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected botEquipmentModPoolService: BotEquipmentModPoolService;
|
||||||
|
protected botEquipmentModGenerator: BotEquipmentModGenerator;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Add equipment/weapons/loot to bot
|
* Add equipment/weapons/loot to bot
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -62,6 +66,13 @@ export declare class BotInventoryGenerator {
|
|||||||
* @param randomisationDetails settings from bot.json to adjust how item is generated
|
* @param randomisationDetails settings from bot.json to adjust how item is generated
|
||||||
*/
|
*/
|
||||||
protected generateEquipment(equipmentSlot: string, equipmentPool: Record<string, number>, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory, randomisationDetails: RandomisationDetails): void;
|
protected generateEquipment(equipmentSlot: string, equipmentPool: Record<string, number>, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory, randomisationDetails: RandomisationDetails): void;
|
||||||
|
/**
|
||||||
|
* Get all possible mods for item and filter down based on equipment blacklist from bot.json config
|
||||||
|
* @param itemTpl Item mod pool is being retreived and filtered
|
||||||
|
* @param equipmentBlacklist blacklist to filter mod pool with
|
||||||
|
* @returns Filtered pool of mods
|
||||||
|
*/
|
||||||
|
protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record<string, string[]>;
|
||||||
/**
|
/**
|
||||||
* Work out what weapons bot should have equipped and add them to bot inventory
|
* Work out what weapons bot should have equipped and add them to bot inventory
|
||||||
* @param templateInventory bot/x.json data from db
|
* @param templateInventory bot/x.json data from db
|
||||||
|
@ -12,10 +12,12 @@ import { IBotConfig } from "../models/spt/config/IBotConfig";
|
|||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { BotWeaponModLimitService } from "../services/BotWeaponModLimitService";
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { BotEquipmentModGenerator } from "./BotEquipmentModGenerator";
|
||||||
import { IInventoryMagGen } from "./weapongen/IInventoryMagGen";
|
import { IInventoryMagGen } from "./weapongen/IInventoryMagGen";
|
||||||
export declare class BotWeaponGenerator {
|
export declare class BotWeaponGenerator {
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
@ -28,11 +30,13 @@ export declare class BotWeaponGenerator {
|
|||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||||
|
protected botWeaponModLimitService: BotWeaponModLimitService;
|
||||||
|
protected botEquipmentModGenerator: BotEquipmentModGenerator;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected inventoryMagGenComponents: IInventoryMagGen[];
|
protected inventoryMagGenComponents: IInventoryMagGen[];
|
||||||
protected readonly modMagazineSlotId = "mod_magazine";
|
protected readonly modMagazineSlotId = "mod_magazine";
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, localisationService: LocalisationService, inventoryMagGenComponents: IInventoryMagGen[]);
|
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, inventoryMagGenComponents: IInventoryMagGen[]);
|
||||||
/**
|
/**
|
||||||
* Pick a random weapon based on weightings and generate a functional weapon
|
* Pick a random weapon based on weightings and generate a functional weapon
|
||||||
* @param equipmentSlot Primary/secondary/holster
|
* @param equipmentSlot Primary/secondary/holster
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { ContainerHelper } from "../helpers/ContainerHelper";
|
import { ContainerHelper } from "../helpers/ContainerHelper";
|
||||||
import { GameEventHelper } from "../helpers/GameEventHelper";
|
|
||||||
import { ItemHelper } from "../helpers/ItemHelper";
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
import { PresetHelper } from "../helpers/PresetHelper";
|
import { PresetHelper } from "../helpers/PresetHelper";
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
@ -9,6 +8,8 @@ import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticL
|
|||||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
|
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
import { ObjectId } from "../utils/ObjectId";
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
@ -26,12 +27,13 @@ export declare class LocationGenerator {
|
|||||||
protected ragfairServerHelper: RagfairServerHelper;
|
protected ragfairServerHelper: RagfairServerHelper;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected mathUtil: MathUtil;
|
protected mathUtil: MathUtil;
|
||||||
protected gameEventHelper: GameEventHelper;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected containerHelper: ContainerHelper;
|
protected containerHelper: ContainerHelper;
|
||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, gameEventHelper: GameEventHelper, containerHelper: ContainerHelper, presetHelper: PresetHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
||||||
protected getLooseLootMultiplerForLocation(location: string): number;
|
protected getLooseLootMultiplerForLocation(location: string): number;
|
||||||
protected getStaticLootMultiplerForLocation(location: string): number;
|
protected getStaticLootMultiplerForLocation(location: string): number;
|
||||||
|
@ -6,6 +6,7 @@ import { LootRequest } from "../models/spt/services/LootRequest";
|
|||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
import { ItemFilterService } from "../services/ItemFilterService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
export declare class LootGenerator {
|
export declare class LootGenerator {
|
||||||
@ -14,8 +15,9 @@ export declare class LootGenerator {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, itemFilterService: ItemFilterService);
|
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService);
|
||||||
/**
|
/**
|
||||||
* Generate a list of items based on configuration options parameter
|
* Generate a list of items based on configuration options parameter
|
||||||
* @param options parameters to adjust how loot is generated
|
* @param options parameters to adjust how loot is generated
|
||||||
|
@ -10,6 +10,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
|||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||||
import { FenceService } from "../services/FenceService";
|
import { FenceService } from "../services/FenceService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { BotGenerator } from "./BotGenerator";
|
import { BotGenerator } from "./BotGenerator";
|
||||||
export declare class PlayerScavGenerator {
|
export declare class PlayerScavGenerator {
|
||||||
@ -21,10 +22,11 @@ export declare class PlayerScavGenerator {
|
|||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
protected botLootCacheService: BotLootCacheService;
|
protected botLootCacheService: BotLootCacheService;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected botGenerator: BotGenerator;
|
protected botGenerator: BotGenerator;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected playerScavConfig: IPlayerScavConfig;
|
protected playerScavConfig: IPlayerScavConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, botGenerator: BotGenerator, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Update a player profile to include a new player scav profile
|
* Update a player profile to include a new player scav profile
|
||||||
* @param sessionID session id to specify what profile is updated
|
* @param sessionID session id to specify what profile is updated
|
||||||
|
@ -7,7 +7,7 @@ import { Item } from "../models/eft/common/tables/IItem";
|
|||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
||||||
import { IRagfairOffer, OfferRequirement } from "../models/eft/ragfair/IRagfairOffer";
|
import { IRagfairOffer, OfferRequirement } from "../models/eft/ragfair/IRagfairOffer";
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
import { Dynamic, IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
@ -88,7 +88,16 @@ export declare class RagfairOfferGenerator {
|
|||||||
* Create multiple offers for items by using a unique list of items we've generated previously
|
* Create multiple offers for items by using a unique list of items we've generated previously
|
||||||
* @param expiredOffers optional, expired offers to regenerate
|
* @param expiredOffers optional, expired offers to regenerate
|
||||||
*/
|
*/
|
||||||
generateDynamicOffers(expiredOffers?: Item[]): void;
|
generateDynamicOffers(expiredOffers?: Item[]): Promise<void>;
|
||||||
|
protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise<void>;
|
||||||
|
/**
|
||||||
|
* Create one flea offer for a specific item
|
||||||
|
* @param items Item to create offer for
|
||||||
|
* @param isPreset Is item a weapon preset
|
||||||
|
* @param itemDetails raw db item details
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise<Item[]>;
|
||||||
/**
|
/**
|
||||||
* Generate trader offers on flea using the traders assort data
|
* Generate trader offers on flea using the traders assort data
|
||||||
* @param traderID Trader to generate offers for
|
* @param traderID Trader to generate offers for
|
||||||
|
@ -1,207 +1,24 @@
|
|||||||
import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper";
|
import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper";
|
||||||
import { Mods, ModsChances } from "../models/eft/common/tables/IBotType";
|
|
||||||
import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem";
|
import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem, Slot } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
|
||||||
import { ItemFilterService } from "../services/ItemFilterService";
|
|
||||||
import { LocalisationService } from "../services/LocalisationService";
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { BotHelper } from "./BotHelper";
|
|
||||||
import { BotWeaponGeneratorHelper } from "./BotWeaponGeneratorHelper";
|
|
||||||
import { ContainerHelper } from "./ContainerHelper";
|
|
||||||
import { InventoryHelper } from "./InventoryHelper";
|
|
||||||
import { ItemHelper } from "./ItemHelper";
|
import { ItemHelper } from "./ItemHelper";
|
||||||
import { ProbabilityHelper } from "./ProbabilityHelper";
|
|
||||||
import { ProfileHelper } from "./ProfileHelper";
|
|
||||||
export declare class BotModLimits {
|
|
||||||
scope: ItemCount;
|
|
||||||
scopeMax: number;
|
|
||||||
scopeBaseTypes: string[];
|
|
||||||
flashlightLaser: ItemCount;
|
|
||||||
flashlightLaserMax: number;
|
|
||||||
flashlgihtLaserBaseTypes: string[];
|
|
||||||
}
|
|
||||||
export declare class ItemCount {
|
|
||||||
count: number;
|
|
||||||
}
|
|
||||||
export declare class BotGeneratorHelper {
|
export declare class BotGeneratorHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected probabilityHelper: ProbabilityHelper;
|
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected durabilityLimitsHelper: DurabilityLimitsHelper;
|
protected durabilityLimitsHelper: DurabilityLimitsHelper;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected inventoryHelper: InventoryHelper;
|
|
||||||
protected containerHelper: ContainerHelper;
|
|
||||||
protected botEquipmentFilterService: BotEquipmentFilterService;
|
|
||||||
protected itemFilterService: ItemFilterService;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
|
||||||
protected botHelper: BotHelper;
|
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botHelper: BotHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
|
||||||
* Check mods are compatible and add to array
|
|
||||||
* @param equipment Equipment item to add mods to
|
|
||||||
* @param modPool Mod list to choose frm
|
|
||||||
* @param parentId parentid of item to add mod to
|
|
||||||
* @param parentTemplate template objet of item to add mods to
|
|
||||||
* @param modSpawnChances dictionary of mod items and their chance to spawn for this bot type
|
|
||||||
* @param botRole the bot role being generated for
|
|
||||||
* @param forceSpawn should this mod be forced to spawn
|
|
||||||
* @returns Item + compatible mods as an array
|
|
||||||
*/
|
|
||||||
generateModsForEquipment(equipment: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, botRole: string, forceSpawn?: boolean): Item[];
|
|
||||||
/**
|
|
||||||
* Add mods to a weapon using the provided mod pool
|
|
||||||
* @param sessionId session id
|
|
||||||
* @param weapon Weapon to add mods to
|
|
||||||
* @param modPool Pool of compatible mods to attach to weapon
|
|
||||||
* @param weaponParentId parentId of weapon
|
|
||||||
* @param parentWeaponTemplate Weapon which mods will be generated on
|
|
||||||
* @param modSpawnChances Mod spawn chances
|
|
||||||
* @param ammoTpl Ammo tpl to use when generating magazines/cartridges
|
|
||||||
* @param botRole Role of bot weapon is generated for
|
|
||||||
* @returns Weapon + mods array
|
|
||||||
*/
|
|
||||||
generateModsForWeapon(sessionId: string, weapon: Item[], modPool: Mods, weaponParentId: string, parentWeaponTemplate: ITemplateItem, modSpawnChances: ModsChances, ammoTpl: string, botRole: string, botLevel: number): Item[];
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param modSlot Slot mod will fit into
|
|
||||||
* @param isRandomisableSlot Will generate a randomised mod pool if true
|
|
||||||
* @param modsParent Parent slot the item will be a part of
|
|
||||||
* @param botEquipBlacklist Blacklist to prevent mods from being picked
|
|
||||||
* @param itemModPool Pool of items to pick from
|
|
||||||
* @param weapon array with only weapon tpl in it, ready for mods to be added
|
|
||||||
* @param ammoTpl ammo tpl to use if slot requires a cartridge to be added (e.g. mod_magazine)
|
|
||||||
* @param parentTemplate Parent item the mod will go into
|
|
||||||
* @returns ITemplateItem
|
|
||||||
*/
|
|
||||||
protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, modsParent: Slot, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record<string, string[]>, weapon: Item[], ammoTpl: string, parentTemplate: ITemplateItem): [boolean, ITemplateItem];
|
|
||||||
/**
|
|
||||||
* Find mod tpls of a provided type and add to modPool
|
|
||||||
* @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope)
|
|
||||||
* @param modTemplate db object for modItem we get compatible mods from
|
|
||||||
* @param modPool Pool of mods we are adding to
|
|
||||||
*/
|
|
||||||
protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void;
|
|
||||||
/**
|
|
||||||
* Check if mod item is on limited list + has surpassed the limit set for it
|
|
||||||
* @param botRole role the bot has e.g. assault
|
|
||||||
* @param modTemplate mods template data
|
|
||||||
* @param modLimits limits set for weapon being generated for this bot
|
|
||||||
* @returns true if over item limit
|
|
||||||
*/
|
|
||||||
protected modHasReachedItemLimit(botRole: string, modTemplate: ITemplateItem, modLimits: BotModLimits): boolean;
|
|
||||||
/**
|
|
||||||
* Initalise mod limits to be used when generating a weapon
|
|
||||||
* @param botRole "assault", "bossTagilla" or "pmc"
|
|
||||||
* @returns BotModLimits object
|
|
||||||
*/
|
|
||||||
protected initModLimits(botRole: string): BotModLimits;
|
|
||||||
/**
|
|
||||||
* Generate a pool of mods for this bots mod type if bot has values inside `randomisedWeaponModSlots` array found in bot.json/equipment[botrole]
|
|
||||||
* @param allowedMods Mods to be added to mod pool
|
|
||||||
* @param botEquipBlacklist blacklist of items not allowed to be added to mod pool
|
|
||||||
* @param modSlot Slot to generate mods for
|
|
||||||
* @param itemModPool base mod pool to replace values of
|
|
||||||
*/
|
|
||||||
protected generateDynamicWeaponModPool(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string, itemModPool: Record<string, string[]>): void;
|
|
||||||
/**
|
|
||||||
* Find all compatible mods for equipment item and add to modPool
|
|
||||||
* @param itemDetails item to find mods for
|
|
||||||
* @param modPool ModPool to add mods to
|
|
||||||
* @param equipmentBlacklist equipment not allowed to be used by the bot
|
|
||||||
* @param botEquipmentRole bot type to generate pool for (e.g. assault, pmcBot, pmc for usec/bear)
|
|
||||||
*/
|
|
||||||
generateDynamicModPool(itemDetails: ITemplateItem, modPool: Mods, equipmentBlacklist: EquipmentFilterDetails[], botEquipmentRole: string): void;
|
|
||||||
/**
|
|
||||||
* Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist
|
|
||||||
* @param allowedMods base mods to filter
|
|
||||||
* @param botEquipBlacklist equipment blacklist
|
|
||||||
* @param modSlot slot mods belong to
|
|
||||||
* @returns Filtered array of mod tpls
|
|
||||||
*/
|
|
||||||
protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[];
|
|
||||||
/**
|
|
||||||
* Check if the specific item type on the weapon has reached the set limit
|
|
||||||
* @param modTpl log mod tpl if over type limit
|
|
||||||
* @param currentCount current number of this item on gun
|
|
||||||
* @param maxLimit mod limit allowed
|
|
||||||
* @param botRole role of bot we're checking weapon of
|
|
||||||
* @returns true if limit reached
|
|
||||||
*/
|
|
||||||
protected weaponModLimitReached(modTpl: string, currentCount: {
|
|
||||||
count: number;
|
|
||||||
}, maxLimit: number, botRole: string): boolean;
|
|
||||||
/**
|
|
||||||
* Log errors if mod is not compatible with slot
|
|
||||||
* @param modToAdd template of mod to check
|
|
||||||
* @param itemSlot slot the item will be placed in
|
|
||||||
* @param modSlot slot the mod will fill
|
|
||||||
* @param parentTemplate tempalte of the mods parent item
|
|
||||||
* @returns true if valid
|
|
||||||
*/
|
|
||||||
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], itemSlot: Slot, modSlot: string, parentTemplate: ITemplateItem): boolean;
|
|
||||||
/**
|
|
||||||
* Create a mod item with parameters as properties
|
|
||||||
* @param modId _id
|
|
||||||
* @param modTpl _tpl
|
|
||||||
* @param parentId parentId
|
|
||||||
* @param modSlot slotId
|
|
||||||
* @param modTemplate Used to add additional properites in the upd object
|
|
||||||
* @returns Item object
|
|
||||||
*/
|
|
||||||
protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item;
|
|
||||||
/**
|
|
||||||
* randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot
|
|
||||||
* never return true for an item that has 0% spawn chance
|
|
||||||
* @param itemSlot slot the item sits in
|
|
||||||
* @param modSlot slot the mod sits in
|
|
||||||
* @param modSpawnChances Chances for various mod spawns
|
|
||||||
* @returns boolean true if it should spawn
|
|
||||||
*/
|
|
||||||
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean;
|
|
||||||
/**
|
|
||||||
* Get a list of containers that hold ammo
|
|
||||||
* e.g. mod_magazine / patron_in_weapon_000
|
|
||||||
* @returns string array
|
|
||||||
*/
|
|
||||||
protected getAmmoContainers(): string[];
|
|
||||||
/**
|
|
||||||
* Get a Slot property for an item (chamber/cartridge/slot)
|
|
||||||
* @param modSlot e.g patron_in_weapon
|
|
||||||
* @param parentTemplate item template
|
|
||||||
* @returns Slot item
|
|
||||||
*/
|
|
||||||
protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot;
|
|
||||||
/**
|
|
||||||
* With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines.
|
|
||||||
* Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0.
|
|
||||||
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
|
||||||
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
|
||||||
* @param items The items where the CylinderMagazine's camora are appended to
|
|
||||||
* @param modPool modPool which should include available cartrigdes
|
|
||||||
* @param parentId The CylinderMagazine's UID
|
|
||||||
* @param parentTemplate The CylinderMagazine's template
|
|
||||||
*/
|
|
||||||
protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void;
|
|
||||||
/**
|
|
||||||
* Take a record of camoras and merge the compatable shells into one array
|
|
||||||
* @param camorasWithShells camoras we want to merge into one array
|
|
||||||
* @returns string array of shells fro luitple camora sources
|
|
||||||
*/
|
|
||||||
protected mergeCamoraPoolsTogether(camorasWithShells: Record<string, string[]>): string[];
|
|
||||||
/**
|
/**
|
||||||
* Adds properties to an item
|
* Adds properties to an item
|
||||||
* e.g. Repairable / HasHinge / Foldable / MaxDurability
|
* e.g. Repairable / HasHinge / Foldable / MaxDurability
|
||||||
@ -212,6 +29,18 @@ export declare class BotGeneratorHelper {
|
|||||||
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): {
|
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): {
|
||||||
upd?: Upd;
|
upd?: Upd;
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Get the chance for the light or laser to be set as active on weapon, default to 50% if no bot/equip settings found
|
||||||
|
* @param botRole role of bot with weapon
|
||||||
|
* @returns Percent chance to be active
|
||||||
|
*/
|
||||||
|
protected getLightLaserActiveChance(botRole: string): number;
|
||||||
|
/**
|
||||||
|
* Get the chance for the faceshield to be set as enabled, default to 75% if no bot/equip settings found
|
||||||
|
* @param botRole role of bot with faceshield
|
||||||
|
* @returns Percent chance to be active
|
||||||
|
*/
|
||||||
|
protected getFaceShieldActiveChance(botRole: string): number;
|
||||||
/**
|
/**
|
||||||
* Create a repairable object for a weapon that containers durability + max durability properties
|
* Create a repairable object for a weapon that containers durability + max durability properties
|
||||||
* @param itemTemplate weapon object being generated for
|
* @param itemTemplate weapon object being generated for
|
||||||
@ -227,22 +56,16 @@ export declare class BotGeneratorHelper {
|
|||||||
*/
|
*/
|
||||||
protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable;
|
protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable;
|
||||||
/**
|
/**
|
||||||
* Get a random mod from an items compatible mods Filter array
|
* Can item be added to another item without conflict
|
||||||
* @param modTpl ????
|
* @param items Items to check compatiblilities with
|
||||||
* @param parentSlot item mod will go into, used to get combatible items
|
* @param tplToCheck Tpl of the item to check for incompatibilities
|
||||||
* @param modSlot Slot to get mod to fill
|
|
||||||
* @param items items to ensure picked mod is compatible with
|
|
||||||
* @returns item tpl
|
|
||||||
*/
|
|
||||||
protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
|
|
||||||
/**
|
|
||||||
* Can an item be added to an item without issue
|
|
||||||
* @param items items to check compatiblilities with
|
|
||||||
* @param tplToCheck tpl of the item to check for incompatibilities
|
|
||||||
* @param equipmentSlot Slot the item will be placed into
|
* @param equipmentSlot Slot the item will be placed into
|
||||||
* @returns false if no incompatibilties
|
* @returns false if no incompatibilties, also has incompatibility reason
|
||||||
*/
|
*/
|
||||||
isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean;
|
isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): {
|
||||||
|
incompatible: boolean;
|
||||||
|
reason: string;
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* Convert a bots role to the equipment role used in config/bot.json
|
* Convert a bots role to the equipment role used in config/bot.json
|
||||||
* @param botRole Role to convert
|
* @param botRole Role to convert
|
||||||
|
19
Live/CWX_DebugTool/types/helpers/BotHelper.d.ts
vendored
19
Live/CWX_DebugTool/types/helpers/BotHelper.d.ts
vendored
@ -1,3 +1,4 @@
|
|||||||
|
import { MinMax } from "../models/common/MinMax";
|
||||||
import { Difficulty, IBotType } from "../models/eft/common/tables/IBotType";
|
import { Difficulty, IBotType } from "../models/eft/common/tables/IBotType";
|
||||||
import { EquipmentFilters, IBotConfig, RandomisationDetails } from "../models/spt/config/IBotConfig";
|
import { EquipmentFilters, IBotConfig, RandomisationDetails } from "../models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
@ -59,6 +60,8 @@ export declare class BotHelper {
|
|||||||
* @returns true if should be a pmc
|
* @returns true if should be a pmc
|
||||||
*/
|
*/
|
||||||
shouldBotBePmc(botRole: string): boolean;
|
shouldBotBePmc(botRole: string): boolean;
|
||||||
|
rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean;
|
||||||
|
botRoleIsPmc(botRole: string): boolean;
|
||||||
/**
|
/**
|
||||||
* Get randomisation settings for bot from config/bot.json
|
* Get randomisation settings for bot from config/bot.json
|
||||||
* @param botLevel level of bot
|
* @param botLevel level of bot
|
||||||
@ -66,4 +69,20 @@ export declare class BotHelper {
|
|||||||
* @returns RandomisationDetails
|
* @returns RandomisationDetails
|
||||||
*/
|
*/
|
||||||
getBotRandomisationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails;
|
getBotRandomisationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails;
|
||||||
|
/**
|
||||||
|
* Choose between sptBear and sptUsec at random based on the % defined in botConfig.pmc.isUsec
|
||||||
|
* @returns pmc role
|
||||||
|
*/
|
||||||
|
getRandomisedPmcRole(): string;
|
||||||
|
/**
|
||||||
|
* Get the corrisponding side when sptBear or sptUsec is passed in
|
||||||
|
* @param botRole role to get side for
|
||||||
|
* @returns side (usec/bear)
|
||||||
|
*/
|
||||||
|
getPmcSideByRole(botRole: string): string;
|
||||||
|
/**
|
||||||
|
* Get a randomised PMC side based on bot config value 'isUsec'
|
||||||
|
* @returns pmc side as string
|
||||||
|
*/
|
||||||
|
protected getRandomisedPmcSide(): string;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import { Item } from "../models/eft/common/tables/IItem";
|
|||||||
import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { ContainerHelper } from "./ContainerHelper";
|
import { ContainerHelper } from "./ContainerHelper";
|
||||||
@ -16,8 +17,9 @@ export declare class BotWeaponGeneratorHelper {
|
|||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected containerHelper: ContainerHelper;
|
protected containerHelper: ContainerHelper;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, itemHelper: ItemHelper, randomUtil: RandomUtil, hashUtil: HashUtil, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, itemHelper: ItemHelper, randomUtil: RandomUtil, hashUtil: HashUtil, inventoryHelper: InventoryHelper, localisationService: LocalisationService, containerHelper: ContainerHelper);
|
||||||
/**
|
/**
|
||||||
* Get a randomised number of bullets for a specific magazine
|
* Get a randomised number of bullets for a specific magazine
|
||||||
* @param magCounts min and max count of magazines
|
* @param magCounts min and max count of magazines
|
||||||
|
@ -4,6 +4,7 @@ import { MessageType } from "../models/enums/MessageType";
|
|||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { SaveServer } from "../servers/SaveServer";
|
import { SaveServer } from "../servers/SaveServer";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { ItemHelper } from "./ItemHelper";
|
import { ItemHelper } from "./ItemHelper";
|
||||||
import { NotificationSendHelper } from "./NotificationSendHelper";
|
import { NotificationSendHelper } from "./NotificationSendHelper";
|
||||||
@ -15,8 +16,9 @@ export declare class DialogueHelper {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected notifierHelper: NotifierHelper;
|
protected notifierHelper: NotifierHelper;
|
||||||
protected notificationSendHelper: NotificationSendHelper;
|
protected notificationSendHelper: NotificationSendHelper;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper);
|
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
||||||
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
||||||
/**
|
/**
|
||||||
* Add a templated message to the dialogue.
|
* Add a templated message to the dialogue.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig";
|
import { ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
export declare class GameEventHelper {
|
export declare class GameEventHelper {
|
||||||
@ -6,24 +6,4 @@ export declare class GameEventHelper {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected seasonalEventConfig: ISeasonalEventConfig;
|
protected seasonalEventConfig: ISeasonalEventConfig;
|
||||||
constructor(databaseServer: DatabaseServer, configServer: ConfigServer);
|
constructor(databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||||
get events(): Record<string, string>;
|
|
||||||
get christmasEventItems(): string[];
|
|
||||||
itemIsChristmasRelated(itemId: string): boolean;
|
|
||||||
christmasEventEnabled(): boolean;
|
|
||||||
/**
|
|
||||||
* Get the dates each seasonal event starts and ends
|
|
||||||
* @returns Record with event name + start/end date
|
|
||||||
*/
|
|
||||||
getEventDetails(): ISeasonalEvent[];
|
|
||||||
/**
|
|
||||||
* Is detection of seasonal events enabled (halloween / christmas)
|
|
||||||
* @returns true if seasonal events should be checked for
|
|
||||||
*/
|
|
||||||
isAutomaticEventDetectionEnabled(): boolean;
|
|
||||||
/**
|
|
||||||
* Get a dictionary of gear changes to apply to bots for a specific event e.g. Christmas/Halloween
|
|
||||||
* @param eventName Name of event to get gear changes for
|
|
||||||
* @returns bots with equipment changes
|
|
||||||
*/
|
|
||||||
getEventBotGear(eventName: string): Record<string, Record<string, Record<string, number>>>;
|
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ export declare class LookupCollection {
|
|||||||
}
|
}
|
||||||
export declare class HandbookHelper {
|
export declare class HandbookHelper {
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected lookupCacheGenerated: boolean;
|
||||||
protected handbookPriceCache: LookupCollection;
|
protected handbookPriceCache: LookupCollection;
|
||||||
constructor(databaseServer: DatabaseServer);
|
constructor(databaseServer: DatabaseServer);
|
||||||
hydrateLookup(): void;
|
hydrateLookup(): void;
|
||||||
|
19
Live/CWX_DebugTool/types/helpers/ItemHelper.d.ts
vendored
19
Live/CWX_DebugTool/types/helpers/ItemHelper.d.ts
vendored
@ -5,12 +5,15 @@ import { IStaticAmmoDetails } from "../models/eft/common/tables/ILootBase";
|
|||||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { ItemBaseClassService } from "../services/ItemBaseClassService";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
import { LocaleService } from "../services/LocaleService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
import { ObjectId } from "../utils/ObjectId";
|
import { ObjectId } from "../utils/ObjectId";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { HandbookHelper } from "./HandbookHelper";
|
||||||
declare class ItemHelper {
|
declare class ItemHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
@ -19,8 +22,11 @@ declare class ItemHelper {
|
|||||||
protected objectId: ObjectId;
|
protected objectId: ObjectId;
|
||||||
protected mathUtil: MathUtil;
|
protected mathUtil: MathUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected handbookHelper: HandbookHelper;
|
||||||
|
protected itemBaseClassService: ItemBaseClassService;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, localeService: LocaleService);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, localisationService: LocalisationService, localeService: LocaleService);
|
||||||
/**
|
/**
|
||||||
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
||||||
* @param {string} tpl the template id / tpl
|
* @param {string} tpl the template id / tpl
|
||||||
@ -31,10 +37,17 @@ declare class ItemHelper {
|
|||||||
* Check if the tpl / template Id provided is a descendent of the baseclass
|
* Check if the tpl / template Id provided is a descendent of the baseclass
|
||||||
*
|
*
|
||||||
* @param {string} tpl the item template id to check
|
* @param {string} tpl the item template id to check
|
||||||
* @param {string} baseclassTpl the baseclass to check for
|
* @param {string} baseClassTpl the baseclass to check for
|
||||||
* @return {boolean} is the tpl a descendent?
|
* @return {boolean} is the tpl a descendent?
|
||||||
*/
|
*/
|
||||||
isOfBaseclass(tpl: string, baseclassTpl: string): boolean;
|
isOfBaseclass(tpl: string, baseClassTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Check if item has any of the supplied base clases
|
||||||
|
* @param tpl Item to check base classes of
|
||||||
|
* @param baseClassTpls base classes to check for
|
||||||
|
* @returns true if any supplied base classes match
|
||||||
|
*/
|
||||||
|
isOfBaseclasses(tpl: string, baseClassTpls: string[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Returns the item price based on the handbook or as a fallback from the prices.json if the item is not
|
* Returns the item price based on the handbook or as a fallback from the prices.json if the item is not
|
||||||
* found in the handbook. If the price can't be found at all return 0
|
* found in the handbook. If the price can't be found at all return 0
|
||||||
|
@ -10,6 +10,7 @@ import { EventOutputHolder } from "../routers/EventOutputHolder";
|
|||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { LocaleService } from "../services/LocaleService";
|
import { LocaleService } from "../services/LocaleService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { HashUtil } from "../utils/HashUtil";
|
import { HashUtil } from "../utils/HashUtil";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
@ -32,10 +33,11 @@ export declare class QuestHelper {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get status of a quest by quest id
|
* Get status of a quest by quest id
|
||||||
* @param pmcData Profile to search
|
* @param pmcData Profile to search
|
||||||
|
@ -46,7 +46,7 @@ export declare class RagfairOfferHelper {
|
|||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer);
|
||||||
getValidOffers(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
||||||
getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
||||||
/**
|
/**
|
||||||
* Check if trader offers' BuyRestrictionMax value has been reached
|
* Check if trader offers' BuyRestrictionMax value has been reached
|
||||||
@ -64,5 +64,5 @@ export declare class RagfairOfferHelper {
|
|||||||
protected getProfileOffers(sessionID: string): IRagfairOffer[];
|
protected getProfileOffers(sessionID: string): IRagfairOffer[];
|
||||||
protected deleteOfferByOfferId(sessionID: string, offerId: string): void;
|
protected deleteOfferByOfferId(sessionID: string, offerId: string): void;
|
||||||
protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse;
|
protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse;
|
||||||
isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
|
isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
|||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { FenceService } from "../services/FenceService";
|
import { FenceService } from "../services/FenceService";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { TraderAssortService } from "../services/TraderAssortService";
|
import { TraderAssortService } from "../services/TraderAssortService";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { MathUtil } from "../utils/MathUtil";
|
import { MathUtil } from "../utils/MathUtil";
|
||||||
@ -27,11 +28,12 @@ export declare class TraderAssortHelper {
|
|||||||
protected ragfairAssortGenerator: RagfairAssortGenerator;
|
protected ragfairAssortGenerator: RagfairAssortGenerator;
|
||||||
protected ragfairOfferGenerator: RagfairOfferGenerator;
|
protected ragfairOfferGenerator: RagfairOfferGenerator;
|
||||||
protected traderAssortService: TraderAssortService;
|
protected traderAssortService: TraderAssortService;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected traderConfig: ITraderConfig;
|
protected traderConfig: ITraderConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get a traders assorts
|
* Get a traders assorts
|
||||||
* Can be used for returning ragfair / fence assorts
|
* Can be used for returning ragfair / fence assorts
|
||||||
|
@ -4,7 +4,7 @@ import { PreAkiModLoader } from "./PreAkiModLoader";
|
|||||||
export declare class PostDBModLoader implements OnLoad {
|
export declare class PostDBModLoader implements OnLoad {
|
||||||
protected preAkiModLoader: PreAkiModLoader;
|
protected preAkiModLoader: PreAkiModLoader;
|
||||||
constructor(preAkiModLoader: PreAkiModLoader);
|
constructor(preAkiModLoader: PreAkiModLoader);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
getModPath(mod: string): string;
|
getModPath(mod: string): string;
|
||||||
protected executeMods(container: DependencyContainer): void;
|
protected executeMods(container: DependencyContainer): void;
|
||||||
|
@ -37,7 +37,7 @@ export interface Conditions {
|
|||||||
export interface AvailableForConditions {
|
export interface AvailableForConditions {
|
||||||
_parent: string;
|
_parent: string;
|
||||||
_props: AvailableForProps;
|
_props: AvailableForProps;
|
||||||
dynamicLocale: boolean;
|
dynamicLocale?: boolean;
|
||||||
}
|
}
|
||||||
export interface AvailableForProps {
|
export interface AvailableForProps {
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -7,11 +7,13 @@ export interface IGameConfigResponse {
|
|||||||
activeProfileId: string;
|
activeProfileId: string;
|
||||||
backend: Backend;
|
backend: Backend;
|
||||||
utc_time: number;
|
utc_time: number;
|
||||||
|
/** Total in game time */
|
||||||
totalInGame: number;
|
totalInGame: number;
|
||||||
reportAvailable: boolean;
|
reportAvailable: boolean;
|
||||||
twitchEventMember: boolean;
|
twitchEventMember: boolean;
|
||||||
}
|
}
|
||||||
export interface Backend {
|
export interface Backend {
|
||||||
|
Lobby: string;
|
||||||
Trading: string;
|
Trading: string;
|
||||||
Messaging: string;
|
Messaging: string;
|
||||||
Main: string;
|
Main: string;
|
||||||
|
@ -3,7 +3,7 @@ export interface IHideoutProduction {
|
|||||||
areaType: number;
|
areaType: number;
|
||||||
requirements: Requirement[];
|
requirements: Requirement[];
|
||||||
productionTime: number;
|
productionTime: number;
|
||||||
boosters: any;
|
boosters?: any;
|
||||||
endProduct: string;
|
endProduct: string;
|
||||||
continuous: boolean;
|
continuous: boolean;
|
||||||
count: number;
|
count: number;
|
||||||
|
@ -8,6 +8,8 @@ export declare enum BaseClasses {
|
|||||||
BACKPACK = "5448e53e4bdc2d60728b4567",
|
BACKPACK = "5448e53e4bdc2d60728b4567",
|
||||||
VISORS = "5448e5724bdc2ddf718b4568",
|
VISORS = "5448e5724bdc2ddf718b4568",
|
||||||
FOOD = "5448e8d04bdc2ddf718b4569",
|
FOOD = "5448e8d04bdc2ddf718b4569",
|
||||||
|
GAS_BLOCK = "56ea9461d2720b67698b456f",
|
||||||
|
RAIL_COVER = "55818b1d4bdc2d5b648b4572",
|
||||||
DRINK = "5448e8d64bdc2dce718b4568",
|
DRINK = "5448e8d64bdc2dce718b4568",
|
||||||
BARTER_ITEM = "5448eb774bdc2d0a728b4567",
|
BARTER_ITEM = "5448eb774bdc2d0a728b4567",
|
||||||
INFO = "5448ecbe4bdc2d60728b4568",
|
INFO = "5448ecbe4bdc2d60728b4568",
|
||||||
@ -36,6 +38,7 @@ export declare enum BaseClasses {
|
|||||||
THROW_WEAPON = "543be6564bdc2df4348b4568",
|
THROW_WEAPON = "543be6564bdc2df4348b4568",
|
||||||
FOOD_DRINK = "543be6674bdc2df1348b4569",
|
FOOD_DRINK = "543be6674bdc2df1348b4569",
|
||||||
PISTOL = "5447b5cf4bdc2d65278b4567",
|
PISTOL = "5447b5cf4bdc2d65278b4567",
|
||||||
|
REVOLVER = "617f1ef5e8b54b0998387733",
|
||||||
SMG = "5447b5e04bdc2d62278b4567",
|
SMG = "5447b5e04bdc2d62278b4567",
|
||||||
ASSAULT_RIFLE = "5447b5f14bdc2d61278b4567",
|
ASSAULT_RIFLE = "5447b5f14bdc2d61278b4567",
|
||||||
ASSAULT_CARBINE = "5447b5fc4bdc2d87278b4567",
|
ASSAULT_CARBINE = "5447b5fc4bdc2d87278b4567",
|
||||||
@ -73,9 +76,10 @@ export declare enum BaseClasses {
|
|||||||
TACTICAL_COMBO = "55818b164bdc2ddc698b456c",
|
TACTICAL_COMBO = "55818b164bdc2ddc698b456c",
|
||||||
FLASHLIGHT = "55818b084bdc2d5b648b4571",
|
FLASHLIGHT = "55818b084bdc2d5b648b4571",
|
||||||
MAGAZINE = "5448bc234bdc2d3c308b4569",
|
MAGAZINE = "5448bc234bdc2d3c308b4569",
|
||||||
LIGHT_LASER = "55818b0e4bdc2dde698b456e",
|
LIGHT_LASER_DESIGNATOR = "55818b0e4bdc2dde698b456e",
|
||||||
FLASH_HIDER = "550aa4bf4bdc2dd6348b456b",
|
FLASH_HIDER = "550aa4bf4bdc2dd6348b456b",
|
||||||
COLLIMATOR = "55818ad54bdc2ddc698b4569",
|
COLLIMATOR = "55818ad54bdc2ddc698b4569",
|
||||||
|
IRON_SIGHT = "55818ac54bdc2d5b648b456e",
|
||||||
COMPACT_COLLIMATOR = "55818acf4bdc2dde698b456b",
|
COMPACT_COLLIMATOR = "55818acf4bdc2dde698b456b",
|
||||||
COMPENSATOR = "550aa4af4bdc2dd4348b456e",
|
COMPENSATOR = "550aa4af4bdc2dd4348b456e",
|
||||||
OPTIC_SCOPE = "55818ae44bdc2dde698b456c",
|
OPTIC_SCOPE = "55818ae44bdc2dde698b456c",
|
||||||
|
7
Live/CWX_DebugTool/types/models/enums/ExitStatis.d.ts
vendored
Normal file
7
Live/CWX_DebugTool/types/models/enums/ExitStatis.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
export declare enum ExitStatus {
|
||||||
|
SURVIVED = 0,
|
||||||
|
KILLED = 1,
|
||||||
|
LEFT = 2,
|
||||||
|
RUNNER = 3,
|
||||||
|
MISSINGINACTION = 4
|
||||||
|
}
|
@ -3,6 +3,8 @@ export interface BotGenerationDetails {
|
|||||||
isPmc: boolean;
|
isPmc: boolean;
|
||||||
/** assault/pmcBot etc */
|
/** assault/pmcBot etc */
|
||||||
role: string;
|
role: string;
|
||||||
|
/** Side of bot */
|
||||||
|
side: string;
|
||||||
/** Active players current level */
|
/** Active players current level */
|
||||||
playerLevel: number;
|
playerLevel: number;
|
||||||
/** Delta of highest level of bot */
|
/** Delta of highest level of bot */
|
||||||
|
@ -6,7 +6,6 @@ import { IHideoutProduction } from "../../eft/hideout/IHideoutProduction";
|
|||||||
import { IHideoutScavCase } from "../../eft/hideout/IHideoutScavCase";
|
import { IHideoutScavCase } from "../../eft/hideout/IHideoutScavCase";
|
||||||
import { IHideoutSettingsBase } from "../../eft/hideout/IHideoutSettingsBase";
|
import { IHideoutSettingsBase } from "../../eft/hideout/IHideoutSettingsBase";
|
||||||
import { IGetBodyResponseData } from "../../eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "../../eft/httpResponse/IGetBodyResponseData";
|
||||||
import { ILanguageBase } from "../server/ILocaleBase";
|
|
||||||
import { ISettingsBase } from "../server/ISettingsBase";
|
import { ISettingsBase } from "../server/ISettingsBase";
|
||||||
export interface IDataCallbacks {
|
export interface IDataCallbacks {
|
||||||
getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISettingsBase>;
|
getSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ISettingsBase>;
|
||||||
@ -20,7 +19,7 @@ export interface IDataCallbacks {
|
|||||||
getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutArea[]>;
|
getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutArea[]>;
|
||||||
gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutProduction[]>;
|
gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutProduction[]>;
|
||||||
getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutScavCase[]>;
|
getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutScavCase[]>;
|
||||||
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILanguageBase[]>;
|
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, string>>;
|
||||||
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
@ -66,6 +66,7 @@ export interface LootNvalue {
|
|||||||
}
|
}
|
||||||
export interface EquipmentFilters {
|
export interface EquipmentFilters {
|
||||||
weaponModLimits: ModLimits;
|
weaponModLimits: ModLimits;
|
||||||
|
weaponSightWhitelist: Record<string, string[]>;
|
||||||
faceShieldIsActiveChancePercent?: number;
|
faceShieldIsActiveChancePercent?: number;
|
||||||
lightLaserIsActiveChancePercent?: number;
|
lightLaserIsActiveChancePercent?: number;
|
||||||
randomisation: RandomisationDetails[];
|
randomisation: RandomisationDetails[];
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
|
import { BossLocationSpawn, Wave } from "../../../models/eft/common/ILocationBase";
|
||||||
import { IBaseConfig } from "./IBaseConfig";
|
import { IBaseConfig } from "./IBaseConfig";
|
||||||
export interface ILocationConfig extends IBaseConfig {
|
export interface ILocationConfig extends IBaseConfig {
|
||||||
kind: "aki-location";
|
kind: "aki-location";
|
||||||
looseLootMultiplier: LootMultiplier;
|
looseLootMultiplier: LootMultiplier;
|
||||||
staticLootMultiplier: LootMultiplier;
|
staticLootMultiplier: LootMultiplier;
|
||||||
|
customWaves: CustomWaves;
|
||||||
|
/** Open zones to add to map */
|
||||||
|
openZones: Record<string, string[]>;
|
||||||
|
}
|
||||||
|
export interface CustomWaves {
|
||||||
|
boss: Record<string, BossLocationSpawn[]>;
|
||||||
|
normal: Record<string, Wave[]>;
|
||||||
}
|
}
|
||||||
export interface LootMultiplier {
|
export interface LootMultiplier {
|
||||||
bigmap: number;
|
bigmap: number;
|
||||||
|
@ -1,49 +1,5 @@
|
|||||||
export interface ILocaleBase {
|
export interface ILocaleBase {
|
||||||
global: Record<string, ILocaleGlobalBase>;
|
global: Record<string, Record<string, string>>;
|
||||||
menu: Record<string, string>;
|
menu: Record<string, string>;
|
||||||
languages: ILanguageBase[];
|
languages: Record<string, string>;
|
||||||
}
|
|
||||||
export interface ILocaleGlobalBase {
|
|
||||||
interface: Record<string, string>;
|
|
||||||
enum: any[];
|
|
||||||
mail: Record<string, string>;
|
|
||||||
quest: Record<string, ILocaleQuest>;
|
|
||||||
preset: Record<string, ILocalePreset>;
|
|
||||||
handbook: Record<string, string>;
|
|
||||||
season: Record<string, string>;
|
|
||||||
customization: Record<string, ILocaleProps>;
|
|
||||||
repeatableQuest: Record<string, string>;
|
|
||||||
templates: Record<string, ILocaleProps>;
|
|
||||||
locations: Record<string, ILocaleProps>;
|
|
||||||
banners: Record<string, ILocaleProps>;
|
|
||||||
trading: Record<string, ILocaleTradingProps>;
|
|
||||||
}
|
|
||||||
export interface ILocaleQuest {
|
|
||||||
name: string;
|
|
||||||
description: string;
|
|
||||||
note: string;
|
|
||||||
failMessageText: string;
|
|
||||||
startedMessageText: string;
|
|
||||||
successMessageText: string;
|
|
||||||
conditions: Record<string, string>;
|
|
||||||
location: string;
|
|
||||||
}
|
|
||||||
export interface ILocalePreset {
|
|
||||||
Name: string;
|
|
||||||
}
|
|
||||||
export interface ILocaleProps {
|
|
||||||
Name: string;
|
|
||||||
ShortName: string;
|
|
||||||
Description: string;
|
|
||||||
}
|
|
||||||
export interface ILocaleTradingProps {
|
|
||||||
FullName: string;
|
|
||||||
FirstName: string;
|
|
||||||
Nickname: string;
|
|
||||||
Location: string;
|
|
||||||
Description: string;
|
|
||||||
}
|
|
||||||
export interface ILanguageBase {
|
|
||||||
ShortName: string;
|
|
||||||
Name: string;
|
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ export interface Config {
|
|||||||
FramerateLimit: FramerateLimit;
|
FramerateLimit: FramerateLimit;
|
||||||
GroupStatusInterval: number;
|
GroupStatusInterval: number;
|
||||||
KeepAliveInterval: number;
|
KeepAliveInterval: number;
|
||||||
|
LobbyKeepAliveInterval: number;
|
||||||
Mark502and504AsNonImportant: boolean;
|
Mark502and504AsNonImportant: boolean;
|
||||||
MemoryManagementSettings: MemoryManagementSettings;
|
MemoryManagementSettings: MemoryManagementSettings;
|
||||||
NVidiaHighlights: boolean;
|
NVidiaHighlights: boolean;
|
||||||
@ -18,7 +19,10 @@ export interface Config {
|
|||||||
PingServerResultSendInterval: number;
|
PingServerResultSendInterval: number;
|
||||||
PingServersInterval: number;
|
PingServersInterval: number;
|
||||||
ReleaseProfiler: ReleaseProfiler;
|
ReleaseProfiler: ReleaseProfiler;
|
||||||
|
RequestConfirmationTimeouts: number[];
|
||||||
|
RequestsMadeThroughLobby: string[];
|
||||||
SecondCycleDelaySeconds: number;
|
SecondCycleDelaySeconds: number;
|
||||||
|
ShouldEstablishLobbyConnection: boolean;
|
||||||
TurnOffLogging: boolean;
|
TurnOffLogging: boolean;
|
||||||
WeaponOverlapDistanceCulling: number;
|
WeaponOverlapDistanceCulling: number;
|
||||||
WebDiagnosticsEnabled: boolean;
|
WebDiagnosticsEnabled: boolean;
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IItemEventRouterRequest } from "../models/eft/itemEvent/IItemEventRouterRequest";
|
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
|
||||||
import { ItemEventRouterDefinition } from "../di/Router";
|
import { ItemEventRouterDefinition } from "../di/Router";
|
||||||
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
|
import { IItemEventRouterRequest } from "../models/eft/itemEvent/IItemEventRouterRequest";
|
||||||
|
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { EventOutputHolder } from "./EventOutputHolder";
|
import { EventOutputHolder } from "./EventOutputHolder";
|
||||||
export declare class ItemEventRouter {
|
export declare class ItemEventRouter {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected itemEventRouters: ItemEventRouterDefinition[];
|
protected itemEventRouters: ItemEventRouterDefinition[];
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], eventOutputHolder: EventOutputHolder);
|
constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder);
|
||||||
handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse;
|
handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import { TraderHelper } from "../helpers/TraderHelper";
|
|||||||
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
||||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { LocalisationService } from "../services/LocalisationService";
|
||||||
import { RagfairCategoriesService } from "../services/RagfairCategoriesService";
|
import { RagfairCategoriesService } from "../services/RagfairCategoriesService";
|
||||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||||
import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService";
|
import { RagfairRequiredItemsService } from "../services/RagfairRequiredItemsService";
|
||||||
@ -14,13 +15,14 @@ export declare class RagfairServer {
|
|||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected ragfairCategoriesService: RagfairCategoriesService;
|
protected ragfairCategoriesService: RagfairCategoriesService;
|
||||||
protected ragfairRequiredItemsService: RagfairRequiredItemsService;
|
protected ragfairRequiredItemsService: RagfairRequiredItemsService;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected traderAssortHelper: TraderAssortHelper;
|
protected traderAssortHelper: TraderAssortHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, traderHelper: TraderHelper, traderAssortHelper: TraderAssortHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, localisationService: LocalisationService, traderHelper: TraderHelper, traderAssortHelper: TraderAssortHelper, configServer: ConfigServer);
|
||||||
load(): void;
|
load(): Promise<void>;
|
||||||
update(): void;
|
update(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Get traders who need to be periodically refreshed
|
* Get traders who need to be periodically refreshed
|
||||||
* @returns string array of traders
|
* @returns string array of traders
|
||||||
|
@ -24,6 +24,18 @@ export declare class BotEquipmentFilterService {
|
|||||||
* @param baseValues Values to update
|
* @param baseValues Values to update
|
||||||
*/
|
*/
|
||||||
protected adjustChances(equipmentChanges: Record<string, number>, baseValues: EquipmentChances | ModsChances): void;
|
protected adjustChances(equipmentChanges: Record<string, number>, baseValues: EquipmentChances | ModsChances): void;
|
||||||
|
/**
|
||||||
|
* Get equipment settings for bot
|
||||||
|
* @param botEquipmentRole equipment role to return
|
||||||
|
* @returns EquipmentFilters object
|
||||||
|
*/
|
||||||
|
getBotEquipmentSettings(botEquipmentRole: string): EquipmentFilters;
|
||||||
|
/**
|
||||||
|
* Get weapon sight whitelist for a specific bot type
|
||||||
|
* @param botEquipmentRole equipment role of bot to look up
|
||||||
|
* @returns Dictionary of weapon type and their whitelisted scope types
|
||||||
|
*/
|
||||||
|
getBotWeaponSightWhitelist(botEquipmentRole: string): Record<string, string[]>;
|
||||||
/**
|
/**
|
||||||
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
* Get an object that contains equipment and cartridge blacklists for a specified bot type
|
||||||
* @param botRole Role of the bot we want the blacklist for
|
* @param botRole Role of the bot we want the blacklist for
|
||||||
|
65
Live/CWX_DebugTool/types/services/BotEquipmentModPoolService.d.ts
vendored
Normal file
65
Live/CWX_DebugTool/types/services/BotEquipmentModPoolService.d.ts
vendored
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { Mods } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { VFS } from "../utils/VFS";
|
||||||
|
/** Store a mapping between weapons, their slots and the items that fit those slots */
|
||||||
|
export declare class BotEquipmentModPoolService {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected vfs: VFS;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected botConfig: IBotConfig;
|
||||||
|
protected weaponModPool: Mods;
|
||||||
|
protected gearModPool: Mods;
|
||||||
|
protected weaponPoolGenerated: boolean;
|
||||||
|
protected armorPoolGenerated: boolean;
|
||||||
|
constructor(logger: ILogger, vfs: VFS, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Store dictionary of mods for each item passed in
|
||||||
|
* @param items items to find related mods and store in modPool
|
||||||
|
*/
|
||||||
|
protected generatePool(items: ITemplateItem[], poolType: string): void;
|
||||||
|
/**
|
||||||
|
* Empty the mod pool
|
||||||
|
*/
|
||||||
|
resetPool(): void;
|
||||||
|
/**
|
||||||
|
* Get array of compatible mods for an items mod slot (generate pool if it doesnt exist already)
|
||||||
|
* @param itemTpl item to look up
|
||||||
|
* @param slotName slot to get compatible mods for
|
||||||
|
* @returns tpls that fit the slot
|
||||||
|
*/
|
||||||
|
getCompatibleModsForWeaponSlot(itemTpl: string, slotName: string): string[];
|
||||||
|
/**
|
||||||
|
* Get array of compatible mods for an items mod slot (generate pool if it doesnt exist already)
|
||||||
|
* @param itemTpl item to look up
|
||||||
|
* @param slotName slot to get compatible mods for
|
||||||
|
* @returns tpls that fit the slot
|
||||||
|
*/
|
||||||
|
getCompatibleModsFoGearSlot(itemTpl: string, slotName: string): string[];
|
||||||
|
/**
|
||||||
|
* Get mods for a piece of gear by its tpl
|
||||||
|
* @param itemTpl items tpl to look up mods for
|
||||||
|
* @returns Dictionary of mods (keys are mod slot names) with array of compatible mod tpls as value
|
||||||
|
*/
|
||||||
|
getModsFoGearSlot(itemTpl: string): Record<string, string[]>;
|
||||||
|
/**
|
||||||
|
* Get mods for a weapon by its tpl
|
||||||
|
* @param itemTpl Weapons tpl to look up mods for
|
||||||
|
* @returns Dictionary of mods (keys are mod slot names) with array of compatible mod tpls as value
|
||||||
|
*/
|
||||||
|
getModsForWeaponSlot(itemTpl: string): Record<string, string[]>;
|
||||||
|
/**
|
||||||
|
* Create weapon mod pool and set generated flag to true
|
||||||
|
*/
|
||||||
|
protected generateWeaponPool(): void;
|
||||||
|
/**
|
||||||
|
* Create gear mod pool and set generated flag to true
|
||||||
|
*/
|
||||||
|
protected generateGearPool(): void;
|
||||||
|
}
|
@ -3,32 +3,34 @@ import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
|||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { LocalisationService } from "./LocalisationService";
|
||||||
export declare class BotGenerationCacheService {
|
export declare class BotGenerationCacheService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
protected storedBots: Map<string, IBotBase[]>;
|
protected storedBots: Map<string, IBotBase[]>;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, botHelper: BotHelper);
|
constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper);
|
||||||
/**
|
/**
|
||||||
* Store array of bots in cache, shuffle results before storage
|
* Store array of bots in cache, shuffle results before storage
|
||||||
* @param botsToStore Bots we want to store in the cache
|
* @param botsToStore Bots we want to store in the cache
|
||||||
*/
|
*/
|
||||||
storeBots(botsToStore: IBotBase[]): void;
|
storeBots(key: string, botsToStore: IBotBase[]): void;
|
||||||
/**
|
/**
|
||||||
* Find and return a bot based on its role
|
* Find and return a bot based on its role
|
||||||
* Remove bot from internal array so it can't be retreived again
|
* Remove bot from internal array so it can't be retreived again
|
||||||
* @param role role to retreive (assault/bossTagilla etc)
|
* @param key role to retreive (assault/bossTagilla etc)
|
||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
*/
|
*/
|
||||||
getBot(role: string): IBotBase;
|
getBot(key: string): IBotBase;
|
||||||
/**
|
/**
|
||||||
* Remove all cached bot profiles
|
* Remove all cached bot profiles
|
||||||
*/
|
*/
|
||||||
clearStoredBots(): void;
|
clearStoredBots(): void;
|
||||||
/**
|
/**
|
||||||
* Does cache have bots
|
* Does cache have a bot with requested key
|
||||||
* @returns true if empty
|
* @returns false if empty
|
||||||
*/
|
*/
|
||||||
cacheHasBotOfRole(role: string): boolean;
|
cacheHasBotOfRole(key: string): boolean;
|
||||||
}
|
}
|
||||||
|
@ -5,15 +5,17 @@ import { BotLootCache, LootCacheType } from "../models/spt/bots/BotLootCache";
|
|||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
import { JsonUtil } from "../utils/JsonUtil";
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { LocalisationService } from "./LocalisationService";
|
||||||
import { RagfairPriceService } from "./RagfairPriceService";
|
import { RagfairPriceService } from "./RagfairPriceService";
|
||||||
export declare class BotLootCacheService {
|
export declare class BotLootCacheService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected pmcLootGenerator: PMCLootGenerator;
|
protected pmcLootGenerator: PMCLootGenerator;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected ragfairPriceService: RagfairPriceService;
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
protected lootCache: Record<string, BotLootCache>;
|
protected lootCache: Record<string, BotLootCache>;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, ragfairPriceService: RagfairPriceService);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService);
|
||||||
/**
|
/**
|
||||||
* Remove all cached bot loot data
|
* Remove all cached bot loot data
|
||||||
*/
|
*/
|
||||||
|
54
Live/CWX_DebugTool/types/services/BotWeaponModLimitService.d.ts
vendored
Normal file
54
Live/CWX_DebugTool/types/services/BotWeaponModLimitService.d.ts
vendored
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
import { ItemHelper } from "../helpers/ItemHelper";
|
||||||
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
export declare class BotModLimits {
|
||||||
|
scope: ItemCount;
|
||||||
|
scopeMax: number;
|
||||||
|
scopeBaseTypes: string[];
|
||||||
|
flashlightLaser: ItemCount;
|
||||||
|
flashlightLaserMax: number;
|
||||||
|
flashlgihtLaserBaseTypes: string[];
|
||||||
|
}
|
||||||
|
export declare class ItemCount {
|
||||||
|
count: number;
|
||||||
|
}
|
||||||
|
export declare class BotWeaponModLimitService {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected botConfig: IBotConfig;
|
||||||
|
constructor(logger: ILogger, configServer: ConfigServer, itemHelper: ItemHelper);
|
||||||
|
/**
|
||||||
|
* Initalise mod limits to be used when generating a weapon
|
||||||
|
* @param botRole "assault", "bossTagilla" or "pmc"
|
||||||
|
* @returns BotModLimits object
|
||||||
|
*/
|
||||||
|
getWeaponModLimits(botRole: string): BotModLimits;
|
||||||
|
/**
|
||||||
|
* Check if weapon mod item is on limited list + has surpassed the limit set for it
|
||||||
|
* Exception: Always allow ncstar backup mount
|
||||||
|
* Exception: Always allow scopes with a scope for a parent
|
||||||
|
* Exception: Always disallow mounts that hold only scopes once scope limit reached
|
||||||
|
* Exception: Always disallow mounts that hold only flashlights once flashlight limit reached
|
||||||
|
* @param botRole role the bot has e.g. assault
|
||||||
|
* @param modTemplate mods template data
|
||||||
|
* @param modLimits limits set for weapon being generated for this bot
|
||||||
|
* @param modsParent The parent of the mod to be checked
|
||||||
|
* @returns true if over item limit
|
||||||
|
*/
|
||||||
|
weaponModHasReachedLimit(botRole: string, modTemplate: ITemplateItem, modLimits: BotModLimits, modsParent: ITemplateItem, weapon: Item[]): boolean;
|
||||||
|
/**
|
||||||
|
* Check if the specific item type on the weapon has reached the set limit
|
||||||
|
* @param modTpl log mod tpl if over type limit
|
||||||
|
* @param currentCount current number of this item on gun
|
||||||
|
* @param maxLimit mod limit allowed
|
||||||
|
* @param botRole role of bot we're checking weapon of
|
||||||
|
* @returns true if limit reached
|
||||||
|
*/
|
||||||
|
protected weaponModLimitReached(modTpl: string, currentCount: {
|
||||||
|
count: number;
|
||||||
|
}, maxLimit: number, botRole: string): boolean;
|
||||||
|
}
|
42
Live/CWX_DebugTool/types/services/CustomLocationWaveService.d.ts
vendored
Normal file
42
Live/CWX_DebugTool/types/services/CustomLocationWaveService.d.ts
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
import { BossLocationSpawn, Wave } from "../models/eft/common/ILocationBase";
|
||||||
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
export declare class CustomLocationWaveService {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected locationConfig: ILocationConfig;
|
||||||
|
constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Add a boss wave to a map
|
||||||
|
* @param locationId e.g. factory4_day, bigmap
|
||||||
|
* @param waveToAdd Boss wave to add to map
|
||||||
|
*/
|
||||||
|
addBossWaveToMap(locationId: string, waveToAdd: BossLocationSpawn): void;
|
||||||
|
/**
|
||||||
|
* Add a normal bot wave to a map
|
||||||
|
* @param locationId e.g. factory4_day, bigmap
|
||||||
|
* @param waveToAdd Wave to add to map
|
||||||
|
*/
|
||||||
|
addNormalWaveToMap(locationId: string, waveToAdd: Wave): void;
|
||||||
|
/**
|
||||||
|
* Clear all custom boss waves from a map
|
||||||
|
* @param locationId e.g. factory4_day, bigmap
|
||||||
|
*/
|
||||||
|
clearBossWavesForMap(locationId: string): void;
|
||||||
|
/**
|
||||||
|
* Clear all custom normal waves from a map
|
||||||
|
* @param locationId e.g. factory4_day, bigmap
|
||||||
|
*/
|
||||||
|
clearNormalWavesForMap(locationId: string): void;
|
||||||
|
/**
|
||||||
|
* Add custom boss and normal waves to maps found in config/location.json to db
|
||||||
|
*/
|
||||||
|
applyWaveChangesToAllMaps(): void;
|
||||||
|
}
|
@ -15,6 +15,7 @@ import { JsonUtil } from "../utils/JsonUtil";
|
|||||||
import { RandomUtil } from "../utils/RandomUtil";
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
import { TimeUtil } from "../utils/TimeUtil";
|
import { TimeUtil } from "../utils/TimeUtil";
|
||||||
import { ItemFilterService } from "./ItemFilterService";
|
import { ItemFilterService } from "./ItemFilterService";
|
||||||
|
import { LocalisationService } from "./LocalisationService";
|
||||||
/**
|
/**
|
||||||
* Handle actions surrounding Fence
|
* Handle actions surrounding Fence
|
||||||
* e.g. generating or refreshing assorts / get next refresh time
|
* e.g. generating or refreshing assorts / get next refresh time
|
||||||
@ -30,11 +31,12 @@ export declare class FenceService {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected fenceAssort: ITraderAssort;
|
protected fenceAssort: ITraderAssort;
|
||||||
protected traderConfig: ITraderConfig;
|
protected traderConfig: ITraderConfig;
|
||||||
protected nextMiniRefreshTimestamp: number;
|
protected nextMiniRefreshTimestamp: number;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
protected setFenceAssort(fenceAssort: ITraderAssort): void;
|
protected setFenceAssort(fenceAssort: ITraderAssort): void;
|
||||||
/**
|
/**
|
||||||
* Get assorts player can purchase
|
* Get assorts player can purchase
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { DialogueHelper } from "../helpers/DialogueHelper";
|
import { DialogueHelper } from "../helpers/DialogueHelper";
|
||||||
|
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||||
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
|
import { SecureContainerHelper } from "../helpers/SecureContainerHelper";
|
||||||
import { TraderHelper } from "../helpers/TraderHelper";
|
import { TraderHelper } from "../helpers/TraderHelper";
|
||||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||||
@ -21,10 +22,11 @@ export declare class InsuranceService {
|
|||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
|
protected handbookHelper: HandbookHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insured: Record<string, Record<string, Item[]>>;
|
protected insured: Record<string, Record<string, Item[]>>;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, configServer: ConfigServer);
|
||||||
insuranceExists(sessionId: string): boolean;
|
insuranceExists(sessionId: string): boolean;
|
||||||
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
|
insuranceTraderArrayExists(sessionId: string, traderId: string): boolean;
|
||||||
getInsurance(sessionId: string): Record<string, Item[]>;
|
getInsurance(sessionId: string): Record<string, Item[]>;
|
||||||
|
37
Live/CWX_DebugTool/types/services/ItemBaseClassService.d.ts
vendored
Normal file
37
Live/CWX_DebugTool/types/services/ItemBaseClassService.d.ts
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
/**
|
||||||
|
* Cache the baseids for each item in the tiems db inside a dictionary
|
||||||
|
*/
|
||||||
|
export declare class ItemBaseClassService {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected itemBaseClassesCache: Record<string, string[]>;
|
||||||
|
protected cacheGenerated: boolean;
|
||||||
|
constructor(logger: ILogger, databaseServer: DatabaseServer);
|
||||||
|
/**
|
||||||
|
* Create cache and store inside ItemBaseClassService
|
||||||
|
*/
|
||||||
|
hydrateItemBaseClassCache(): void;
|
||||||
|
/**
|
||||||
|
* Helper method, recursivly iterate through items parent items, finding and adding ids to dictionary
|
||||||
|
* @param itemIdToUpdate item tpl to store base ids against in dictionary
|
||||||
|
* @param item item being checked
|
||||||
|
* @param allDbItems all items in db
|
||||||
|
*/
|
||||||
|
protected addBaseItems(itemIdToUpdate: string, item: ITemplateItem, allDbItems: Record<string, ITemplateItem>): void;
|
||||||
|
/**
|
||||||
|
* Does item tpl inherit from the requested base class
|
||||||
|
* @param itemTpl item to check base classes of
|
||||||
|
* @param baseClass base class to check for
|
||||||
|
* @returns true if item inherits from base class passed in
|
||||||
|
*/
|
||||||
|
itemHasBaseClass(itemTpl: string, baseClasses: string[]): boolean;
|
||||||
|
/**
|
||||||
|
* Get base classes item inherits from
|
||||||
|
* @param itemTpl item to get base classes for
|
||||||
|
* @returns array of base classes
|
||||||
|
*/
|
||||||
|
getItemBaseClasses(itemTpl: string): string[];
|
||||||
|
}
|
@ -1,5 +1,4 @@
|
|||||||
import { ILocaleConfig } from "../models/spt/config/ILocaleConfig";
|
import { ILocaleConfig } from "../models/spt/config/ILocaleConfig";
|
||||||
import { ILocaleGlobalBase } from "../models/spt/server/ILocaleBase";
|
|
||||||
import { ILogger } from "../models/spt/utils/ILogger";
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "../servers/ConfigServer";
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
@ -14,9 +13,9 @@ export declare class LocaleService {
|
|||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get the eft globals db file based on the configured locale in config/locale.json, if not found, fall back to 'en'
|
* Get the eft globals db file based on the configured locale in config/locale.json, if not found, fall back to 'en'
|
||||||
* @returns ILocaleGlobalBase
|
* @returns dictionary
|
||||||
*/
|
*/
|
||||||
getLocaleDb(): ILocaleGlobalBase;
|
getLocaleDb(): Record<string, string>;
|
||||||
/**
|
/**
|
||||||
* Gets the game locale key from the locale.json file,
|
* Gets the game locale key from the locale.json file,
|
||||||
* if value is 'system' get system locale
|
* if value is 'system' get system locale
|
||||||
|
28
Live/CWX_DebugTool/types/services/OpenZoneService.d.ts
vendored
Normal file
28
Live/CWX_DebugTool/types/services/OpenZoneService.d.ts
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { JsonUtil } from "../utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "../utils/RandomUtil";
|
||||||
|
import { LocalisationService } from "./LocalisationService";
|
||||||
|
/** Service for adding new zones to a maps OpenZones property */
|
||||||
|
export declare class OpenZoneService {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected locationConfig: ILocationConfig;
|
||||||
|
constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Add open zone to specified map
|
||||||
|
* @param locationId map location (e.g. factory4_day)
|
||||||
|
* @param zoneToAdd zone to add
|
||||||
|
*/
|
||||||
|
addZoneToMap(locationId: string, zoneToAdd: string): void;
|
||||||
|
/**
|
||||||
|
* Add open zones to all maps found in config/location.json to db
|
||||||
|
*/
|
||||||
|
applyZoneChangesToAllMaps(): void;
|
||||||
|
}
|
@ -1,3 +1,4 @@
|
|||||||
|
import { RagfairOfferHolder } from "../utils/RagfairOfferHolder";
|
||||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||||
import { Item } from "../models/eft/common/tables/IItem";
|
import { Item } from "../models/eft/common/tables/IItem";
|
||||||
@ -26,10 +27,9 @@ export declare class RagfairOfferService {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected playerOffersLoaded: boolean;
|
protected playerOffersLoaded: boolean;
|
||||||
protected expiredOffers: Item[];
|
protected expiredOffers: Record<string, IRagfairOffer>;
|
||||||
/** offerId, offer */
|
|
||||||
protected offers: Record<string, IRagfairOffer>;
|
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
|
protected ragfairOfferHandler: RagfairOfferHolder;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, ragfairCategoriesService: RagfairCategoriesService, profileHelper: ProfileHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, ragfairCategoriesService: RagfairCategoriesService, profileHelper: ProfileHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get all offers
|
* Get all offers
|
||||||
@ -45,7 +45,7 @@ export declare class RagfairOfferService {
|
|||||||
* Get an array of expired items not yet processed into new offers
|
* Get an array of expired items not yet processed into new offers
|
||||||
* @returns items that need to be turned into offers
|
* @returns items that need to be turned into offers
|
||||||
*/
|
*/
|
||||||
getExpiredOffers(): Item[];
|
getExpiredOfferItems(): Item[];
|
||||||
resetExpiredOffers(): void;
|
resetExpiredOffers(): void;
|
||||||
/**
|
/**
|
||||||
* Does the offer exist on the ragfair
|
* Does the offer exist on the ragfair
|
||||||
@ -64,12 +64,6 @@ export declare class RagfairOfferService {
|
|||||||
traderOffersNeedRefreshing(traderID: string): boolean;
|
traderOffersNeedRefreshing(traderID: string): boolean;
|
||||||
addPlayerOffers(): void;
|
addPlayerOffers(): void;
|
||||||
expireStaleOffers(): void;
|
expireStaleOffers(): void;
|
||||||
/**
|
|
||||||
* Get an array of stale offers that are still shown to player
|
|
||||||
* @returns IRagfairOffer array
|
|
||||||
*/
|
|
||||||
protected getStaleOffers(): IRagfairOffer[];
|
|
||||||
protected isStale(offer: IRagfairOffer, time: number): boolean;
|
|
||||||
protected processStaleOffer(staleOffer: IRagfairOffer): void;
|
protected processStaleOffer(staleOffer: IRagfairOffer): void;
|
||||||
protected returnPlayerOffer(offer: IRagfairOffer): IItemEventRouterResponse;
|
protected returnPlayerOffer(offer: IRagfairOffer): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
protected generatedStaticPrices: boolean;
|
protected generatedStaticPrices: boolean;
|
||||||
protected prices: IRagfairServerPrices;
|
protected prices: IRagfairServerPrices;
|
||||||
constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer);
|
constructor(handbookHelper: HandbookHelper, databaseServer: DatabaseServer, logger: ILogger, itemHelper: ItemHelper, presetHelper: PresetHelper, randomUtil: RandomUtil, configServer: ConfigServer);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
/**
|
/**
|
||||||
* Iterate over all items of type "Item" in db and get template price, store in cache
|
* Iterate over all items of type "Item" in db and get template price, store in cache
|
||||||
|
@ -7,6 +7,6 @@ export declare class RagfairRequiredItemsService {
|
|||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected requiredItemsCache: {};
|
protected requiredItemsCache: {};
|
||||||
constructor(logger: ILogger, paymentHelper: PaymentHelper, ragfairOfferService: RagfairOfferService);
|
constructor(logger: ILogger, paymentHelper: PaymentHelper, ragfairOfferService: RagfairOfferService);
|
||||||
getRequiredItems(searchId: string): any;
|
getRequiredItemsById(searchId: string): any;
|
||||||
buildRequiredItemTable(): void;
|
buildRequiredItemTable(): void;
|
||||||
}
|
}
|
||||||
|
69
Live/CWX_DebugTool/types/services/SeasonalEventService.d.ts
vendored
Normal file
69
Live/CWX_DebugTool/types/services/SeasonalEventService.d.ts
vendored
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
import { Config } from "../models/eft/common/IGlobals";
|
||||||
|
import { Inventory } from "../models/eft/common/tables/IBotType";
|
||||||
|
import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig";
|
||||||
|
import { ILogger } from "../models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "../servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||||
|
import { LocalisationService } from "./LocalisationService";
|
||||||
|
export declare class SeasonalEventService {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected seasonalEventConfig: ISeasonalEventConfig;
|
||||||
|
constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
|
protected get events(): Record<string, string>;
|
||||||
|
get christmasEventItems(): string[];
|
||||||
|
/**
|
||||||
|
* Get an array of christmas items found in bots inventories as loot
|
||||||
|
* @returns array
|
||||||
|
*/
|
||||||
|
getChristmasEventItems(): string[];
|
||||||
|
itemIsChristmasRelated(itemId: string): boolean;
|
||||||
|
/**
|
||||||
|
* is christmas event active
|
||||||
|
* @returns true if active
|
||||||
|
*/
|
||||||
|
christmasEventEnabled(): boolean;
|
||||||
|
/**
|
||||||
|
* Is detection of seasonal events enabled (halloween / christmas)
|
||||||
|
* @returns true if seasonal events should be checked for
|
||||||
|
*/
|
||||||
|
isAutomaticEventDetectionEnabled(): boolean;
|
||||||
|
/**
|
||||||
|
* Get a dictionary of gear changes to apply to bots for a specific event e.g. Christmas/Halloween
|
||||||
|
* @param eventName Name of event to get gear changes for
|
||||||
|
* @returns bots with equipment changes
|
||||||
|
*/
|
||||||
|
protected getEventBotGear(eventName: string): Record<string, Record<string, Record<string, number>>>;
|
||||||
|
/**
|
||||||
|
* Get the dates each seasonal event starts and ends
|
||||||
|
* @returns Record with event name + start/end date
|
||||||
|
*/
|
||||||
|
getEventDetails(): ISeasonalEvent[];
|
||||||
|
/**
|
||||||
|
* Check if current date falls inside any of the seasons events pased in, if so, handle them
|
||||||
|
*/
|
||||||
|
checkForAndEnableSeasonalEvents(): void;
|
||||||
|
/**
|
||||||
|
* Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService)
|
||||||
|
* @param nodeInventory Bots inventory to iterate over
|
||||||
|
*/
|
||||||
|
removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void;
|
||||||
|
/**
|
||||||
|
* Make adjusted to server code based on the name of the event passed in
|
||||||
|
* @param globalConfig globals.json
|
||||||
|
* @param eventName Name of the event to enable. e.g. Christmas
|
||||||
|
*/
|
||||||
|
protected updateGlobalEvents(globalConfig: Config, eventName: string): void;
|
||||||
|
/**
|
||||||
|
* Read in data from seasonalEvents.json and add found equipment items to bots
|
||||||
|
* @param eventName Name of the event to read equipment in from config
|
||||||
|
*/
|
||||||
|
protected addEventGearToScavs(eventName: string): void;
|
||||||
|
protected addPumpkinsToScavBackpacks(): void;
|
||||||
|
/**
|
||||||
|
* Set Khorovod(dancing tree) chance to 100% on all maps that support it
|
||||||
|
*/
|
||||||
|
protected enableDancingTree(): void;
|
||||||
|
}
|
@ -3,6 +3,6 @@ export declare class OnLoadMod extends OnLoad {
|
|||||||
private onLoadOverride;
|
private onLoadOverride;
|
||||||
private getRouteOverride;
|
private getRouteOverride;
|
||||||
constructor(onLoadOverride: () => void, getRouteOverride: () => string);
|
constructor(onLoadOverride: () => void, getRouteOverride: () => string);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,6 @@ export declare class OnUpdateMod extends OnUpdate {
|
|||||||
private onUpdateOverride;
|
private onUpdateOverride;
|
||||||
private getRouteOverride;
|
private getRouteOverride;
|
||||||
constructor(onUpdateOverride: (timeSinceLastRun: number) => boolean, getRouteOverride: () => string);
|
constructor(onUpdateOverride: (timeSinceLastRun: number) => boolean, getRouteOverride: () => string);
|
||||||
onUpdate(timeSinceLastRun: number): boolean;
|
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
}
|
}
|
||||||
|
4
Live/CWX_DebugTool/types/utils/App.d.ts
vendored
4
Live/CWX_DebugTool/types/utils/App.d.ts
vendored
@ -11,7 +11,7 @@ export declare class App {
|
|||||||
protected onUpdateComponents: OnUpdate[];
|
protected onUpdateComponents: OnUpdate[];
|
||||||
protected onUpdateLastRun: {};
|
protected onUpdateLastRun: {};
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]);
|
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]);
|
||||||
load(): void;
|
load(): Promise<void>;
|
||||||
protected update(onUpdateComponents: OnUpdate[]): void;
|
protected update(onUpdateComponents: OnUpdate[]): Promise<void>;
|
||||||
protected logUpdateException(err: any, updateable: OnUpdate): void;
|
protected logUpdateException(err: any, updateable: OnUpdate): void;
|
||||||
}
|
}
|
||||||
|
@ -14,13 +14,13 @@ export declare class DatabaseImporter extends OnLoad {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected imageRouter: ImageRouter;
|
protected imageRouter: ImageRouter;
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter);
|
||||||
onLoad(): void;
|
onLoad(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Read all json files in database folder and map into a json object
|
* Read all json files in database folder and map into a json object
|
||||||
* @param filepath path to database folder
|
* @param filepath path to database folder
|
||||||
*/
|
*/
|
||||||
protected hydrateDatabase(filepath: string): void;
|
protected hydrateDatabase(filepath: string): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
loadRecursive(filepath: string): IDatabaseTables;
|
loadRecursive(filepath: string): Promise<IDatabaseTables>;
|
||||||
loadImages(filepath: string): void;
|
loadImages(filepath: string): void;
|
||||||
}
|
}
|
||||||
|
1
Live/CWX_DebugTool/types/utils/JsonUtil.d.ts
vendored
1
Live/CWX_DebugTool/types/utils/JsonUtil.d.ts
vendored
@ -6,6 +6,7 @@ export declare class JsonUtil {
|
|||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected fileHashes: any;
|
protected fileHashes: any;
|
||||||
|
protected jsonCacheExists: boolean;
|
||||||
constructor(vfs: VFS, hashUtil: HashUtil, logger: ILogger);
|
constructor(vfs: VFS, hashUtil: HashUtil, logger: ILogger);
|
||||||
/**
|
/**
|
||||||
* From object to string
|
* From object to string
|
||||||
|
24
Live/CWX_DebugTool/types/utils/RagfairOfferHolder.d.ts
vendored
Normal file
24
Live/CWX_DebugTool/types/utils/RagfairOfferHolder.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
||||||
|
export declare class RagfairOfferHolder {
|
||||||
|
private offersById;
|
||||||
|
private offersByTemplate;
|
||||||
|
private offersByTrader;
|
||||||
|
constructor();
|
||||||
|
getOfferById(id: string): IRagfairOffer;
|
||||||
|
getOffersByTemplate(templateId: string): Array<IRagfairOffer>;
|
||||||
|
getOffersByTrader(traderId: string): Array<IRagfairOffer>;
|
||||||
|
getOffers(): Array<IRagfairOffer>;
|
||||||
|
addOffers(offers: Array<IRagfairOffer>): void;
|
||||||
|
addOffer(offer: IRagfairOffer): void;
|
||||||
|
removeOffer(offer: IRagfairOffer): void;
|
||||||
|
removeOffers(offers: Array<IRagfairOffer>): void;
|
||||||
|
removeOfferByTrader(traderId: string): void;
|
||||||
|
/**
|
||||||
|
* Get an array of stale offers that are still shown to player
|
||||||
|
* @returns IRagfairOffer array
|
||||||
|
*/
|
||||||
|
getStaleOffers(time: number): Array<IRagfairOffer>;
|
||||||
|
private addOfferByTemplates;
|
||||||
|
private addOfferByTrader;
|
||||||
|
protected isStale(offer: IRagfairOffer, time: number): boolean;
|
||||||
|
}
|
@ -30,7 +30,11 @@ export declare class Watermark {
|
|||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
getVersionTag(withEftVersion?: boolean): string;
|
getVersionTag(withEftVersion?: boolean): string;
|
||||||
getVersionLabel(): string;
|
/**
|
||||||
|
* Get text shown in game on screen, can't be translated as it breaks bsgs client when certian characters are used
|
||||||
|
* @returns string
|
||||||
|
*/
|
||||||
|
getInGameVersionLabel(): string;
|
||||||
/** Set window title */
|
/** Set window title */
|
||||||
setTitle(): void;
|
setTitle(): void;
|
||||||
/** Reset console cursor to top */
|
/** Reset console cursor to top */
|
||||||
|
Binary file not shown.
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "MasterKey",
|
"name": "MasterKey",
|
||||||
"author": "CWX",
|
"author": "CWX",
|
||||||
"version": "1.3.9",
|
"version": "1.4.0",
|
||||||
"license": "NCSA",
|
"license": "NCSA",
|
||||||
"main": "src/mod.js",
|
"main": "src/mod.js",
|
||||||
"akiVersion": "3.3.0",
|
"akiVersion": "3.4.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"setup": "npm i",
|
"setup": "npm i",
|
||||||
"build": "node ./packageBuild.ts"
|
"build": "node ./packageBuild.ts"
|
@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net472</TargetFramework>
|
<TargetFramework>net472</TargetFramework>
|
||||||
<AssemblyName>CWX-MasterKey</AssemblyName>
|
<AssemblyName>CWX-MasterKey</AssemblyName>
|
||||||
<Version>1.3.9</Version>
|
<Version>1.4.0</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace CWX_MasterKey
|
namespace CWX_MasterKey
|
||||||
{
|
{
|
||||||
[BepInPlugin("com.CWX.MasterKey", "CWX-MasterKey", "1.3.9")]
|
[BepInPlugin("com.CWX.MasterKey", "CWX-MasterKey", "1.4.0")]
|
||||||
public class MasterKey : BaseUnityPlugin
|
public class MasterKey : BaseUnityPlugin
|
||||||
{
|
{
|
||||||
private void Awake()
|
private void Awake()
|
||||||
|
4
Live/CWX_MasterKey/server/dist/package.json
vendored
4
Live/CWX_MasterKey/server/dist/package.json
vendored
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "MasterKey",
|
"name": "MasterKey",
|
||||||
"author": "CWX",
|
"author": "CWX",
|
||||||
"version": "1.3.9",
|
"version": "1.4.0",
|
||||||
"license": "NCSA",
|
"license": "NCSA",
|
||||||
"main": "src/mod.js",
|
"main": "src/mod.js",
|
||||||
"akiVersion": "3.3.0",
|
"akiVersion": "3.4.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"setup": "npm i",
|
"setup": "npm i",
|
||||||
"build": "node ./packageBuild.ts"
|
"build": "node ./packageBuild.ts"
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user