Class QuestRequirement<O, D>
Type Parameters
-
O extends any[] = []
-
D extends {} = {}
Constructors
constructor
- new QuestRequirement<O, D>(defaultData: D): QuestRequirement<O, D>
-
Type Parameters
-
O extends any[] = []
-
D extends {} = {}
Properties
Readonly
defaultData
defaultData: D
Methods
getCompletionAmount
- getCompletionAmount(api: IQuestRequirementApi<O, D>): number
-
Returns number
getInitializeTrigger
- getInitializeTrigger(): undefined | ((api: IQuestRequirementApi<O, D>) => boolean)
-
Returns undefined | ((api: IQuestRequirementApi<O, D>) => boolean)
setCompletionAmountGetter
setEventTrigger
- setEventTrigger<E, K>(bus: E, event: K, checker: ((api: IQuestRequirementApi<O, D>, ...args: [host: HostFromHostOrHostClass<E extends EventBus ? ReturnType<{
0(): default<any, any, any, any, any>;
1(): default;
10(): default<any, undefined>;
11(): Game;
12(): default<unknown, number, NPC | Player>;
13(): default;
14(): default;
15(): default;
16(): default;
17(): default.Events;
18(): default;
19(): default;
2(): default;
20(): default;
21(): MilestoneManager;
22(): default;
23(): default;
24(): default;
25(): default;
26(): default;
27(): default;
28(): default.Events;
29(): default;
3(): default;
30(): default;
31(): default;
32(): default;
33(): default;
34(): Ui;
35(): default;
36(): default;
37(): default;
38(): default;
39(): default;
4(): default;
40(): default;
41(): default;
42(): default<IUsableActionRequirements, IUsableActionDefinition<IUsableActionRequirements>>;
43(): WorldRenderer;
5(): default;
6(): default;
7(): default;
8(): default<unknown, number, EntityReferenceTypes, unknown>;
9(): default<unknown, number, EntityReferenceTypes, unknown>;
}[E]> : E>, ...args: Extract<Parameters<Extract<Extract<Events<E extends EventBus ? ReturnType<{
0(): default<any, any, any, any, any>;
1(): default;
10(): default<any, undefined>;
11(): Game;
12(): default<unknown, number, NPC | Player>;
13(): default;
14(): default;
15(): default;
16(): default;
17(): default.Events;
18(): default;
19(): default;
2(): default;
20(): default;
21(): MilestoneManager;
22(): default;
23(): default;
24(): default;
25(): default;
26(): default;
27(): default;
28(): default.Events;
29(): default;
3(): default;
30(): default;
31(): default;
32(): default;
33(): default;
34(): Ui;
35(): default;
36(): default;
37(): default;
38(): default;
39(): default;
4(): default;
40(): default;
41(): default;
42(): default<IUsableActionRequirements, IUsableActionDefinition<IUsableActionRequirements>>;
43(): WorldRenderer;
5(): default;
6(): default;
7(): default;
8(): default<unknown, number, EntityReferenceTypes, unknown>;
9(): default<unknown, number, EntityReferenceTypes, unknown>;
}[E]> : E>[K], AnyFunction<any>>, AnyFunction<any>>>, any[]>[]]) => boolean)): QuestRequirement<O, D>
-
Type Parameters
-
-
K extends string | number | symbol
Parameters
-
bus: E
-
event: K
-
-
- (api: IQuestRequirementApi<O, D>, ...args: [host: HostFromHostOrHostClass<E extends EventBus ? ReturnType<{
0(): default<any, any, any, any, any>;
1(): default;
10(): default<any, undefined>;
11(): Game;
12(): default<unknown, number, NPC | Player>;
13(): default;
14(): default;
15(): default;
16(): default;
17(): default.Events;
18(): default;
19(): default;
2(): default;
20(): default;
21(): MilestoneManager;
22(): default;
23(): default;
24(): default;
25(): default;
26(): default;
27(): default;
28(): default.Events;
29(): default;
3(): default;
30(): default;
31(): default;
32(): default;
33(): default;
34(): Ui;
35(): default;
36(): default;
37(): default;
38(): default;
39(): default;
4(): default;
40(): default;
41(): default;
42(): default<IUsableActionRequirements, IUsableActionDefinition<IUsableActionRequirements>>;
43(): WorldRenderer;
5(): default;
6(): default;
7(): default;
8(): default<unknown, number, EntityReferenceTypes, unknown>;
9(): default<unknown, number, EntityReferenceTypes, unknown>;
}[E]> : E>, ...args: Extract<Parameters<Extract<Extract<Events<E extends EventBus ? ReturnType<{
0(): default<any, any, any, any, any>;
1(): default;
10(): default<any, undefined>;
11(): Game;
12(): default<unknown, number, NPC | Player>;
13(): default;
14(): default;
15(): default;
16(): default;
17(): default.Events;
18(): default;
19(): default;
2(): default;
20(): default;
21(): MilestoneManager;
22(): default;
23(): default;
24(): default;
25(): default;
26(): default;
27(): default;
28(): default.Events;
29(): default;
3(): default;
30(): default;
31(): default;
32(): default;
33(): default;
34(): Ui;
35(): default;
36(): default;
37(): default;
38(): default;
39(): default;
4(): default;
40(): default;
41(): default;
42(): default<IUsableActionRequirements, IUsableActionDefinition<IUsableActionRequirements>>;
43(): WorldRenderer;
5(): default;
6(): default;
7(): default;
8(): default<unknown, number, EntityReferenceTypes, unknown>;
9(): default<unknown, number, EntityReferenceTypes, unknown>;
}[E]> : E>[K], AnyFunction<any>>, AnyFunction<any>>>, any[]>[]]): boolean
-
Returns boolean
setHostTrigger
- setHostTrigger<E>(event: E, checker: ((api: IQuestRequirementApi<O, D>, player: default, ...args: Extract<Parameters<Extract<IPlayerEvents[E], AnyFunction<any>>>, any[]>) => boolean)): QuestRequirement<O, D>
-
Protected
validateOptions
- validateOptions(...options: O): boolean
-
Returns boolean