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