From 18af98e86df380714cfad6bf2321889e5247a6a9 Mon Sep 17 00:00:00 2001 From: Kaeno Date: Tue, 9 Jul 2024 10:25:24 +0100 Subject: [PATCH] Remove trailing spaces and fix isPlayerScav check to generate correct health pool --- project/src/callbacks/ProfileCallbacks.ts | 1 - project/src/controllers/ProfileController.ts | 4 ++-- project/src/generators/BotGenerator.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/project/src/callbacks/ProfileCallbacks.ts b/project/src/callbacks/ProfileCallbacks.ts index 4ac7f83b..364c1c12 100644 --- a/project/src/callbacks/ProfileCallbacks.ts +++ b/project/src/callbacks/ProfileCallbacks.ts @@ -169,7 +169,6 @@ export class ProfileCallbacks sessionId: string, ): IGetBodyResponseData { - return this.httpResponse.getBody(this.profileController.setChosenProfileIcon(sessionId, info)); } diff --git a/project/src/controllers/ProfileController.ts b/project/src/controllers/ProfileController.ts index 7c75d707..a54d3b50 100644 --- a/project/src/controllers/ProfileController.ts +++ b/project/src/controllers/ProfileController.ts @@ -501,8 +501,8 @@ export class ProfileController { profileToUpdate.Info.SelectedMemberCategory = request.memberCategory; } - - if(request.squadInviteRestriction !== null) + + if (request.squadInviteRestriction !== null) { profileToUpdate.Info.SquadInviteRestriction = request.squadInviteRestriction; } diff --git a/project/src/generators/BotGenerator.ts b/project/src/generators/BotGenerator.ts index 9f788e36..ae4c7665 100644 --- a/project/src/generators/BotGenerator.ts +++ b/project/src/generators/BotGenerator.ts @@ -206,7 +206,7 @@ export class BotGenerator ); bot.Info.Settings.StandingForKill = botJsonTemplate.experience.standingForKill; bot.Info.Voice = this.weightedRandomHelper.getWeightedValue(botJsonTemplate.appearance.voice); - bot.Health = this.generateHealth(botJsonTemplate.health, bot.Info.Side === "Savage"); + bot.Health = this.generateHealth(botJsonTemplate.health, botGenerationDetails.isPlayerScav); bot.Skills = this.generateSkills(botJsonTemplate.skills); // TODO: fix bad type, bot jsons store skills in dict, output needs to be array if (botGenerationDetails.isPmc)