2024-08-05 10:45:19 +00:00
|
|
|
import { ContextVariable } from "@spt/context/ContextVariable";
|
|
|
|
import { ContextVariableType } from "@spt/context/ContextVariableType";
|
2023-06-11 15:10:34 +10:00
|
|
|
export declare class ApplicationContext {
|
|
|
|
private variables;
|
|
|
|
private static holderMaxSize;
|
|
|
|
/**
|
|
|
|
* Called like:
|
2024-04-03 20:15:11 +11:00
|
|
|
* ```
|
2023-06-11 15:10:34 +10:00
|
|
|
* const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue<IRegisterPlayerRequestData>();
|
|
|
|
*
|
|
|
|
* const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue<string>();
|
|
|
|
*
|
2024-04-03 20:15:11 +11:00
|
|
|
* const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.RAID_CONFIGURATION).getValue<IGetRaidConfigurationRequestData>();
|
|
|
|
* ```
|
2023-06-11 15:10:34 +10:00
|
|
|
*/
|
2024-08-05 10:45:19 +00:00
|
|
|
getLatestValue(type: ContextVariableType): ContextVariable | undefined;
|
|
|
|
getValues(type: ContextVariableType): ContextVariable[] | undefined;
|
2023-06-11 15:10:34 +10:00
|
|
|
addValue(type: ContextVariableType, value: any): void;
|
2024-04-03 20:15:11 +11:00
|
|
|
clearValues(type: ContextVariableType): void;
|
2023-06-11 15:10:34 +10:00
|
|
|
}
|