Skip to content

Commit

Permalink
Added locationConfig.forcedRaidEndState property
Browse files Browse the repository at this point in the history
  • Loading branch information
Chomp committed Jan 8, 2025
1 parent ce1f645 commit d578e5f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions project/assets/configs/location.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"forcedRaidEndState": null,
"looseLootMultiplier": {
"bigmap": 2.5,
"develop": 1,
Expand Down
3 changes: 3 additions & 0 deletions project/src/models/spt/config/ILocationConfig.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { MinMax } from "@spt/models/common/MinMax";
import { IBossLocationSpawn, IWave } from "@spt/models/eft/common/ILocationBase";
import { ExitStatus } from "@spt/models/enums/ExitStatis";
import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig";

export interface ILocationConfig extends IBaseConfig {
/** What state to force the raid to end as, e.g "Survived"/"Killed"/"Runner" */
forcedRaidEndState: ExitStatus;
kind: "spt-location";
/** Rogues are classified as bosses and spawn immediatly, this can result in no scavs spawning, delay rogues spawning to allow scavs to spawn first */
rogueLighthouseSpawnTimeSettings: IRogueLighthouseSpawnTimeSettings;
Expand Down
4 changes: 4 additions & 0 deletions project/src/services/LocationLifecycleService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ export class LocationLifecycleService {
// Clear bot loot cache
this.botLootCacheService.clearCache();

if (this.locationConfig.forcedRaidEndState !== null) {
request.results.result = this.locationConfig.forcedRaidEndState;
}

const fullProfile = this.profileHelper.getFullProfile(sessionId);
const pmcProfile = fullProfile.characters.pmc;
const scavProfile = fullProfile.characters.scav;
Expand Down

0 comments on commit d578e5f

Please sign in to comment.