Fixed and expanded QTE type definitions (!206)
Co-authored-by: Terkoiz <terkoiz@spt.dev> Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/206 Co-authored-by: Terkoiz <terkoiz@noreply.dev.sp-tarkov.com> Co-committed-by: Terkoiz <terkoiz@noreply.dev.sp-tarkov.com>
This commit is contained in:
parent
852849aeb1
commit
d2254249e6
@ -1,44 +1,66 @@
|
|||||||
|
import { QteActivityType } from "@spt-aki/models/enums/hideout/QteActivityType";
|
||||||
|
import { QteEffectType } from "@spt-aki/models/enums/hideout/QteEffectType";
|
||||||
|
import { QteType } from "@spt-aki/models/enums/hideout/QteType";
|
||||||
|
import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas";
|
||||||
|
import { RequirementType } from "@spt-aki/models/enums/hideout/RequirementType";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
|
import { Traders } from "@spt-aki/models/enums/Traders";
|
||||||
|
import { Effect } from "@spt-aki/models/eft/health/Effect";
|
||||||
|
import { BodyPart } from "@spt-aki/models/eft/health/IOffraidHealRequestData";
|
||||||
|
import { QteRewardType } from "@spt-aki/models/enums/hideout/QteRewardType";
|
||||||
|
import { QteResultType } from "@spt-aki/models/enums/hideout/QteResultType";
|
||||||
|
|
||||||
export interface IQteData
|
export interface IQteData
|
||||||
{
|
{
|
||||||
Id: string;
|
id: string;
|
||||||
Type: string;
|
type: QteActivityType;
|
||||||
Area: string;
|
area: HideoutAreas;
|
||||||
AreaLevel: number;
|
areaLevel: number;
|
||||||
QuickTimeEvents: IQuickTimeEvent[];
|
quickTimeEvents: IQuickTimeEvent[];
|
||||||
Requirements: IQteRequirement[];
|
requirements: (IAreaRequirement
|
||||||
Results: Record<string, IQteResult>;
|
| IItemRequirement
|
||||||
|
| ITraderUnlockRequirement
|
||||||
|
| ITraderLoyaltyRequirement
|
||||||
|
| ISkillRequirement
|
||||||
|
| IResourceRequirement
|
||||||
|
| IToolRequirement
|
||||||
|
| IQuestRequirement
|
||||||
|
| IHealthRequirement
|
||||||
|
| IBodyPartBuffRequirement)[];
|
||||||
|
results: Record<QteEffectType, IQteResult>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IQuickTimeEvent
|
export interface IQuickTimeEvent
|
||||||
{
|
{
|
||||||
Type: string;
|
type: QteType;
|
||||||
Position: number;
|
position: { x: number, y: number };
|
||||||
StartDelay: number;
|
startDelay: number;
|
||||||
EndDelay: number;
|
endDelay: number;
|
||||||
Speed: number;
|
speed: number;
|
||||||
SuccessRange: string;
|
successRange: { x: number, y: number };
|
||||||
Key: string;
|
key: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IQteRequirement
|
export interface IQteRequirement
|
||||||
{
|
{
|
||||||
type: string;
|
type: RequirementType;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IQteResult
|
export interface IQteResult
|
||||||
{
|
{
|
||||||
Energy: number;
|
energy: number;
|
||||||
Hydration: number;
|
hydration: number;
|
||||||
RewardsRange: IQteEffect[];
|
rewardsRange: IQteEffect[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IQteEffect
|
export interface IQteEffect
|
||||||
{
|
{
|
||||||
Type: string;
|
type: QteRewardType;
|
||||||
SkillId: string;
|
skillId: number;
|
||||||
levelMultipliers: ISkillLevelMultiplier[];
|
levelMultipliers: ISkillLevelMultiplier[];
|
||||||
Time: number;
|
time: number;
|
||||||
Weight: number;
|
weight: number;
|
||||||
Result: string;
|
result: QteResultType;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ISkillLevelMultiplier
|
export interface ISkillLevelMultiplier
|
||||||
@ -46,3 +68,76 @@ export interface ISkillLevelMultiplier
|
|||||||
level: number;
|
level: number;
|
||||||
multiplier: number;
|
multiplier: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IAreaRequirement extends IQteRequirement
|
||||||
|
{
|
||||||
|
type: RequirementType.AREA,
|
||||||
|
areaType: HideoutAreas,
|
||||||
|
requiredLevel: number,
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ITraderUnlockRequirement extends IQteRequirement
|
||||||
|
{
|
||||||
|
type: RequirementType.TRADER_UNLOCK,
|
||||||
|
traderId: Traders;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ITraderLoyaltyRequirement extends IQteRequirement
|
||||||
|
{
|
||||||
|
type: RequirementType.TRADER_LOYALTY,
|
||||||
|
traderId: Traders;
|
||||||
|
loyaltyLevel: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ISkillRequirement extends IQteRequirement
|
||||||
|
{
|
||||||
|
type: RequirementType.SKILL,
|
||||||
|
skillName: SkillTypes;
|
||||||
|
skillLevel: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IResourceRequirement extends IQteRequirement
|
||||||
|
{
|
||||||
|
type: RequirementType.RESOURCE,
|
||||||
|
templateId: string,
|
||||||
|
resource: number,
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IItemRequirement extends IQteRequirement
|
||||||
|
{
|
||||||
|
type: RequirementType.ITEM,
|
||||||
|
templateId: string,
|
||||||
|
count: number,
|
||||||
|
isFunctional: boolean,
|
||||||
|
isEncoded: boolean,
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IToolRequirement extends IQteRequirement
|
||||||
|
{
|
||||||
|
type: RequirementType.TOOL,
|
||||||
|
templateId: string,
|
||||||
|
count: number,
|
||||||
|
isFunctional: boolean,
|
||||||
|
isEncoded: boolean,
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IQuestRequirement extends IQteRequirement
|
||||||
|
{
|
||||||
|
type: RequirementType.QUEST_COMPLETE,
|
||||||
|
questId: string,
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IHealthRequirement extends IQteRequirement
|
||||||
|
{
|
||||||
|
type: RequirementType.HEALTH,
|
||||||
|
energy: number,
|
||||||
|
hydration: number,
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IBodyPartBuffRequirement extends IQteRequirement
|
||||||
|
{
|
||||||
|
type: RequirementType.BODY_PART_BUFF,
|
||||||
|
effectName: Effect,
|
||||||
|
bodyPart: BodyPart,
|
||||||
|
excluded: boolean,
|
||||||
|
}
|
||||||
|
3
project/src/models/enums/hideout/QteActivityType.ts
Normal file
3
project/src/models/enums/hideout/QteActivityType.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export enum QteActivityType {
|
||||||
|
GYM = 0,
|
||||||
|
}
|
5
project/src/models/enums/hideout/QteEffectType.ts
Normal file
5
project/src/models/enums/hideout/QteEffectType.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
export enum QteEffectType {
|
||||||
|
FINISH_EFFECT = "FinishEffect",
|
||||||
|
SINGLE_SUCCESS_EFFECT = "SingleSuccessEffect",
|
||||||
|
SINGLE_FAIL_EFFECT = "SingleFailEffect",
|
||||||
|
}
|
4
project/src/models/enums/hideout/QteResultType.ts
Normal file
4
project/src/models/enums/hideout/QteResultType.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export enum QteResultType {
|
||||||
|
NONE = "None",
|
||||||
|
EXIT = "Exit",
|
||||||
|
}
|
6
project/src/models/enums/hideout/QteRewardType.ts
Normal file
6
project/src/models/enums/hideout/QteRewardType.ts
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
export enum QteRewardType {
|
||||||
|
SKILL = "Skill",
|
||||||
|
HEALTH_EFFECT = "HealthEffect",
|
||||||
|
MUSCLE_PAIN = "MusclePain",
|
||||||
|
GYM_ARM_TRAUMA = "GymArmTrauma",
|
||||||
|
}
|
3
project/src/models/enums/hideout/QteType.ts
Normal file
3
project/src/models/enums/hideout/QteType.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export enum QteType {
|
||||||
|
SHRINKING_CIRCLE = 0,
|
||||||
|
}
|
12
project/src/models/enums/hideout/RequirementType.ts
Normal file
12
project/src/models/enums/hideout/RequirementType.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
export enum RequirementType {
|
||||||
|
AREA = "Area",
|
||||||
|
ITEM = "Item",
|
||||||
|
TRADER_UNLOCK = "TraderUnlock",
|
||||||
|
TRADER_LOYALTY = "TraderLoyalty",
|
||||||
|
SKILL = "Skill",
|
||||||
|
RESOURCE = "Resource",
|
||||||
|
TOOL = "Tool",
|
||||||
|
QUEST_COMPLETE = "QuestComplete",
|
||||||
|
HEALTH = "Health",
|
||||||
|
BODY_PART_BUFF = "BodyPartBuff",
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user