mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
Improvemetns to seasonal event system
Extended christmas event to 7th of january new years event has christmas event actions Moved seasonal code into functions Added more seasonal settings for events
This commit is contained in:
parent
1d71930a48
commit
a0a9fcacb9
@ -8361,6 +8361,7 @@
|
|||||||
"endDay": "31",
|
"endDay": "31",
|
||||||
"endMonth": "12",
|
"endMonth": "12",
|
||||||
"settings": {
|
"settings": {
|
||||||
|
"enableChristmasHideout": true,
|
||||||
"enableSanta": true,
|
"enableSanta": true,
|
||||||
"adjustBotAppearances": true
|
"adjustBotAppearances": true
|
||||||
}
|
}
|
||||||
@ -8371,8 +8372,27 @@
|
|||||||
"type": "NEWYEARS",
|
"type": "NEWYEARS",
|
||||||
"startDay": "1",
|
"startDay": "1",
|
||||||
"startMonth": "1",
|
"startMonth": "1",
|
||||||
|
"endDay": "1",
|
||||||
|
"endMonth": "1",
|
||||||
|
"settings": {
|
||||||
|
"enableChristmasHideout": true,
|
||||||
|
"enableSanta": true,
|
||||||
|
"adjustBotAppearances": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"enabled": true,
|
||||||
|
"name": "christmas January",
|
||||||
|
"type": "CHRISTMAS",
|
||||||
|
"startDay": "2",
|
||||||
|
"startMonth": "1",
|
||||||
"endDay": "7",
|
"endDay": "7",
|
||||||
"endMonth": "1"
|
"endMonth": "1",
|
||||||
|
"settings": {
|
||||||
|
"enableChristmasHideout": true,
|
||||||
|
"enableSanta": true,
|
||||||
|
"adjustBotAppearances": true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
|
@ -30,7 +30,7 @@ export interface ISeasonalEvent {
|
|||||||
startMonth: number;
|
startMonth: number;
|
||||||
endDay: number;
|
endDay: number;
|
||||||
endMonth: number;
|
endMonth: number;
|
||||||
settings?: Record<string, ISeasonalEventSettings>;
|
settings?: Record<string, ISeasonalEventSettings | IZombieSettings>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ISeasonalEventSettings {
|
export interface ISeasonalEventSettings {
|
||||||
|
@ -404,41 +404,14 @@ export class SeasonalEventService {
|
|||||||
|
|
||||||
switch (event.type.toLowerCase()) {
|
switch (event.type.toLowerCase()) {
|
||||||
case SeasonalEventType.HALLOWEEN.toLowerCase():
|
case SeasonalEventType.HALLOWEEN.toLowerCase():
|
||||||
globalConfig.EventType = globalConfig.EventType.filter((x) => x !== "None");
|
this.applyHalloweenEvent(event, globalConfig);
|
||||||
globalConfig.EventType.push("Halloween");
|
|
||||||
globalConfig.EventType.push("HalloweenIllumination");
|
|
||||||
globalConfig.Health.ProfileHealthSettings.DefaultStimulatorBuff = "Buffs_Halloween";
|
|
||||||
this.addEventGearToBots(event.type);
|
|
||||||
this.adjustZryachiyMeleeChance();
|
|
||||||
if (event.settings?.enableSummoning) {
|
|
||||||
this.enableHalloweenSummonEvent();
|
|
||||||
this.addEventBossesToMaps("halloweensummon");
|
|
||||||
}
|
|
||||||
if (event.settings?.zombieSettings?.enabled) {
|
|
||||||
this.configureZombies(event.settings?.zombieSettings);
|
|
||||||
}
|
|
||||||
if (event.settings?.removeEntryRequirement) {
|
|
||||||
this.removeEntryRequirement(event.settings.removeEntryRequirement);
|
|
||||||
}
|
|
||||||
if (event.settings?.replaceBotHostility) {
|
|
||||||
this.replaceBotHostility(this.seasonalEventConfig.hostilitySettingsForEvent.zombies);
|
|
||||||
}
|
|
||||||
this.addPumpkinsToScavBackpacks();
|
|
||||||
this.adjustTraderIcons(event.type);
|
|
||||||
break;
|
break;
|
||||||
case SeasonalEventType.CHRISTMAS.toLowerCase():
|
case SeasonalEventType.CHRISTMAS.toLowerCase():
|
||||||
globalConfig.EventType = globalConfig.EventType.filter((x) => x !== "None");
|
this.applyChristmasEvent(event, globalConfig);
|
||||||
globalConfig.EventType.push("Christmas");
|
|
||||||
this.addEventGearToBots(event.type);
|
|
||||||
this.addEventLootToBots(event.type);
|
|
||||||
if (event.settings?.enableSanta) {
|
|
||||||
this.addGifterBotToMaps();
|
|
||||||
this.addLootItemsToGifterDropItemsList();
|
|
||||||
}
|
|
||||||
this.enableDancingTree();
|
|
||||||
this.adjustBotAppearanceValues(event.type);
|
|
||||||
break;
|
break;
|
||||||
case SeasonalEventType.NEW_YEARS.toLowerCase():
|
case SeasonalEventType.NEW_YEARS.toLowerCase():
|
||||||
|
this.applyNewYearsEvent(event, globalConfig);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case SeasonalEventType.APRIL_FOOLS.toLowerCase():
|
case SeasonalEventType.APRIL_FOOLS.toLowerCase():
|
||||||
this.addGifterBotToMaps();
|
this.addGifterBotToMaps();
|
||||||
@ -459,6 +432,74 @@ export class SeasonalEventService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected applyHalloweenEvent(event: ISeasonalEvent, globalConfig: IConfig) {
|
||||||
|
globalConfig.EventType = globalConfig.EventType.filter((x) => x !== "None");
|
||||||
|
globalConfig.EventType.push("Halloween");
|
||||||
|
globalConfig.EventType.push("HalloweenIllumination");
|
||||||
|
globalConfig.Health.ProfileHealthSettings.DefaultStimulatorBuff = "Buffs_Halloween";
|
||||||
|
this.addEventGearToBots(event.type);
|
||||||
|
this.adjustZryachiyMeleeChance();
|
||||||
|
if (event.settings?.enableSummoning) {
|
||||||
|
this.enableHalloweenSummonEvent();
|
||||||
|
this.addEventBossesToMaps("halloweensummon");
|
||||||
|
}
|
||||||
|
if (event.settings?.zombieSettings?.enabled) {
|
||||||
|
this.configureZombies(event.settings.zombieSettings);
|
||||||
|
}
|
||||||
|
if (event.settings?.removeEntryRequirement) {
|
||||||
|
this.removeEntryRequirement(event.settings.removeEntryRequirement);
|
||||||
|
}
|
||||||
|
if (event.settings?.replaceBotHostility) {
|
||||||
|
this.replaceBotHostility(this.seasonalEventConfig.hostilitySettingsForEvent.zombies);
|
||||||
|
}
|
||||||
|
if (event.settings?.adjustBotAppearances) {
|
||||||
|
this.adjustBotAppearanceValues(event.type);
|
||||||
|
}
|
||||||
|
this.addPumpkinsToScavBackpacks();
|
||||||
|
this.adjustTraderIcons(event.type);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected applyChristmasEvent(event: ISeasonalEvent, globalConfig: IConfig) {
|
||||||
|
if (event.settings?.enableChristmasHideout) {
|
||||||
|
globalConfig.EventType = globalConfig.EventType.filter((x) => x !== "None");
|
||||||
|
globalConfig.EventType.push("Christmas");
|
||||||
|
}
|
||||||
|
|
||||||
|
this.addEventGearToBots(event.type);
|
||||||
|
this.addEventLootToBots(event.type);
|
||||||
|
|
||||||
|
if (event.settings?.enableSanta) {
|
||||||
|
this.addGifterBotToMaps();
|
||||||
|
this.addLootItemsToGifterDropItemsList();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.enableDancingTree();
|
||||||
|
if (event.settings?.adjustBotAppearances) {
|
||||||
|
this.adjustBotAppearanceValues(event.type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected applyNewYearsEvent(event: ISeasonalEvent, globalConfig: IConfig) {
|
||||||
|
if (event.settings?.enableChristmasHideout) {
|
||||||
|
globalConfig.EventType = globalConfig.EventType.filter((x) => x !== "None");
|
||||||
|
globalConfig.EventType.push("Christmas");
|
||||||
|
}
|
||||||
|
|
||||||
|
this.addEventGearToBots(SeasonalEventType.CHRISTMAS);
|
||||||
|
this.addEventLootToBots(SeasonalEventType.CHRISTMAS);
|
||||||
|
|
||||||
|
if (event.settings?.enableSanta) {
|
||||||
|
this.addGifterBotToMaps();
|
||||||
|
this.addLootItemsToGifterDropItemsList();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.enableDancingTree();
|
||||||
|
|
||||||
|
if (event.settings?.adjustBotAppearances) {
|
||||||
|
this.adjustBotAppearanceValues(SeasonalEventType.CHRISTMAS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected adjustBotAppearanceValues(season: SeasonalEventType): void {
|
protected adjustBotAppearanceValues(season: SeasonalEventType): void {
|
||||||
const adjustments = this.seasonalEventConfig.botAppearanceChanges[season];
|
const adjustments = this.seasonalEventConfig.botAppearanceChanges[season];
|
||||||
if (!adjustments) {
|
if (!adjustments) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user