0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 06:30:43 -05:00

Reduce server start time when running in debug mode by generating less flea offers

This commit is contained in:
Chomp 2025-01-09 10:52:36 +00:00
parent f5600fe215
commit bd00542793

View File

@ -1,3 +1,4 @@
import { ProgramStatics } from "@spt/ProgramStatics";
import { RagfairAssortGenerator } from "@spt/generators/RagfairAssortGenerator";
import { BotHelper } from "@spt/helpers/BotHelper";
import { HandbookHelper } from "@spt/helpers/HandbookHelper";
@ -386,10 +387,14 @@ export class RagfairOfferGenerator {
// Get number of offers to create
// Limit to 1 offer when processing expired - like-for-like replacement
const offerCount = isExpiredOffer
let offerCount = isExpiredOffer
? 1
: Math.round(this.randomUtil.getInt(config.offerItemCount.min, config.offerItemCount.max));
if (ProgramStatics.DEBUG && !ProgramStatics.COMPILED) {
offerCount = 2;
}
// Store all functions to create offers for this item and pass into Promise.all to run async
const assortSingleOfferProcesses = [];
for (let index = 0; index < offerCount; index++) {