From 0cb179f8e120d3005ce9b5cd610ddf7b77706422 Mon Sep 17 00:00:00 2001 From: Dev Date: Thu, 25 Jul 2024 19:10:21 +0100 Subject: [PATCH] Make use of `SideType.SAVAGE` enum --- project/src/controllers/BotController.ts | 3 ++- project/src/generators/BotGenerator.ts | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/project/src/controllers/BotController.ts b/project/src/controllers/BotController.ts index 363cce0e..2742b9a9 100644 --- a/project/src/controllers/BotController.ts +++ b/project/src/controllers/BotController.ts @@ -13,6 +13,7 @@ import { IBotCore } from "@spt/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt/models/eft/common/tables/IBotType"; import { IGetRaidConfigurationRequestData } from "@spt/models/eft/match/IGetRaidConfigurationRequestData"; import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; +import { SideType } from "@spt/models/enums/SideType"; import { WildSpawnTypeNumber } from "@spt/models/enums/WildSpawnTypeNumber"; import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; @@ -245,7 +246,7 @@ export class BotController { ): BotGenerationDetails { return { isPmc: generateAsPmc, - side: "Savage", + side: SideType.SAVAGE, role: condition.Role, playerLevel: this.getPlayerLevelFromProfile(pmcProfile), playerName: pmcProfile.Info.Nickname, diff --git a/project/src/generators/BotGenerator.ts b/project/src/generators/BotGenerator.ts index f7fcda3c..f392778a 100644 --- a/project/src/generators/BotGenerator.ts +++ b/project/src/generators/BotGenerator.ts @@ -20,6 +20,7 @@ import { ConfigTypes } from "@spt/models/enums/ConfigTypes"; import { GameEditions } from "@spt/models/enums/GameEditions"; import { ItemTpl } from "@spt/models/enums/ItemTpl"; import { MemberCategory } from "@spt/models/enums/MemberCategory"; +import { SideType } from "@spt/models/enums/SideType"; import { BotGenerationDetails } from "@spt/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig"; @@ -75,11 +76,11 @@ export class BotGenerator { let bot = this.getCloneOfBotBase(); bot.Info.Settings.BotDifficulty = difficulty; bot.Info.Settings.Role = role; - bot.Info.Side = "Savage"; + bot.Info.Side = SideType.SAVAGE; const botGenDetails: BotGenerationDetails = { isPmc: false, - side: "Savage", + side: SideType.SAVAGE, role: role, botRelativeLevelDeltaMax: 0, botRelativeLevelDeltaMin: 0,