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

Further improvements to setRandomisedGameVersionAndCategory() to handle unheard profiles the same as live

This commit is contained in:
Dev 2024-06-17 10:23:13 +01:00
parent 020c30d55b
commit d315414136
2 changed files with 16 additions and 12 deletions

View File

@ -592,21 +592,24 @@ export class BotGenerator
return botInfo.GameVersion; return botInfo.GameVersion;
} }
// More color = more op // Choose random weighted game version for bot
botInfo.GameVersion = this.weightedRandomHelper.getWeightedValue(this.pmcConfig.gameVersionWeight); botInfo.GameVersion = this.weightedRandomHelper.getWeightedValue(this.pmcConfig.gameVersionWeight);
// EOD and UhD must have a category of 2 for their unique icons to show // Choose appropriate member category value
if ([GameEditions.EDGE_OF_DARKNESS, GameEditions.UNHEARD].includes(<any>botInfo.GameVersion)) switch (botInfo.GameVersion)
{ {
botInfo.MemberCategory = 2; case GameEditions.EDGE_OF_DARKNESS:
} botInfo.MemberCategory = MemberCategory.UNIQUE_ID;
else break;
{ case GameEditions.UNHEARD:
// Everyone else gets a weighted randomised category botInfo.MemberCategory = MemberCategory.UNHEARD;
botInfo.MemberCategory = Number.parseInt( break;
this.weightedRandomHelper.getWeightedValue(this.pmcConfig.accountTypeWeight), default:
10, // Everyone else gets a weighted randomised category
); botInfo.MemberCategory = Number.parseInt(
this.weightedRandomHelper.getWeightedValue(this.pmcConfig.accountTypeWeight),
10,
);
} }
return botInfo.GameVersion; return botInfo.GameVersion;

View File

@ -11,4 +11,5 @@ export enum MemberCategory
UNIT_TEST = 128, UNIT_TEST = 128,
SHERPA = 256, SHERPA = 256,
EMISSARY = 512, EMISSARY = 512,
UNHEARD = 1024,
} }