0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00

Added ability to disable access requirements for event

This commit is contained in:
Dev 2024-11-01 20:25:18 +00:00
parent 42e72c38b0
commit abc317b862
2 changed files with 26 additions and 1 deletions

View File

@ -1306,6 +1306,7 @@
"endMonth": "11", "endMonth": "11",
"settings": { "settings": {
"enableSummoning": false, "enableSummoning": false,
"removeEntryRequirement": ["laboratory"],
"zombieSettings": { "zombieSettings": {
"enabled": true, "enabled": true,
"mapInfectionAmount": { "mapInfectionAmount": {
@ -1346,7 +1347,20 @@
"startDay": "1", "startDay": "1",
"startMonth": "4", "startMonth": "4",
"endDay": "2", "endDay": "2",
"endMonth": "4" "endMonth": "4",
"setting": {
"removeEntryRequirement": ["laboratory"],
"zombieSettings": {
"enabled": true,
"mapInfectionAmount": {
"laboratory": 100
},
"disableBosses": [
"laboratory"
],
"disableWaves": []
}
}
} }
] ]
} }

View File

@ -355,6 +355,9 @@ export class SeasonalEventService {
if (event.settings?.zombieSettings?.enabled) { if (event.settings?.zombieSettings?.enabled) {
this.configureZombies(event.settings?.zombieSettings); this.configureZombies(event.settings?.zombieSettings);
} }
if (event.settings.removeEntryRequirement) {
this.removeEntryRequirement(event.settings.removeEntryRequirement);
}
this.addPumpkinsToScavBackpacks(); this.addPumpkinsToScavBackpacks();
this.adjustTraderIcons(event.type); this.adjustTraderIcons(event.type);
break; break;
@ -395,6 +398,14 @@ export class SeasonalEventService {
} }
} }
protected removeEntryRequirement(locationIds: string[]) {
for (const locationId of locationIds) {
const location = this.databaseService.getLocation(locationId);
location.base.AccessKeys = [];
location.base.AccessKeysPvE = [];
}
}
public givePlayerSeasonalGifts(sessionId: string): void { public givePlayerSeasonalGifts(sessionId: string): void {
if (this.currentlyActiveEvents) { if (this.currentlyActiveEvents) {
const globalConfig = this.databaseService.getGlobals().config; const globalConfig = this.databaseService.getGlobals().config;