diff --git a/project/assets/configs/seasonalevents.json b/project/assets/configs/seasonalevents.json index abc40dfc..5ec2d70c 100644 --- a/project/assets/configs/seasonalevents.json +++ b/project/assets/configs/seasonalevents.json @@ -1,5 +1,25 @@ { "enableSeasonalEventDetection": true, + "botAppearanceChanges": { + "CHRISTMAS": { + "usec": { + "body": { + "675fd6dc7a57e0b2a00e340a": 10 + }, + "feet": { + "675fd71c1c153e52f1050fd6": 10 + } + }, + "bear": { + "body": { + "675998aba378f89a3e089b5c": 10 + }, + "feet": { + "67599889a378f89a3e089b5a": 10 + } + } + } + }, "eventGear": { "halloween": { "assault": { @@ -8341,7 +8361,8 @@ "endDay": "31", "endMonth": "12", "settings": { - "enableSanta": true + "enableSanta": true, + "adjustBotAppearances": true } }, { diff --git a/project/src/models/spt/config/ISeasonalEventConfig.ts b/project/src/models/spt/config/ISeasonalEventConfig.ts index 1a812d6d..89020ecd 100644 --- a/project/src/models/spt/config/ISeasonalEventConfig.ts +++ b/project/src/models/spt/config/ISeasonalEventConfig.ts @@ -18,6 +18,8 @@ export interface ISeasonalEventConfig extends IBaseConfig { hostilitySettingsForEvent: Record>; /** Ids of containers on locations that only have christmas loot */ christmasContainerIds: string[]; + /** Season - botType - location (body/feet/hands/head) */ + botAppearanceChanges: Record>>>; } export interface ISeasonalEvent { diff --git a/project/src/services/SeasonalEventService.ts b/project/src/services/SeasonalEventService.ts index 6c265e1f..45001a8f 100644 --- a/project/src/services/SeasonalEventService.ts +++ b/project/src/services/SeasonalEventService.ts @@ -436,6 +436,7 @@ export class SeasonalEventService { this.addLootItemsToGifterDropItemsList(); } this.enableDancingTree(); + this.adjustBotAppearanceValues(event.type); break; case SeasonalEventType.NEW_YEARS.toLowerCase(): break; @@ -458,6 +459,27 @@ export class SeasonalEventService { } } + protected adjustBotAppearanceValues(season: SeasonalEventType): void { + const adjustments = this.seasonalEventConfig.botAppearanceChanges[season]; + if (!adjustments) { + return; + } + + for (const botTypeKey in adjustments) { + const botDb = this.databaseService.getBots().types[botTypeKey]; + if (!botDb) { + continue; + } + const botAppearanceAdjustments = adjustments[botTypeKey]; + for (const appearanceKey in botAppearanceAdjustments) { + const weightAdjustments = botAppearanceAdjustments[appearanceKey]; + for (const itemKey in weightAdjustments) { + botDb.appearance[appearanceKey][itemKey] = weightAdjustments[itemKey]; + } + } + } + } + protected replaceBotHostility(hostilitySettings: Record) { const locations = this.databaseService.getLocations(); const ignoreList = this.locationConfig.nonMaps;