mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 05:30:43 -05:00
Added system to allow adjustment of bot appearance by season
PMCs have higher weighting to wear winter clothing during Christmas
This commit is contained in:
parent
615f8dfbab
commit
6628eb9bab
@ -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
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -18,6 +18,8 @@ export interface ISeasonalEventConfig extends IBaseConfig {
|
||||
hostilitySettingsForEvent: Record<string, Record<string, IAdditionalHostilitySettings[]>>;
|
||||
/** Ids of containers on locations that only have christmas loot */
|
||||
christmasContainerIds: string[];
|
||||
/** Season - botType - location (body/feet/hands/head) */
|
||||
botAppearanceChanges: Record<SeasonalEventType, Record<string, Record<string, Record<string, number>>>>;
|
||||
}
|
||||
|
||||
export interface ISeasonalEvent {
|
||||
|
@ -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<string, IAdditionalHostilitySettings[]>) {
|
||||
const locations = this.databaseService.getLocations();
|
||||
const ignoreList = this.locationConfig.nonMaps;
|
||||
|
Loading…
x
Reference in New Issue
Block a user