@peacockproject/core
Version:
Type definitions for Peacock's core.
70 lines (69 loc) • 2.14 kB
TypeScript
import type { MissionManifestObjective } from "../types/types";
/**
* The payload provided to the game for each target in the create menu route.
*/
export type ContractCreationNpcTargetPayload = {
RepositoryId: string;
Selected: boolean;
Weapon: {
RepositoryId: string;
KillMethodBroad: string;
KillMethodStrict: string;
RequiredKillMethod: string;
RequiredKillMethodType: number;
};
Outfit: {
RepositoryId: string;
Required: boolean;
IsHitmanSuit: boolean;
};
};
/**
* Create the target, weapon, and kill conditions for a contracts target.
* @param params The parameters from the request.
* @param customIds Custom objective IDs for testing purposes.
*/
export declare function createObjectivesForTarget(params: ContractCreationNpcTargetPayload, customIds?: {
base: string;
kill: string;
outfit: string;
}): MissionManifestObjective[];
/**
* Create a time limit objective.
* @param time The amount of time to use in seconds.
* @param optional If the objective should be optional or not.
* @returns The generated state machine.
*/
export declare function createTimeLimit(time: number, optional: boolean): MissionManifestObjective;
/**
* These are all the possible ways to get a kill in contracts mode.
*/
export declare const enum ContractKillMethod {
Any = 0,
AnyMelee = 1,
ObjectMelee = 2,
AnyThrown = 3,
ObjectThrown = 4,
Pistol = 5,
PistolElimination = 6,
Smg = 7,
AssaultRifle = 8,
Shotgun = 9,
SniperRifle = 10,
AnyPoison = 11,
ConsumedPoison = 12,
InjectedPoison = 13,
AnyAccident = 14,
ExplosiveDevice = 15,
FiberWire = 16,
UnarmedNeckSnap = 17
}
type Weapon = ContractCreationNpcTargetPayload["Weapon"];
type KillSuccessStateCondition = unknown;
export declare function genStateMachineKillSuccessCondition(weapon: Weapon): KillSuccessStateCondition;
/**
* Get the equivalent kill method from a weapon object.
* @param weapon The weapon's details.
*/
export declare function weaponToKillMethod(weapon: Weapon): ContractKillMethod;
export {};