mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 02:10:44 -05:00
Updated transit-related properties - TODO: check if request.transition
is hydrated now
This commit is contained in:
parent
23dfbe27ae
commit
4938f38083
@ -1,18 +1,14 @@
|
||||
import type { ITransition } from "@spt/models/eft/match/IStartLocalRaidResponseData";
|
||||
import type { TransitionType } from "@spt/models/enums/TransitionType";
|
||||
|
||||
export interface IStartLocalRaidRequestData {
|
||||
serverId: string;
|
||||
location: string;
|
||||
timeVariant: string;
|
||||
mode: string;
|
||||
playerSide: string;
|
||||
isLocationTransition: boolean;
|
||||
transition: IStartLocalRaidTransition;
|
||||
transitionType: TransitionType;
|
||||
transition: ITransition;
|
||||
/** Should loot generation be skipped, default false */
|
||||
sptSkipLootGeneration?: boolean;
|
||||
}
|
||||
|
||||
export interface IStartLocalRaidTransition {
|
||||
isLocationTransition: boolean;
|
||||
transitionRaidId: string;
|
||||
transitionCount: number;
|
||||
visitedLocations: string[];
|
||||
}
|
||||
|
@ -1,13 +1,14 @@
|
||||
import type { ILocationBase } from "@spt/models/eft/common/ILocationBase";
|
||||
import type { IInsuredItem } from "@spt/models/eft/common/tables/IBotBase";
|
||||
import type { ILocationServices } from "@spt/models/eft/common/tables/ILocationServices";
|
||||
import type { TransitionType } from "@spt/models/enums/TransitionType";
|
||||
|
||||
export interface IStartLocalRaidResponseData {
|
||||
serverId: string;
|
||||
serverSettings: ILocationServices;
|
||||
profile: IProfileInsuredItems;
|
||||
locationLoot: ILocationBase;
|
||||
transitionType: string;
|
||||
transitionType: TransitionType;
|
||||
transition: ITransition;
|
||||
}
|
||||
|
||||
@ -16,7 +17,7 @@ export interface IProfileInsuredItems {
|
||||
}
|
||||
|
||||
export interface ITransition {
|
||||
isLocationTransition: boolean;
|
||||
transitionType: TransitionType;
|
||||
transitionRaidId: string;
|
||||
transitionCount: number;
|
||||
visitedLocations: string[];
|
||||
|
@ -49,6 +49,7 @@ import { RandomUtil } from "@spt/utils/RandomUtil";
|
||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||
import type { ICloner } from "@spt/utils/cloners/ICloner";
|
||||
import { inject, injectable } from "tsyringe";
|
||||
import { TransitionType } from "../models/enums/TransitionType";
|
||||
|
||||
@injectable()
|
||||
export class LocationLifecycleService {
|
||||
@ -106,8 +107,9 @@ export class LocationLifecycleService {
|
||||
serverSettings: this.databaseService.getLocationServices(), // TODO - is this per map or global?
|
||||
profile: { insuredItems: playerProfile.InsuredItems },
|
||||
locationLoot: this.generateLocationAndLoot(request.location, !request.sptSkipLootGeneration),
|
||||
transitionType: TransitionType.None,
|
||||
transition: {
|
||||
isLocationTransition: false,
|
||||
transitionType: TransitionType.None,
|
||||
transitionRaidId: this.hashUtil.generate(),
|
||||
transitionCount: 0,
|
||||
visitedLocations: [],
|
||||
@ -126,7 +128,7 @@ export class LocationLifecycleService {
|
||||
?.getValue<ILocationTransit>();
|
||||
if (transitionData) {
|
||||
this.logger.success(`Player: ${sessionId} is in transit to ${request.location}`);
|
||||
result.transition.isLocationTransition = true;
|
||||
result.transition.transitionType = TransitionType.Common;
|
||||
result.transition.transitionRaidId = transitionData.transitionRaidId;
|
||||
result.transition.transitionCount += 1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user