@drincs/nqtr 0.1.20 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ActivityProps-_79x9-BX.d.ts → ActivityProps-BkHX8xkA.d.ts} +1 -1
- package/dist/{ActivityProps-BoJeWa2B.d.mts → ActivityProps-D45DQdcT.d.mts} +1 -1
- package/dist/{Commitment-Cc2kZEy0.d.ts → Commitment-BJTIpBQ5.d.ts} +4 -2
- package/dist/{Commitment-C3Nc2RJH.d.mts → Commitment-CtNWnNQX.d.mts} +4 -2
- package/dist/{Quest-BQ1pwvQ_.d.ts → StageProps-BFsiCaZT.d.ts} +160 -81
- package/dist/{Quest-DaNlPBHb.d.mts → StageProps-CkXejAbn.d.mts} +160 -81
- package/dist/classes/Activity.d.mts +2 -2
- package/dist/classes/Activity.d.ts +2 -2
- package/dist/classes/Activity.js +1 -1
- package/dist/classes/Activity.js.map +1 -1
- package/dist/classes/Activity.mjs +1 -1
- package/dist/classes/Activity.mjs.map +1 -1
- package/dist/classes/ActivityStoredAbstract.d.mts +1 -1
- package/dist/classes/ActivityStoredAbstract.d.ts +1 -1
- package/dist/classes/ActivityStoredAbstract.js +1 -1
- package/dist/classes/ActivityStoredAbstract.js.map +1 -1
- package/dist/classes/ActivityStoredAbstract.mjs +1 -1
- package/dist/classes/ActivityStoredAbstract.mjs.map +1 -1
- package/dist/classes/Commitment.d.mts +2 -2
- package/dist/classes/Commitment.d.ts +2 -2
- package/dist/classes/Commitment.js +2 -2
- package/dist/classes/Commitment.js.map +1 -1
- package/dist/classes/Commitment.mjs +2 -2
- package/dist/classes/Commitment.mjs.map +1 -1
- package/dist/classes/index.d.mts +3 -3
- package/dist/classes/index.d.ts +3 -3
- package/dist/classes/index.js +133 -318
- package/dist/classes/index.js.map +1 -1
- package/dist/classes/index.mjs +134 -318
- package/dist/classes/index.mjs.map +1 -1
- package/dist/classes/navigation/ActivityRoom.d.mts +2 -2
- package/dist/classes/navigation/ActivityRoom.d.ts +2 -2
- package/dist/classes/navigation/ActivityRoom.js +1 -1
- package/dist/classes/navigation/ActivityRoom.js.map +1 -1
- package/dist/classes/navigation/ActivityRoom.mjs +1 -1
- package/dist/classes/navigation/ActivityRoom.mjs.map +1 -1
- package/dist/classes/navigation/Location.d.mts +2 -2
- package/dist/classes/navigation/Location.d.ts +2 -2
- package/dist/classes/navigation/Map.d.mts +2 -2
- package/dist/classes/navigation/Map.d.ts +2 -2
- package/dist/classes/navigation/Room.d.mts +2 -2
- package/dist/classes/navigation/Room.d.ts +2 -2
- package/dist/classes/navigation/Room.js +34 -36
- package/dist/classes/navigation/Room.js.map +1 -1
- package/dist/classes/navigation/Room.mjs +34 -36
- package/dist/classes/navigation/Room.mjs.map +1 -1
- package/dist/classes/quest/Goal.d.mts +18 -0
- package/dist/classes/quest/Goal.d.ts +18 -0
- package/dist/classes/quest/Goal.js +18 -0
- package/dist/classes/quest/Goal.js.map +1 -1
- package/dist/classes/quest/Goal.mjs +18 -0
- package/dist/classes/quest/Goal.mjs.map +1 -1
- package/dist/classes/quest/Quest.d.mts +1 -1
- package/dist/classes/quest/Quest.d.ts +1 -1
- package/dist/classes/quest/Quest.js +107 -8
- package/dist/classes/quest/Quest.js.map +1 -1
- package/dist/classes/quest/Quest.mjs +107 -8
- package/dist/classes/quest/Quest.mjs.map +1 -1
- package/dist/classes/quest/Stage.d.mts +1 -1
- package/dist/classes/quest/Stage.d.ts +1 -1
- package/dist/classes/quest/Stage.js +62 -0
- package/dist/classes/quest/Stage.js.map +1 -1
- package/dist/classes/quest/Stage.mjs +62 -0
- package/dist/classes/quest/Stage.mjs.map +1 -1
- package/dist/decorators/ActivityDecorator.d.mts +1 -1
- package/dist/decorators/ActivityDecorator.d.ts +1 -1
- package/dist/decorators/CommitmentDecorator.d.mts +9 -3
- package/dist/decorators/CommitmentDecorator.d.ts +9 -3
- package/dist/decorators/CommitmentDecorator.js +16 -1
- package/dist/decorators/CommitmentDecorator.js.map +1 -1
- package/dist/decorators/CommitmentDecorator.mjs +16 -2
- package/dist/decorators/CommitmentDecorator.mjs.map +1 -1
- package/dist/decorators/QuestDecorator.d.mts +8 -10
- package/dist/decorators/QuestDecorator.d.ts +8 -10
- package/dist/decorators/QuestDecorator.js +667 -9
- package/dist/decorators/QuestDecorator.js.map +1 -1
- package/dist/decorators/QuestDecorator.mjs +667 -9
- package/dist/decorators/QuestDecorator.mjs.map +1 -1
- package/dist/decorators/RoomDecorator.d.mts +2 -2
- package/dist/decorators/RoomDecorator.d.ts +2 -2
- package/dist/decorators/index.d.mts +5 -5
- package/dist/decorators/index.d.ts +5 -5
- package/dist/decorators/index.js +679 -10
- package/dist/decorators/index.js.map +1 -1
- package/dist/decorators/index.mjs +679 -11
- package/dist/decorators/index.mjs.map +1 -1
- package/dist/functions/ActivityFunctions.d.mts +2 -2
- package/dist/functions/ActivityFunctions.d.ts +2 -2
- package/dist/functions/ActivityFunctions.js.map +1 -1
- package/dist/functions/ActivityFunctions.mjs.map +1 -1
- package/dist/functions/NavigationFunctions.d.mts +2 -2
- package/dist/functions/NavigationFunctions.d.ts +2 -2
- package/dist/functions/NavigationFunctions.js.map +1 -1
- package/dist/functions/NavigationFunctions.mjs.map +1 -1
- package/dist/functions/RoutineFunctions.d.mts +2 -2
- package/dist/functions/RoutineFunctions.d.ts +2 -2
- package/dist/functions/RoutineFunctions.js.map +1 -1
- package/dist/functions/RoutineFunctions.mjs.map +1 -1
- package/dist/functions/index.d.mts +2 -2
- package/dist/functions/index.d.ts +2 -2
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/index.mjs.map +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +505 -392
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +504 -391
- package/dist/index.mjs.map +1 -1
- package/dist/interface/ActivityProps.d.mts +1 -1
- package/dist/interface/ActivityProps.d.ts +1 -1
- package/dist/interface/CommitmentProps.d.mts +2 -2
- package/dist/interface/CommitmentProps.d.ts +2 -2
- package/dist/interface/RoomActivityMemory.d.mts +1 -1
- package/dist/interface/RoomActivityMemory.d.ts +1 -1
- package/dist/interface/RoomProps.d.mts +2 -2
- package/dist/interface/RoomProps.d.ts +2 -2
- package/dist/interface/index.d.mts +3 -3
- package/dist/interface/index.d.ts +3 -3
- package/dist/interface/navigation/LocationProps.d.mts +2 -2
- package/dist/interface/navigation/LocationProps.d.ts +2 -2
- package/dist/interface/navigation/MapProps.d.mts +2 -2
- package/dist/interface/navigation/MapProps.d.ts +2 -2
- package/dist/interface/quest/QuestProps.d.mts +1 -1
- package/dist/interface/quest/QuestProps.d.ts +1 -1
- package/dist/interface/quest/StageProps.d.mts +1 -1
- package/dist/interface/quest/StageProps.d.ts +1 -1
- package/dist/types/QuestsRequired.d.mts +1 -1
- package/dist/types/QuestsRequired.d.ts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -61,7 +61,7 @@ declare abstract class ActivityStoredAbstract {
|
|
|
61
61
|
/**
|
|
62
62
|
* The function that is called when the activity is runned.
|
|
63
63
|
*/
|
|
64
|
-
get
|
|
64
|
+
get run(): (props: OnRunProps) => void;
|
|
65
65
|
/**
|
|
66
66
|
* Whether the activity is a deadline.
|
|
67
67
|
* @returns Whether the activity is a deadline.
|
|
@@ -61,7 +61,7 @@ declare abstract class ActivityStoredAbstract {
|
|
|
61
61
|
/**
|
|
62
62
|
* The function that is called when the activity is runned.
|
|
63
63
|
*/
|
|
64
|
-
get
|
|
64
|
+
get run(): (props: OnRunProps) => void;
|
|
65
65
|
/**
|
|
66
66
|
* Whether the activity is a deadline.
|
|
67
67
|
* @returns Whether the activity is a deadline.
|
|
@@ -2,7 +2,7 @@ import { GraphicItemType, OnRenderGraphicItemProps, OnRunProps } from '@drincs/n
|
|
|
2
2
|
import { CharacterBaseModel, StoredClassModel } from '@drincs/pixi-vn';
|
|
3
3
|
import ExecutionType from './types/ExecutionType.js';
|
|
4
4
|
import ActivityModel from './classes/Activity.js';
|
|
5
|
-
import { a as ActivityStoredAbstract, A as ActivityProps } from './ActivityProps-
|
|
5
|
+
import { a as ActivityStoredAbstract, A as ActivityProps } from './ActivityProps-BkHX8xkA.js';
|
|
6
6
|
import { OnRunActivityEvent } from './types/OnRunActivityEvent.js';
|
|
7
7
|
import { OnRunCommitmentEvent } from './types/OnRunCommitmentEvent.js';
|
|
8
8
|
|
|
@@ -53,6 +53,7 @@ interface CommitmentProps<TCharacter extends CharacterBaseModel = CharacterBaseM
|
|
|
53
53
|
renderImage?: GraphicItemType | ((commitment: CommitmentBaseModel<TCharacter, TRoom>, props: OnRenderGraphicItemProps) => GraphicItemType);
|
|
54
54
|
/**
|
|
55
55
|
* Execution type. If is "automatic" the onRun() runned automatically when the palayer is in the room. If is "interaction" the player must interact with the character to run the onRun() function.
|
|
56
|
+
* If you set "automatic" remember to remove the commitment when it is no longer needed, because otherwise it repeats itself every time.
|
|
56
57
|
* @default "interaction"
|
|
57
58
|
*/
|
|
58
59
|
executionType?: ExecutionType;
|
|
@@ -549,6 +550,7 @@ declare class CommitmentBaseModel<TCharacter extends CharacterBaseModel = Charac
|
|
|
549
550
|
private _executionType;
|
|
550
551
|
/**
|
|
551
552
|
* Execution type. If is "automatic" the onRun() runned automatically when the palayer is in the room. If is "interaction" the player must interact with the character to run the onRun() function.
|
|
553
|
+
* If you set "automatic" remember to remove the commitment when it is no longer needed, because otherwise it repeats itself every time.
|
|
552
554
|
*/
|
|
553
555
|
get executionType(): ExecutionType;
|
|
554
556
|
private _renderIcon?;
|
|
@@ -560,7 +562,7 @@ declare class CommitmentBaseModel<TCharacter extends CharacterBaseModel = Charac
|
|
|
560
562
|
/**
|
|
561
563
|
* Is a function that is called when the player interacts with the character.
|
|
562
564
|
*/
|
|
563
|
-
get
|
|
565
|
+
get run(): undefined | ((props: OnRunProps) => void);
|
|
564
566
|
private defaultDisabled;
|
|
565
567
|
/**
|
|
566
568
|
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
@@ -2,7 +2,7 @@ import { GraphicItemType, OnRenderGraphicItemProps, OnRunProps } from '@drincs/n
|
|
|
2
2
|
import { CharacterBaseModel, StoredClassModel } from '@drincs/pixi-vn';
|
|
3
3
|
import ExecutionType from './types/ExecutionType.mjs';
|
|
4
4
|
import ActivityModel from './classes/Activity.mjs';
|
|
5
|
-
import { a as ActivityStoredAbstract, A as ActivityProps } from './ActivityProps-
|
|
5
|
+
import { a as ActivityStoredAbstract, A as ActivityProps } from './ActivityProps-D45DQdcT.mjs';
|
|
6
6
|
import { OnRunActivityEvent } from './types/OnRunActivityEvent.mjs';
|
|
7
7
|
import { OnRunCommitmentEvent } from './types/OnRunCommitmentEvent.mjs';
|
|
8
8
|
|
|
@@ -53,6 +53,7 @@ interface CommitmentProps<TCharacter extends CharacterBaseModel = CharacterBaseM
|
|
|
53
53
|
renderImage?: GraphicItemType | ((commitment: CommitmentBaseModel<TCharacter, TRoom>, props: OnRenderGraphicItemProps) => GraphicItemType);
|
|
54
54
|
/**
|
|
55
55
|
* Execution type. If is "automatic" the onRun() runned automatically when the palayer is in the room. If is "interaction" the player must interact with the character to run the onRun() function.
|
|
56
|
+
* If you set "automatic" remember to remove the commitment when it is no longer needed, because otherwise it repeats itself every time.
|
|
56
57
|
* @default "interaction"
|
|
57
58
|
*/
|
|
58
59
|
executionType?: ExecutionType;
|
|
@@ -549,6 +550,7 @@ declare class CommitmentBaseModel<TCharacter extends CharacterBaseModel = Charac
|
|
|
549
550
|
private _executionType;
|
|
550
551
|
/**
|
|
551
552
|
* Execution type. If is "automatic" the onRun() runned automatically when the palayer is in the room. If is "interaction" the player must interact with the character to run the onRun() function.
|
|
553
|
+
* If you set "automatic" remember to remove the commitment when it is no longer needed, because otherwise it repeats itself every time.
|
|
552
554
|
*/
|
|
553
555
|
get executionType(): ExecutionType;
|
|
554
556
|
private _renderIcon?;
|
|
@@ -560,7 +562,7 @@ declare class CommitmentBaseModel<TCharacter extends CharacterBaseModel = Charac
|
|
|
560
562
|
/**
|
|
561
563
|
* Is a function that is called when the player interacts with the character.
|
|
562
564
|
*/
|
|
563
|
-
get
|
|
565
|
+
get run(): undefined | ((props: OnRunProps) => void);
|
|
564
566
|
private defaultDisabled;
|
|
565
567
|
/**
|
|
566
568
|
* Whether is disabled. You can also pass a Pixi'VN flag name.
|
|
@@ -1,8 +1,164 @@
|
|
|
1
|
-
import { GraphicItemType,
|
|
1
|
+
import { OnRenderGraphicItemProps, GraphicItemType, OnStartStage, OnEndStage } from '@drincs/nqtr/dist/override';
|
|
2
2
|
import { StoredClassModel } from '@drincs/pixi-vn';
|
|
3
3
|
import Goal, { GoalStage } from './classes/quest/Goal.js';
|
|
4
4
|
import StageFlags from './interface/quest/StageFlags.js';
|
|
5
5
|
|
|
6
|
+
declare class Stage extends StoredClassModel implements StageProps {
|
|
7
|
+
constructor(id: string, props: StageProps);
|
|
8
|
+
private _name;
|
|
9
|
+
/**
|
|
10
|
+
* The name of the stage.
|
|
11
|
+
*/
|
|
12
|
+
get name(): string;
|
|
13
|
+
private _description;
|
|
14
|
+
/**
|
|
15
|
+
* The description of the stage.
|
|
16
|
+
*/
|
|
17
|
+
get description(): string;
|
|
18
|
+
private _adviceDescription;
|
|
19
|
+
/**
|
|
20
|
+
* The advice description of the stage.
|
|
21
|
+
*/
|
|
22
|
+
get adviceDescription(): string;
|
|
23
|
+
private _renderImage?;
|
|
24
|
+
/**
|
|
25
|
+
* The function for rendering the image of the stage.
|
|
26
|
+
*/
|
|
27
|
+
get renderImage(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
28
|
+
private _defaultGoals;
|
|
29
|
+
/**
|
|
30
|
+
* The list of goals that the player needs to complete to finish the stage.
|
|
31
|
+
* This is the list set by the developer. if you want to get the current goals, use the goals property.
|
|
32
|
+
*/
|
|
33
|
+
get defaultGoals(): Goal[];
|
|
34
|
+
private _flags;
|
|
35
|
+
/**
|
|
36
|
+
* The list of flags that the player must complete to finish the stage.
|
|
37
|
+
*/
|
|
38
|
+
get flags(): StageFlags[];
|
|
39
|
+
private _daysRequiredToStart?;
|
|
40
|
+
/**
|
|
41
|
+
* The number of days required to start the stage.
|
|
42
|
+
*/
|
|
43
|
+
get daysRequiredToStart(): number;
|
|
44
|
+
private _flagsRequiredToStart;
|
|
45
|
+
/**
|
|
46
|
+
* The list of flags required to start the stage.
|
|
47
|
+
*/
|
|
48
|
+
get flagsRequiredToStart(): StageFlags[];
|
|
49
|
+
private _questsRequiredToStart;
|
|
50
|
+
/**
|
|
51
|
+
* The list of quests required to start the stage.
|
|
52
|
+
*/
|
|
53
|
+
get questsRequiredToStart(): QuestsRequiredType[];
|
|
54
|
+
private _requestDescriptionToStart;
|
|
55
|
+
/**
|
|
56
|
+
* The description of the request to start the stage.
|
|
57
|
+
*/
|
|
58
|
+
get requestDescriptionToStart(): string;
|
|
59
|
+
private _onStart?;
|
|
60
|
+
/**
|
|
61
|
+
* The function that will be called when the stage starts.
|
|
62
|
+
*/
|
|
63
|
+
get onStart(): undefined | ((props: OnStartStage) => void);
|
|
64
|
+
private _onEnd?;
|
|
65
|
+
/**
|
|
66
|
+
* The function that will be called when the stage ends.
|
|
67
|
+
*/
|
|
68
|
+
get onEnd(): undefined | ((props: OnEndStage) => void);
|
|
69
|
+
}
|
|
70
|
+
declare class StageQuest extends Stage {
|
|
71
|
+
constructor(id: string, props: StageProps);
|
|
72
|
+
/**
|
|
73
|
+
* Check if the flag and goals are completed.
|
|
74
|
+
* You can force the completion of the stage by setting the completed property to true.
|
|
75
|
+
*/
|
|
76
|
+
get completed(): boolean;
|
|
77
|
+
set completed(value: boolean);
|
|
78
|
+
/**
|
|
79
|
+
* The list of goals that the player needs to complete to finish the stage.
|
|
80
|
+
*/
|
|
81
|
+
get goals(): GoalStage[];
|
|
82
|
+
private get prevStageEndDay();
|
|
83
|
+
private set prevStageEndDay(value);
|
|
84
|
+
/**
|
|
85
|
+
* The day when the stage starts.
|
|
86
|
+
*/
|
|
87
|
+
get startDay(): number | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Check if the stage can start.
|
|
90
|
+
*/
|
|
91
|
+
get canStart(): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* The function that will be called when the stage starts.
|
|
94
|
+
*/
|
|
95
|
+
get onStart(): undefined | ((props: OnStartStage) => void);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
declare class Quest extends StoredClassModel {
|
|
99
|
+
constructor(id: string, stages: Stage[], props: QuestProps);
|
|
100
|
+
private _stages;
|
|
101
|
+
/**
|
|
102
|
+
* The stages of the quest.
|
|
103
|
+
*/
|
|
104
|
+
get stages(): StageQuest[];
|
|
105
|
+
private _name;
|
|
106
|
+
/**
|
|
107
|
+
* The name of the quest.
|
|
108
|
+
*/
|
|
109
|
+
get name(): string;
|
|
110
|
+
private _description;
|
|
111
|
+
/**
|
|
112
|
+
* The description of the quest.
|
|
113
|
+
*/
|
|
114
|
+
get description(): string;
|
|
115
|
+
private _renderIcon?;
|
|
116
|
+
/**
|
|
117
|
+
* The function for rendering the icon of the quest.
|
|
118
|
+
*/
|
|
119
|
+
get renderIcon(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
120
|
+
private _renderImage?;
|
|
121
|
+
/**
|
|
122
|
+
* The function for rendering the image of the quest.
|
|
123
|
+
*/
|
|
124
|
+
get renderImage(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
125
|
+
private _isInDevelopment;
|
|
126
|
+
/**
|
|
127
|
+
* If the quest is in development.
|
|
128
|
+
*/
|
|
129
|
+
get isInDevelopment(): boolean;
|
|
130
|
+
/**
|
|
131
|
+
* The index of the current stage.
|
|
132
|
+
*/
|
|
133
|
+
get currentStageIndex(): number | undefined;
|
|
134
|
+
private set currentStageIndex(value);
|
|
135
|
+
/**
|
|
136
|
+
* The current stage.
|
|
137
|
+
*/
|
|
138
|
+
get currentStage(): StageQuest | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* If the quest is started.
|
|
141
|
+
*/
|
|
142
|
+
get started(): boolean;
|
|
143
|
+
/**
|
|
144
|
+
* If the quest is completed.
|
|
145
|
+
*/
|
|
146
|
+
get completed(): boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Start the quest.
|
|
149
|
+
* @param props The properties for the start stage. If you not want to pass any property, you can pass an {}.
|
|
150
|
+
* @returns
|
|
151
|
+
*/
|
|
152
|
+
start(props: OnStartStage): void;
|
|
153
|
+
/**
|
|
154
|
+
* Try to go to the next stage.
|
|
155
|
+
* @param startProps The properties for the start stage. If you not want to pass any property, you can pass an {}.
|
|
156
|
+
* @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
|
|
157
|
+
* @returns true if the stage was changed, false otherwise.
|
|
158
|
+
*/
|
|
159
|
+
tryToGoNextStage(startProps: OnStartStage, endProps: OnEndStage): boolean;
|
|
160
|
+
}
|
|
161
|
+
|
|
6
162
|
type QuestsRequiredType = {
|
|
7
163
|
quest: Quest;
|
|
8
164
|
stageNumber: number;
|
|
@@ -110,88 +266,11 @@ interface StageProps {
|
|
|
110
266
|
/**
|
|
111
267
|
* The function that will be executed when the stage starts.
|
|
112
268
|
*/
|
|
113
|
-
onStart?: () => void;
|
|
269
|
+
onStart?: (props: OnStartStage) => void;
|
|
114
270
|
/**
|
|
115
271
|
* The function that will be executed when the stage ends.
|
|
116
272
|
*/
|
|
117
|
-
onEnd?: () => void;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
declare class Stage extends StoredClassModel implements StageProps {
|
|
121
|
-
constructor(id: string, props: StageProps);
|
|
122
|
-
private _name;
|
|
123
|
-
get name(): string;
|
|
124
|
-
private _description;
|
|
125
|
-
get description(): string;
|
|
126
|
-
private _adviceDescription;
|
|
127
|
-
get adviceDescription(): string;
|
|
128
|
-
private _renderImage?;
|
|
129
|
-
/**
|
|
130
|
-
* The function for rendering the image of the stage.
|
|
131
|
-
*/
|
|
132
|
-
get renderImage(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
133
|
-
private _defaultGoals;
|
|
134
|
-
get defaultGoals(): Goal[];
|
|
135
|
-
private _flags;
|
|
136
|
-
/**
|
|
137
|
-
* The list of flags that the player must complete to finish the stage.
|
|
138
|
-
*/
|
|
139
|
-
get flags(): StageFlags[];
|
|
140
|
-
private _daysRequiredToStart?;
|
|
141
|
-
get daysRequiredToStart(): number;
|
|
142
|
-
private _flagsRequiredToStart;
|
|
143
|
-
get flagsRequiredToStart(): StageFlags[];
|
|
144
|
-
private _questsRequiredToStart;
|
|
145
|
-
get questsRequiredToStart(): QuestsRequiredType[];
|
|
146
|
-
private _requestDescriptionToStart;
|
|
147
|
-
get requestDescriptionToStart(): string;
|
|
148
|
-
private _onStart?;
|
|
149
|
-
get onStart(): undefined | (() => void);
|
|
150
|
-
private _onEnd?;
|
|
151
|
-
get onEnd(): undefined | (() => void);
|
|
152
|
-
}
|
|
153
|
-
declare class StageQuest extends Stage {
|
|
154
|
-
constructor(id: string, props: StageProps);
|
|
155
|
-
get completed(): boolean;
|
|
156
|
-
set completed(value: boolean);
|
|
157
|
-
/**
|
|
158
|
-
* The list of goals that the player needs to complete to finish the stage.
|
|
159
|
-
*/
|
|
160
|
-
get goals(): GoalStage[];
|
|
161
|
-
private get prevStageEndDay();
|
|
162
|
-
private set prevStageEndDay(value);
|
|
163
|
-
get startDay(): number | undefined;
|
|
164
|
-
get canStart(): boolean;
|
|
165
|
-
get onStart(): undefined | (() => void);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
declare class Quest extends StoredClassModel {
|
|
169
|
-
constructor(id: string, stages: Stage[], props: QuestProps);
|
|
170
|
-
private _stages;
|
|
171
|
-
get stages(): StageQuest[];
|
|
172
|
-
private _name;
|
|
173
|
-
get name(): string;
|
|
174
|
-
private _description;
|
|
175
|
-
get description(): string;
|
|
176
|
-
private _renderIcon?;
|
|
177
|
-
/**
|
|
178
|
-
* The function for rendering the icon of the quest.
|
|
179
|
-
*/
|
|
180
|
-
get renderIcon(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
181
|
-
private _renderImage?;
|
|
182
|
-
/**
|
|
183
|
-
* The function for rendering the image of the quest.
|
|
184
|
-
*/
|
|
185
|
-
get renderImage(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
186
|
-
private _isInDevelopment;
|
|
187
|
-
get isInDevelopment(): boolean;
|
|
188
|
-
get currentStageIndex(): number | undefined;
|
|
189
|
-
private set currentStageIndex(value);
|
|
190
|
-
get currentStage(): StageQuest | undefined;
|
|
191
|
-
get started(): boolean;
|
|
192
|
-
get completed(): boolean;
|
|
193
|
-
start(): void;
|
|
194
|
-
tryToGoNextStage(): void;
|
|
273
|
+
onEnd?: (props: OnEndStage) => void;
|
|
195
274
|
}
|
|
196
275
|
|
|
197
|
-
export {
|
|
276
|
+
export { type QuestProps as Q, Stage as S, type StageProps as a, type QuestsRequiredType as b, Quest as c, StageQuest as d };
|
|
@@ -1,8 +1,164 @@
|
|
|
1
|
-
import { GraphicItemType,
|
|
1
|
+
import { OnRenderGraphicItemProps, GraphicItemType, OnStartStage, OnEndStage } from '@drincs/nqtr/dist/override';
|
|
2
2
|
import { StoredClassModel } from '@drincs/pixi-vn';
|
|
3
3
|
import Goal, { GoalStage } from './classes/quest/Goal.mjs';
|
|
4
4
|
import StageFlags from './interface/quest/StageFlags.mjs';
|
|
5
5
|
|
|
6
|
+
declare class Stage extends StoredClassModel implements StageProps {
|
|
7
|
+
constructor(id: string, props: StageProps);
|
|
8
|
+
private _name;
|
|
9
|
+
/**
|
|
10
|
+
* The name of the stage.
|
|
11
|
+
*/
|
|
12
|
+
get name(): string;
|
|
13
|
+
private _description;
|
|
14
|
+
/**
|
|
15
|
+
* The description of the stage.
|
|
16
|
+
*/
|
|
17
|
+
get description(): string;
|
|
18
|
+
private _adviceDescription;
|
|
19
|
+
/**
|
|
20
|
+
* The advice description of the stage.
|
|
21
|
+
*/
|
|
22
|
+
get adviceDescription(): string;
|
|
23
|
+
private _renderImage?;
|
|
24
|
+
/**
|
|
25
|
+
* The function for rendering the image of the stage.
|
|
26
|
+
*/
|
|
27
|
+
get renderImage(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
28
|
+
private _defaultGoals;
|
|
29
|
+
/**
|
|
30
|
+
* The list of goals that the player needs to complete to finish the stage.
|
|
31
|
+
* This is the list set by the developer. if you want to get the current goals, use the goals property.
|
|
32
|
+
*/
|
|
33
|
+
get defaultGoals(): Goal[];
|
|
34
|
+
private _flags;
|
|
35
|
+
/**
|
|
36
|
+
* The list of flags that the player must complete to finish the stage.
|
|
37
|
+
*/
|
|
38
|
+
get flags(): StageFlags[];
|
|
39
|
+
private _daysRequiredToStart?;
|
|
40
|
+
/**
|
|
41
|
+
* The number of days required to start the stage.
|
|
42
|
+
*/
|
|
43
|
+
get daysRequiredToStart(): number;
|
|
44
|
+
private _flagsRequiredToStart;
|
|
45
|
+
/**
|
|
46
|
+
* The list of flags required to start the stage.
|
|
47
|
+
*/
|
|
48
|
+
get flagsRequiredToStart(): StageFlags[];
|
|
49
|
+
private _questsRequiredToStart;
|
|
50
|
+
/**
|
|
51
|
+
* The list of quests required to start the stage.
|
|
52
|
+
*/
|
|
53
|
+
get questsRequiredToStart(): QuestsRequiredType[];
|
|
54
|
+
private _requestDescriptionToStart;
|
|
55
|
+
/**
|
|
56
|
+
* The description of the request to start the stage.
|
|
57
|
+
*/
|
|
58
|
+
get requestDescriptionToStart(): string;
|
|
59
|
+
private _onStart?;
|
|
60
|
+
/**
|
|
61
|
+
* The function that will be called when the stage starts.
|
|
62
|
+
*/
|
|
63
|
+
get onStart(): undefined | ((props: OnStartStage) => void);
|
|
64
|
+
private _onEnd?;
|
|
65
|
+
/**
|
|
66
|
+
* The function that will be called when the stage ends.
|
|
67
|
+
*/
|
|
68
|
+
get onEnd(): undefined | ((props: OnEndStage) => void);
|
|
69
|
+
}
|
|
70
|
+
declare class StageQuest extends Stage {
|
|
71
|
+
constructor(id: string, props: StageProps);
|
|
72
|
+
/**
|
|
73
|
+
* Check if the flag and goals are completed.
|
|
74
|
+
* You can force the completion of the stage by setting the completed property to true.
|
|
75
|
+
*/
|
|
76
|
+
get completed(): boolean;
|
|
77
|
+
set completed(value: boolean);
|
|
78
|
+
/**
|
|
79
|
+
* The list of goals that the player needs to complete to finish the stage.
|
|
80
|
+
*/
|
|
81
|
+
get goals(): GoalStage[];
|
|
82
|
+
private get prevStageEndDay();
|
|
83
|
+
private set prevStageEndDay(value);
|
|
84
|
+
/**
|
|
85
|
+
* The day when the stage starts.
|
|
86
|
+
*/
|
|
87
|
+
get startDay(): number | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Check if the stage can start.
|
|
90
|
+
*/
|
|
91
|
+
get canStart(): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* The function that will be called when the stage starts.
|
|
94
|
+
*/
|
|
95
|
+
get onStart(): undefined | ((props: OnStartStage) => void);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
declare class Quest extends StoredClassModel {
|
|
99
|
+
constructor(id: string, stages: Stage[], props: QuestProps);
|
|
100
|
+
private _stages;
|
|
101
|
+
/**
|
|
102
|
+
* The stages of the quest.
|
|
103
|
+
*/
|
|
104
|
+
get stages(): StageQuest[];
|
|
105
|
+
private _name;
|
|
106
|
+
/**
|
|
107
|
+
* The name of the quest.
|
|
108
|
+
*/
|
|
109
|
+
get name(): string;
|
|
110
|
+
private _description;
|
|
111
|
+
/**
|
|
112
|
+
* The description of the quest.
|
|
113
|
+
*/
|
|
114
|
+
get description(): string;
|
|
115
|
+
private _renderIcon?;
|
|
116
|
+
/**
|
|
117
|
+
* The function for rendering the icon of the quest.
|
|
118
|
+
*/
|
|
119
|
+
get renderIcon(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
120
|
+
private _renderImage?;
|
|
121
|
+
/**
|
|
122
|
+
* The function for rendering the image of the quest.
|
|
123
|
+
*/
|
|
124
|
+
get renderImage(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
125
|
+
private _isInDevelopment;
|
|
126
|
+
/**
|
|
127
|
+
* If the quest is in development.
|
|
128
|
+
*/
|
|
129
|
+
get isInDevelopment(): boolean;
|
|
130
|
+
/**
|
|
131
|
+
* The index of the current stage.
|
|
132
|
+
*/
|
|
133
|
+
get currentStageIndex(): number | undefined;
|
|
134
|
+
private set currentStageIndex(value);
|
|
135
|
+
/**
|
|
136
|
+
* The current stage.
|
|
137
|
+
*/
|
|
138
|
+
get currentStage(): StageQuest | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* If the quest is started.
|
|
141
|
+
*/
|
|
142
|
+
get started(): boolean;
|
|
143
|
+
/**
|
|
144
|
+
* If the quest is completed.
|
|
145
|
+
*/
|
|
146
|
+
get completed(): boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Start the quest.
|
|
149
|
+
* @param props The properties for the start stage. If you not want to pass any property, you can pass an {}.
|
|
150
|
+
* @returns
|
|
151
|
+
*/
|
|
152
|
+
start(props: OnStartStage): void;
|
|
153
|
+
/**
|
|
154
|
+
* Try to go to the next stage.
|
|
155
|
+
* @param startProps The properties for the start stage. If you not want to pass any property, you can pass an {}.
|
|
156
|
+
* @param endProps The properties for the end stage. If you not want to pass any property, you can pass an {}.
|
|
157
|
+
* @returns true if the stage was changed, false otherwise.
|
|
158
|
+
*/
|
|
159
|
+
tryToGoNextStage(startProps: OnStartStage, endProps: OnEndStage): boolean;
|
|
160
|
+
}
|
|
161
|
+
|
|
6
162
|
type QuestsRequiredType = {
|
|
7
163
|
quest: Quest;
|
|
8
164
|
stageNumber: number;
|
|
@@ -110,88 +266,11 @@ interface StageProps {
|
|
|
110
266
|
/**
|
|
111
267
|
* The function that will be executed when the stage starts.
|
|
112
268
|
*/
|
|
113
|
-
onStart?: () => void;
|
|
269
|
+
onStart?: (props: OnStartStage) => void;
|
|
114
270
|
/**
|
|
115
271
|
* The function that will be executed when the stage ends.
|
|
116
272
|
*/
|
|
117
|
-
onEnd?: () => void;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
declare class Stage extends StoredClassModel implements StageProps {
|
|
121
|
-
constructor(id: string, props: StageProps);
|
|
122
|
-
private _name;
|
|
123
|
-
get name(): string;
|
|
124
|
-
private _description;
|
|
125
|
-
get description(): string;
|
|
126
|
-
private _adviceDescription;
|
|
127
|
-
get adviceDescription(): string;
|
|
128
|
-
private _renderImage?;
|
|
129
|
-
/**
|
|
130
|
-
* The function for rendering the image of the stage.
|
|
131
|
-
*/
|
|
132
|
-
get renderImage(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
133
|
-
private _defaultGoals;
|
|
134
|
-
get defaultGoals(): Goal[];
|
|
135
|
-
private _flags;
|
|
136
|
-
/**
|
|
137
|
-
* The list of flags that the player must complete to finish the stage.
|
|
138
|
-
*/
|
|
139
|
-
get flags(): StageFlags[];
|
|
140
|
-
private _daysRequiredToStart?;
|
|
141
|
-
get daysRequiredToStart(): number;
|
|
142
|
-
private _flagsRequiredToStart;
|
|
143
|
-
get flagsRequiredToStart(): StageFlags[];
|
|
144
|
-
private _questsRequiredToStart;
|
|
145
|
-
get questsRequiredToStart(): QuestsRequiredType[];
|
|
146
|
-
private _requestDescriptionToStart;
|
|
147
|
-
get requestDescriptionToStart(): string;
|
|
148
|
-
private _onStart?;
|
|
149
|
-
get onStart(): undefined | (() => void);
|
|
150
|
-
private _onEnd?;
|
|
151
|
-
get onEnd(): undefined | (() => void);
|
|
152
|
-
}
|
|
153
|
-
declare class StageQuest extends Stage {
|
|
154
|
-
constructor(id: string, props: StageProps);
|
|
155
|
-
get completed(): boolean;
|
|
156
|
-
set completed(value: boolean);
|
|
157
|
-
/**
|
|
158
|
-
* The list of goals that the player needs to complete to finish the stage.
|
|
159
|
-
*/
|
|
160
|
-
get goals(): GoalStage[];
|
|
161
|
-
private get prevStageEndDay();
|
|
162
|
-
private set prevStageEndDay(value);
|
|
163
|
-
get startDay(): number | undefined;
|
|
164
|
-
get canStart(): boolean;
|
|
165
|
-
get onStart(): undefined | (() => void);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
declare class Quest extends StoredClassModel {
|
|
169
|
-
constructor(id: string, stages: Stage[], props: QuestProps);
|
|
170
|
-
private _stages;
|
|
171
|
-
get stages(): StageQuest[];
|
|
172
|
-
private _name;
|
|
173
|
-
get name(): string;
|
|
174
|
-
private _description;
|
|
175
|
-
get description(): string;
|
|
176
|
-
private _renderIcon?;
|
|
177
|
-
/**
|
|
178
|
-
* The function for rendering the icon of the quest.
|
|
179
|
-
*/
|
|
180
|
-
get renderIcon(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
181
|
-
private _renderImage?;
|
|
182
|
-
/**
|
|
183
|
-
* The function for rendering the image of the quest.
|
|
184
|
-
*/
|
|
185
|
-
get renderImage(): ((props: OnRenderGraphicItemProps) => GraphicItemType) | undefined;
|
|
186
|
-
private _isInDevelopment;
|
|
187
|
-
get isInDevelopment(): boolean;
|
|
188
|
-
get currentStageIndex(): number | undefined;
|
|
189
|
-
private set currentStageIndex(value);
|
|
190
|
-
get currentStage(): StageQuest | undefined;
|
|
191
|
-
get started(): boolean;
|
|
192
|
-
get completed(): boolean;
|
|
193
|
-
start(): void;
|
|
194
|
-
tryToGoNextStage(): void;
|
|
273
|
+
onEnd?: (props: OnEndStage) => void;
|
|
195
274
|
}
|
|
196
275
|
|
|
197
|
-
export {
|
|
276
|
+
export { type QuestProps as Q, Stage as S, type StageProps as a, type QuestsRequiredType as b, Quest as c, StageQuest as d };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnRenderGraphicItemProps, GraphicItemType, OnRunProps } from '@drincs/nqtr/dist/override';
|
|
2
|
-
import { A as ActivityProps, a as ActivityStoredAbstract } from '../ActivityProps-
|
|
2
|
+
import { A as ActivityProps, a as ActivityStoredAbstract } from '../ActivityProps-D45DQdcT.mjs';
|
|
3
3
|
import { OnRunActivityEvent } from '../types/OnRunActivityEvent.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -96,7 +96,7 @@ declare class ActivityModel {
|
|
|
96
96
|
/**
|
|
97
97
|
* The function that is called when the activity is runned.
|
|
98
98
|
*/
|
|
99
|
-
get
|
|
99
|
+
get run(): (props: OnRunProps) => void;
|
|
100
100
|
/**
|
|
101
101
|
* Whether the activity is a deadline.
|
|
102
102
|
* @returns Whether the activity is a deadline.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnRenderGraphicItemProps, GraphicItemType, OnRunProps } from '@drincs/nqtr/dist/override';
|
|
2
|
-
import { A as ActivityProps, a as ActivityStoredAbstract } from '../ActivityProps-
|
|
2
|
+
import { A as ActivityProps, a as ActivityStoredAbstract } from '../ActivityProps-BkHX8xkA.js';
|
|
3
3
|
import { OnRunActivityEvent } from '../types/OnRunActivityEvent.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -96,7 +96,7 @@ declare class ActivityModel {
|
|
|
96
96
|
/**
|
|
97
97
|
* The function that is called when the activity is runned.
|
|
98
98
|
*/
|
|
99
|
-
get
|
|
99
|
+
get run(): (props: OnRunProps) => void;
|
|
100
100
|
/**
|
|
101
101
|
* Whether the activity is a deadline.
|
|
102
102
|
* @returns Whether the activity is a deadline.
|