mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 08:50:43 -05:00
Expanded handleModEvent
to make use of forceSeason
, enableChristmasHideout
, enableHalloweenHideout
, addEventGearToBots
and addEventLootToBots
This commit is contained in:
parent
a0a9fcacb9
commit
ad70c9a66e
@ -427,7 +427,7 @@ export class SeasonalEventService {
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// Likely a mod event
|
// Likely a mod event
|
||||||
this.handleModEvent(event);
|
this.handleModEvent(event, globalConfig);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -890,18 +890,38 @@ export class SeasonalEventService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected handleModEvent(event: ISeasonalEvent) {
|
protected handleModEvent(event: ISeasonalEvent, globalConfig: IConfig): void {
|
||||||
this.addEventGearToBots(event.type);
|
if (event.settings?.enableChristmasHideout) {
|
||||||
|
globalConfig.EventType = globalConfig.EventType.filter((x) => x !== "None");
|
||||||
|
globalConfig.EventType.push("Christmas");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.settings?.enableHalloweenHideout) {
|
||||||
|
globalConfig.EventType = globalConfig.EventType.filter((x) => x !== "None");
|
||||||
|
globalConfig.EventType.push("Halloween");
|
||||||
|
globalConfig.EventType.push("HalloweenIllumination");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.settings?.addEventGearToBots) {
|
||||||
|
this.addEventGearToBots(event.type);
|
||||||
|
}
|
||||||
|
if (event.settings?.addEventLootToBots) {
|
||||||
|
this.addEventLootToBots(event.type);
|
||||||
|
}
|
||||||
|
|
||||||
if (event.settings?.enableSummoning) {
|
if (event.settings?.enableSummoning) {
|
||||||
this.enableHalloweenSummonEvent();
|
this.enableHalloweenSummonEvent();
|
||||||
this.addEventBossesToMaps("halloweensummon");
|
this.addEventBossesToMaps("halloweensummon");
|
||||||
}
|
}
|
||||||
if (event.settings?.zombieSettings?.enabled) {
|
if (event.settings?.zombieSettings?.enabled) {
|
||||||
this.configureZombies(event.settings?.zombieSettings);
|
this.configureZombies(event.settings.zombieSettings);
|
||||||
}
|
}
|
||||||
if (event.settings?.forceSnow) {
|
if (event.settings?.forceSeason) {
|
||||||
this.enableSnow();
|
this.weatherConfig.overrideSeason = event.settings.forceSeason;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.settings?.adjustBotAppearances) {
|
||||||
|
this.adjustBotAppearanceValues(event.type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user