-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
IInputSelectOption.ts
62 lines (59 loc) 路 1.82 KB
/
IInputSelectOption.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import type { IHasId , IHasName, InputSelectOptionType, PlayerConditionMeter, Stat } from "@json_out/index.js";
/**
* Represents an option in an {@link IInputSelect}.
* @public
*/
export interface IInputSelectOption extends IHasId, IHasName {
/**
* @pattern ^(Starforged|Ironsworn)/Assets/[A-z_-]+/[A-z_-]+/Inputs/[A-z_-]+/Options/[A-z_-]+$
*/
$id: string;
/**
* A array describing what attribute keys should be set to when this option is active. *All* items in the array should be set in this manner.
*/
Set: (IInputSelectOptionSetterStat| IInputSelectOptionSetterMeter| IInputSelectOptionSetterNumber| IInputSelectOptionSetterString)[];
}
/**
* @public
*/
export interface IInputSelectOptionSetter extends IHasId {
/**
* @pattern ^(Starforged|Ironsworn)/Assets/[A-z_-]+/[A-z_-]+/Inputs/[A-z_-]+/Options/[A-z_-]+/[A-z_-]+$
*/
$id: string;
Key: string;
Type: InputSelectOptionType;
Value: Stat | PlayerConditionMeter | number | string;
}
/**
* A stat set by an {@link IInputSelectOption}.
* @public
*/
export interface IInputSelectOptionSetterStat extends IInputSelectOptionSetter {
Type: InputSelectOptionType.Stat;
Value: Stat
}
/**
* A condition meter set by an {@link IInputSelectOption}.
* @public
*/
export interface IInputSelectOptionSetterMeter extends IInputSelectOptionSetter {
Type: InputSelectOptionType.ConditionMeter;
Value: PlayerConditionMeter
}
/**
* An integer value set by an {@link IInputSelectOption}.
* @public
*/
export interface IInputSelectOptionSetterNumber extends IInputSelectOptionSetter {
Type: InputSelectOptionType.Number;
Value: number
}
/**
* An arbitrary string value set by an {@link IInputSelectOption}.
* @public
*/
export interface IInputSelectOptionSetterString extends IInputSelectOptionSetter {
Type: InputSelectOptionType.String;
Value: string
}