mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
Merge branch '3.8.1-DEV' of https://dev.sp-tarkov.com/SPT-AKI/Server into 3.8.1-DEV
This commit is contained in:
commit
62a0731cd1
@ -317,7 +317,9 @@
|
|||||||
"exusec": {
|
"exusec": {
|
||||||
"60098ad7c2240c0fe85c570a": 2
|
"60098ad7c2240c0fe85c570a": 2
|
||||||
},
|
},
|
||||||
"bossbully": {},
|
"bossbully": {
|
||||||
|
"5448ba0b4bdc2d02308b456c": 1
|
||||||
|
},
|
||||||
"bossgluhar": {},
|
"bossgluhar": {},
|
||||||
"bosskilla": {},
|
"bosskilla": {},
|
||||||
"bosskojaniy": {
|
"bosskojaniy": {
|
||||||
@ -325,7 +327,8 @@
|
|||||||
"5c94bbff86f7747ee735c08f": 1
|
"5c94bbff86f7747ee735c08f": 1
|
||||||
},
|
},
|
||||||
"bosssanitar": {
|
"bosssanitar": {
|
||||||
"5efde6b4f5448336730dbd61": 1
|
"5efde6b4f5448336730dbd61": 1,
|
||||||
|
"5eff09cd30a7dc22fd1ddfed": 1
|
||||||
},
|
},
|
||||||
"bosstagilla": {},
|
"bosstagilla": {},
|
||||||
"bossknight": {},
|
"bossknight": {},
|
||||||
|
@ -45,7 +45,7 @@ export class AssortHelper
|
|||||||
return traderAssorts;
|
return traderAssorts;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Iterate over all assorts, removing items that don't fulfil the requirements
|
// Iterate over all assorts, removing items that haven't yet been unlocked by quests (ASSORTMENT_UNLOCK)
|
||||||
for (const assortId in traderAssorts.loyal_level_items)
|
for (const assortId in traderAssorts.loyal_level_items)
|
||||||
{
|
{
|
||||||
// Get quest id that unlocks assort + statuses quest can be in to show assort
|
// Get quest id that unlocks assort + statuses quest can be in to show assort
|
||||||
@ -116,7 +116,7 @@ export class AssortHelper
|
|||||||
return assort;
|
return assort;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove items not unlocked from quest status change (ASSORTMENT_UNLOCK)
|
// Remove items restricted by loyalty levels above those reached by the player
|
||||||
for (const itemId in assort.loyal_level_items)
|
for (const itemId in assort.loyal_level_items)
|
||||||
{
|
{
|
||||||
if (assort.loyal_level_items[itemId] > pmcProfile.TradersInfo[traderId].loyaltyLevel)
|
if (assort.loyal_level_items[itemId] > pmcProfile.TradersInfo[traderId].loyaltyLevel)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
export enum Weapons127x55
|
export enum Weapons127x55
|
||||||
{
|
{
|
||||||
ASH_12 = "5cadfbf7ae92152ac412eeef",
|
ASH_12 = "5cadfbf7ae92152ac412eeef",
|
||||||
|
RSH_12 = "633ec7c2a6918cb895019c6c",
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum Weapons86x70
|
export enum Weapons86x70
|
||||||
@ -208,3 +209,9 @@ export enum Weapons68x51
|
|||||||
{
|
{
|
||||||
MCX_SPEAR = "65290f395ae2ae97b80fdf2d",
|
MCX_SPEAR = "65290f395ae2ae97b80fdf2d",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export enum Weapons40x46
|
||||||
|
{
|
||||||
|
M32A1 = "6275303a9f372d6ea97f9ec7",
|
||||||
|
FN40GL = "5e81ebcd8e146c7080625e15",
|
||||||
|
}
|
||||||
|
@ -17,6 +17,7 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
|||||||
export class HttpServer
|
export class HttpServer
|
||||||
{
|
{
|
||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
|
protected started: boolean;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@inject("WinstonLogger") protected logger: ILogger,
|
@inject("WinstonLogger") protected logger: ILogger,
|
||||||
@ -37,6 +38,8 @@ export class HttpServer
|
|||||||
*/
|
*/
|
||||||
public load(): void
|
public load(): void
|
||||||
{
|
{
|
||||||
|
this.started = false;
|
||||||
|
|
||||||
/* create server */
|
/* create server */
|
||||||
const httpServer: Server = http.createServer();
|
const httpServer: Server = http.createServer();
|
||||||
|
|
||||||
@ -48,6 +51,7 @@ export class HttpServer
|
|||||||
/* Config server to listen on a port */
|
/* Config server to listen on a port */
|
||||||
httpServer.listen(this.httpConfig.port, this.httpConfig.ip, () =>
|
httpServer.listen(this.httpConfig.port, this.httpConfig.ip, () =>
|
||||||
{
|
{
|
||||||
|
this.started = true;
|
||||||
this.logger.success(
|
this.logger.success(
|
||||||
this.localisationService.getText("started_webserver_success", this.httpServerHelper.getBackendUrl()),
|
this.localisationService.getText("started_webserver_success", this.httpServerHelper.getBackendUrl()),
|
||||||
);
|
);
|
||||||
@ -123,4 +127,9 @@ export class HttpServer
|
|||||||
|
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public isStarted(): boolean
|
||||||
|
{
|
||||||
|
return this.started;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
|||||||
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
|
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
|
import { HttpServer } from "@spt-aki/servers/HttpServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { EncodingUtil } from "@spt-aki/utils/EncodingUtil";
|
import { EncodingUtil } from "@spt-aki/utils/EncodingUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -23,6 +24,7 @@ export class App
|
|||||||
@inject("LocalisationService") protected localisationService: LocalisationService,
|
@inject("LocalisationService") protected localisationService: LocalisationService,
|
||||||
@inject("ConfigServer") protected configServer: ConfigServer,
|
@inject("ConfigServer") protected configServer: ConfigServer,
|
||||||
@inject("EncodingUtil") protected encodingUtil: EncodingUtil,
|
@inject("EncodingUtil") protected encodingUtil: EncodingUtil,
|
||||||
|
@inject("HttpServer") protected httpServer: HttpServer,
|
||||||
@injectAll("OnLoad") protected onLoadComponents: OnLoad[],
|
@injectAll("OnLoad") protected onLoadComponents: OnLoad[],
|
||||||
@injectAll("OnUpdate") protected onUpdateComponents: OnUpdate[],
|
@injectAll("OnUpdate") protected onUpdateComponents: OnUpdate[],
|
||||||
)
|
)
|
||||||
@ -64,6 +66,12 @@ export class App
|
|||||||
|
|
||||||
protected async update(onUpdateComponents: OnUpdate[]): Promise<void>
|
protected async update(onUpdateComponents: OnUpdate[]): Promise<void>
|
||||||
{
|
{
|
||||||
|
// If the server has failed to start, skip any update calls
|
||||||
|
if (!this.httpServer.isStarted())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (const updateable of onUpdateComponents)
|
for (const updateable of onUpdateComponents)
|
||||||
{
|
{
|
||||||
let success = false;
|
let success = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user