@battle-racing/br-common-lib 6.2.1-rc.1 → 6.2.1-rc.2
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/data/all-tutorial-steps.js +44 -4
- package/dist/domains/command/Command.schema.d.ts +84 -3
- package/dist/domains/command/Command.schema.js +1 -1
- package/dist/domains/damage/Damage.schema.d.ts +5 -0
- package/dist/domains/flow/Flow.schema.d.ts +37 -1
- package/dist/domains/hardware/screen/ScreenTutorial.schema.d.ts +27 -0
- package/dist/domains/hardware/screen/ScreenTutorial.schema.js +3 -1
- package/dist/domains/hardware/sound/Sound.const.d.ts +4 -0
- package/dist/domains/hardware/sound/Sound.const.js +5 -1
- package/dist/domains/hardware/sound/Sound.schema.d.ts +9 -0
- package/dist/domains/hardware/sound/Sound.schema.js +1 -0
- package/dist/domains/powerUp/PowerUp.schema.d.ts +111 -3
- package/dist/domains/sounds/Sounds.const.d.ts +5 -0
- package/dist/domains/sounds/Sounds.const.js +5 -0
- package/dist/domains/sounds/Sounds.schema.d.ts +5 -0
- package/dist/domains/tutorial/Tutorial.const.d.ts +1 -0
- package/dist/domains/tutorial/Tutorial.const.js +1 -0
- package/dist/domains/tutorial/Tutorial.schema.d.ts +10 -0
- package/dist/domains/tutorial/Tutorial.schema.js +9 -2
- package/dist/domains/tutorial/Tutorial.types.d.ts +2 -1
- package/dist/domains/tutorial/TutorialConfig.schema.d.ts +200 -3
- package/dist/domains/tutorial/TutorialConfig.schema.js +7 -1
- package/package.json +1 -1
- package/src/data/all-tutorial-steps.ts +46 -4
- package/src/domains/command/Command.schema.ts +1 -1
- package/src/domains/hardware/screen/ScreenTutorial.schema.ts +3 -1
- package/src/domains/hardware/sound/Sound.const.ts +5 -0
- package/src/domains/hardware/sound/Sound.schema.ts +2 -1
- package/src/domains/sounds/Sounds.const.ts +5 -0
- package/src/domains/tutorial/Tutorial.const.ts +1 -0
- package/src/domains/tutorial/Tutorial.schema.ts +9 -1
- package/src/domains/tutorial/Tutorial.types.ts +2 -0
- package/src/domains/tutorial/TutorialConfig.schema.ts +7 -0
|
@@ -35,6 +35,7 @@ export declare const tutorialPhaseIdSchema: z.ZodEnum<{
|
|
|
35
35
|
}>;
|
|
36
36
|
export declare const tutorialListenEventOnSchema: z.ZodEnum<{
|
|
37
37
|
timeout: "timeout";
|
|
38
|
+
operator: "operator";
|
|
38
39
|
wheelButton: "wheelButton";
|
|
39
40
|
checkpoint: "checkpoint";
|
|
40
41
|
}>;
|
|
@@ -180,6 +181,7 @@ export declare const tutorialParticipantSchema: z.ZodObject<{
|
|
|
180
181
|
IN_PROGRESS: "IN_PROGRESS";
|
|
181
182
|
SKIPPED: "SKIPPED";
|
|
182
183
|
}>;
|
|
184
|
+
skipOrder: z.ZodOptional<z.ZodNumber>;
|
|
183
185
|
currentPhaseId: z.ZodEnum<{
|
|
184
186
|
starting_point: "starting_point";
|
|
185
187
|
controls_and_hud: "controls_and_hud";
|
|
@@ -213,6 +215,8 @@ export declare const tutorialParticipantSchema: z.ZodObject<{
|
|
|
213
215
|
latestCheckpointProgress: z.ZodOptional<z.ZodNumber>;
|
|
214
216
|
coins: z.ZodDefault<z.ZodNumber>;
|
|
215
217
|
currentLap: z.ZodDefault<z.ZodNumber>;
|
|
218
|
+
totalProgress: z.ZodDefault<z.ZodNumber>;
|
|
219
|
+
latestCheckpointTimeISO: z.ZodOptional<z.ZodISODateTime>;
|
|
216
220
|
totalLaps: z.ZodDefault<z.ZodNumber>;
|
|
217
221
|
position: z.ZodOptional<z.ZodObject<{
|
|
218
222
|
current: z.ZodNumber;
|
|
@@ -247,6 +251,7 @@ export declare const tutorialSessionSchema: z.ZodObject<{
|
|
|
247
251
|
IN_PROGRESS: "IN_PROGRESS";
|
|
248
252
|
SKIPPED: "SKIPPED";
|
|
249
253
|
}>;
|
|
254
|
+
skipOrder: z.ZodOptional<z.ZodNumber>;
|
|
250
255
|
currentPhaseId: z.ZodEnum<{
|
|
251
256
|
starting_point: "starting_point";
|
|
252
257
|
controls_and_hud: "controls_and_hud";
|
|
@@ -280,6 +285,8 @@ export declare const tutorialSessionSchema: z.ZodObject<{
|
|
|
280
285
|
latestCheckpointProgress: z.ZodOptional<z.ZodNumber>;
|
|
281
286
|
coins: z.ZodDefault<z.ZodNumber>;
|
|
282
287
|
currentLap: z.ZodDefault<z.ZodNumber>;
|
|
288
|
+
totalProgress: z.ZodDefault<z.ZodNumber>;
|
|
289
|
+
latestCheckpointTimeISO: z.ZodOptional<z.ZodISODateTime>;
|
|
283
290
|
totalLaps: z.ZodDefault<z.ZodNumber>;
|
|
284
291
|
position: z.ZodOptional<z.ZodObject<{
|
|
285
292
|
current: z.ZodNumber;
|
|
@@ -324,3 +331,6 @@ export declare const startBattleTutorialSchema: z.ZodObject<{
|
|
|
324
331
|
speedConfig: z.ZodOptional<z.ZodNumber>;
|
|
325
332
|
}, z.core.$strip>>;
|
|
326
333
|
}, z.core.$strip>;
|
|
334
|
+
export declare const skipTutorialKartSchema: z.ZodObject<{
|
|
335
|
+
tutorialSessionId: z.ZodString;
|
|
336
|
+
}, z.core.$strip>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.startBattleTutorialSchema = exports.startRaceTutorialSchema = exports.tutorialSessionSchema = exports.tutorialParticipantSchema = exports.tutorialConfigurationSchema = exports.tutorialInputSignalSchema = exports.tutorialSteeringWheelButtonPressedSchema = exports.tutorialKartEventBaseSchema = exports.tutorialInputSignalTypeSchema = exports.tutorialKartSnapshotSchema = exports.tutorialCheckpointTargetSchema = exports.tutorialInputButtonSchema = exports.tutorialSteeringWheelButtonSchema = exports.tutorialListenEventOnSchema = exports.tutorialPhaseIdSchema = exports.tutorialStatusSchema = exports.tutorialScreenStepSchema = void 0;
|
|
3
|
+
exports.skipTutorialKartSchema = exports.startBattleTutorialSchema = exports.startRaceTutorialSchema = exports.tutorialSessionSchema = exports.tutorialParticipantSchema = exports.tutorialConfigurationSchema = exports.tutorialInputSignalSchema = exports.tutorialSteeringWheelButtonPressedSchema = exports.tutorialKartEventBaseSchema = exports.tutorialInputSignalTypeSchema = exports.tutorialKartSnapshotSchema = exports.tutorialCheckpointTargetSchema = exports.tutorialInputButtonSchema = exports.tutorialSteeringWheelButtonSchema = exports.tutorialListenEventOnSchema = exports.tutorialPhaseIdSchema = exports.tutorialStatusSchema = exports.tutorialScreenStepSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const Battle_schema_1 = require("../game/battle/Battle.schema");
|
|
6
6
|
const Game_schema_1 = require("../game/Game.schema");
|
|
@@ -43,6 +43,7 @@ exports.tutorialPhaseIdSchema = zod_1.z.enum([
|
|
|
43
43
|
]);
|
|
44
44
|
exports.tutorialListenEventOnSchema = zod_1.z.enum([
|
|
45
45
|
Tutorial_const_1.TUTORIAL_LISTEN_EVENT_ON.TIMEOUT,
|
|
46
|
+
Tutorial_const_1.TUTORIAL_LISTEN_EVENT_ON.OPERATOR,
|
|
46
47
|
Tutorial_const_1.TUTORIAL_LISTEN_EVENT_ON.WHEEL_BUTTON,
|
|
47
48
|
Tutorial_const_1.TUTORIAL_LISTEN_EVENT_ON.CHECKPOINT,
|
|
48
49
|
]);
|
|
@@ -99,6 +100,7 @@ exports.tutorialParticipantSchema = zod_1.z.object({
|
|
|
99
100
|
kartGuid: zod_1.z.string().min(1),
|
|
100
101
|
playerId: zod_1.z.string().optional(),
|
|
101
102
|
status: exports.tutorialStatusSchema,
|
|
103
|
+
skipOrder: zod_1.z.number().int().positive().optional(),
|
|
102
104
|
currentPhaseId: exports.tutorialPhaseIdSchema,
|
|
103
105
|
currentStep: exports.tutorialScreenStepSchema,
|
|
104
106
|
revision: zod_1.z.number().int().nonnegative(),
|
|
@@ -106,7 +108,9 @@ exports.tutorialParticipantSchema = zod_1.z.object({
|
|
|
106
108
|
latestCheckpointId: zod_1.z.string().optional(),
|
|
107
109
|
latestCheckpointProgress: zod_1.z.number().optional(),
|
|
108
110
|
coins: zod_1.z.number().int().default(0),
|
|
109
|
-
currentLap: zod_1.z.number().int().default(
|
|
111
|
+
currentLap: zod_1.z.number().int().default(0),
|
|
112
|
+
totalProgress: zod_1.z.number().default(0),
|
|
113
|
+
latestCheckpointTimeISO: zod_1.z.iso.datetime().optional(),
|
|
110
114
|
totalLaps: zod_1.z.number().int().default(1),
|
|
111
115
|
position: zod_1.z
|
|
112
116
|
.object({
|
|
@@ -134,3 +138,6 @@ const startTutorialOptionsSchema = zod_1.z.object({
|
|
|
134
138
|
});
|
|
135
139
|
exports.startRaceTutorialSchema = Race_schema_1.startRaceSchema.extend(startTutorialOptionsSchema.shape);
|
|
136
140
|
exports.startBattleTutorialSchema = Battle_schema_1.startBattleSchema.extend(startTutorialOptionsSchema.shape);
|
|
141
|
+
exports.skipTutorialKartSchema = zod_1.z.object({
|
|
142
|
+
tutorialSessionId: zod_1.z.string().min(1),
|
|
143
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { tutorialInputSignalSchema, tutorialInputSignalTypeSchema, tutorialKartSnapshotSchema, tutorialListenEventOnSchema, tutorialCheckpointTargetSchema, tutorialPhaseIdSchema, tutorialScreenStepSchema, tutorialStatusSchema, tutorialSteeringWheelButtonPressedSchema, tutorialSteeringWheelButtonSchema, tutorialInputButtonSchema, tutorialConfigurationSchema, tutorialParticipantSchema, tutorialSessionSchema, startRaceTutorialSchema, startBattleTutorialSchema } from './Tutorial.schema';
|
|
2
|
+
import { tutorialInputSignalSchema, tutorialInputSignalTypeSchema, tutorialKartSnapshotSchema, tutorialListenEventOnSchema, tutorialCheckpointTargetSchema, tutorialPhaseIdSchema, tutorialScreenStepSchema, tutorialStatusSchema, tutorialSteeringWheelButtonPressedSchema, tutorialSteeringWheelButtonSchema, tutorialInputButtonSchema, tutorialConfigurationSchema, tutorialParticipantSchema, tutorialSessionSchema, startRaceTutorialSchema, startBattleTutorialSchema, skipTutorialKartSchema } from './Tutorial.schema';
|
|
3
3
|
export type TutorialScreenStep = z.infer<typeof tutorialScreenStepSchema>;
|
|
4
4
|
export type TutorialStatus = z.infer<typeof tutorialStatusSchema>;
|
|
5
5
|
export type TutorialPhaseId = z.infer<typeof tutorialPhaseIdSchema>;
|
|
@@ -16,3 +16,4 @@ export type TutorialParticipant = z.infer<typeof tutorialParticipantSchema>;
|
|
|
16
16
|
export type TutorialSession = z.infer<typeof tutorialSessionSchema>;
|
|
17
17
|
export type StartRaceTutorial = z.infer<typeof startRaceTutorialSchema>;
|
|
18
18
|
export type StartBattleTutorial = z.infer<typeof startBattleTutorialSchema>;
|
|
19
|
+
export type SkipTutorialKart = z.infer<typeof skipTutorialKartSchema>;
|
|
@@ -3,6 +3,9 @@ export declare const tutorialTimeoutListenEventSchema: z.ZodObject<{
|
|
|
3
3
|
on: z.ZodLiteral<"timeout">;
|
|
4
4
|
durationMs: z.ZodNumber;
|
|
5
5
|
}, z.core.$strip>;
|
|
6
|
+
export declare const tutorialOperatorListenEventSchema: z.ZodObject<{
|
|
7
|
+
on: z.ZodLiteral<"operator">;
|
|
8
|
+
}, z.core.$strip>;
|
|
6
9
|
export declare const tutorialWheelButtonListenEventSchema: z.ZodObject<{
|
|
7
10
|
on: z.ZodLiteral<"wheelButton">;
|
|
8
11
|
button: z.ZodEnum<{
|
|
@@ -23,6 +26,8 @@ export declare const tutorialCheckpointListenEventSchema: z.ZodObject<{
|
|
|
23
26
|
export declare const tutorialListenEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
27
|
on: z.ZodLiteral<"timeout">;
|
|
25
28
|
durationMs: z.ZodNumber;
|
|
29
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
30
|
+
on: z.ZodLiteral<"operator">;
|
|
26
31
|
}, z.core.$strip>, z.ZodObject<{
|
|
27
32
|
on: z.ZodLiteral<"wheelButton">;
|
|
28
33
|
button: z.ZodEnum<{
|
|
@@ -67,6 +72,8 @@ export declare const tutorialStepConfigSchema: z.ZodObject<{
|
|
|
67
72
|
listenEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
68
73
|
on: z.ZodLiteral<"timeout">;
|
|
69
74
|
durationMs: z.ZodNumber;
|
|
75
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
76
|
+
on: z.ZodLiteral<"operator">;
|
|
70
77
|
}, z.core.$strip>, z.ZodObject<{
|
|
71
78
|
on: z.ZodLiteral<"wheelButton">;
|
|
72
79
|
button: z.ZodEnum<{
|
|
@@ -971,6 +978,33 @@ export declare const tutorialStepConfigSchema: z.ZodObject<{
|
|
|
971
978
|
revision: z.ZodOptional<z.ZodNumber>;
|
|
972
979
|
presentationRevision: z.ZodOptional<z.ZodNumber>;
|
|
973
980
|
step: z.ZodLiteral<"TutorialCompleted">;
|
|
981
|
+
hud: z.ZodOptional<z.ZodObject<{
|
|
982
|
+
coins: z.ZodNonOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
983
|
+
position: z.ZodNonOptional<z.ZodOptional<z.ZodObject<{
|
|
984
|
+
current: z.ZodNullable<z.ZodNumber>;
|
|
985
|
+
total: z.ZodNullable<z.ZodNumber>;
|
|
986
|
+
}, z.core.$strip>>>;
|
|
987
|
+
laps: z.ZodNonOptional<z.ZodOptional<z.ZodObject<{
|
|
988
|
+
current: z.ZodNullable<z.ZodNumber>;
|
|
989
|
+
total: z.ZodNullable<z.ZodNumber>;
|
|
990
|
+
}, z.core.$strip>>>;
|
|
991
|
+
gameTimeLeft: z.ZodNonOptional<z.ZodOptional<z.ZodObject<{
|
|
992
|
+
minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
993
|
+
seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
994
|
+
}, z.core.$strip>>>;
|
|
995
|
+
powerUp: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
|
|
996
|
+
readonly BATTLE_GOD: "Battle God";
|
|
997
|
+
readonly BATTLE_STAR: "Battle Star";
|
|
998
|
+
readonly BATTLE_SHOT: "Battle Shot";
|
|
999
|
+
readonly BATTLE_NITRO: "Battle Nitro";
|
|
1000
|
+
readonly BATTLE_PULSE: "Battle Pulse";
|
|
1001
|
+
readonly BATTLE_TRAP: "Battle Trap";
|
|
1002
|
+
readonly BATTLE_SHIELD: "Battle Shield";
|
|
1003
|
+
readonly BATTLE_TURBO: "Battle Turbo";
|
|
1004
|
+
readonly BATTLE_BLUE_SHOT: "Battle Blue Shot";
|
|
1005
|
+
}>, z.ZodLiteral<"Clear PowerUp">]>>>;
|
|
1006
|
+
powerUpAnimationTimeSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1007
|
+
}, z.core.$strip>>;
|
|
974
1008
|
}, z.core.$strip>], "step">;
|
|
975
1009
|
}, z.core.$strip>, z.ZodObject<{
|
|
976
1010
|
module: z.ZodLiteral<"screen">;
|
|
@@ -1036,10 +1070,19 @@ export declare const tutorialStepConfigSchema: z.ZodObject<{
|
|
|
1036
1070
|
readonly SYSTEM_STARTED: "system_started.mp3";
|
|
1037
1071
|
readonly WARNING_ALERT_THIS_IS_NOT_A_TEST: "warning_alert_this_is_not_a_test.mp3";
|
|
1038
1072
|
readonly WINNER_LAUGH: "winner_laugh.mp3";
|
|
1073
|
+
readonly TUTORIAL_COUNTDOWN: "tutorial/3,2,1 GO.mp3";
|
|
1039
1074
|
readonly TUTORIAL_WELCOME: "tutorial/welcome_to_battle_racing.mp3";
|
|
1075
|
+
readonly TUTORIAL_SECURE_BELONGINGS: "tutorial/secure_belongins.mp3";
|
|
1076
|
+
readonly TUTORIAL_BUCKLE_UP: "tutorial/buckle_up.mp3";
|
|
1040
1077
|
readonly TUTORIAL_GAS_PEDAL: "tutorial/gas_pedal.mp3";
|
|
1078
|
+
readonly TUTORIAL_BUTTON_PRESS: "tutorial/button_press.mp3";
|
|
1079
|
+
readonly TUTORIAL_FINAL: "tutorial/final_tutorial.mp3";
|
|
1041
1080
|
}>;
|
|
1042
|
-
|
|
1081
|
+
channel: z.ZodOptional<z.ZodEnum<{
|
|
1082
|
+
readonly MAIN: "main";
|
|
1083
|
+
readonly EFFECT: "effect";
|
|
1084
|
+
}>>;
|
|
1085
|
+
durationMs: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"infinite">]>, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodString]>]>>;
|
|
1043
1086
|
}, z.core.$strip>;
|
|
1044
1087
|
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
1045
1088
|
module: z.ZodLiteral<"emergency">;
|
|
@@ -1086,6 +1129,45 @@ export declare const tutorialPhaseConfigSchema: z.ZodObject<{
|
|
|
1086
1129
|
}>;
|
|
1087
1130
|
name: z.ZodString;
|
|
1088
1131
|
index: z.ZodNumber;
|
|
1132
|
+
inputFeedbackSound: z.ZodOptional<z.ZodObject<{
|
|
1133
|
+
soundName: z.ZodEnum<{
|
|
1134
|
+
readonly BATTLE_GOD_ACTIVATION: "battle_god_activation.mp3";
|
|
1135
|
+
readonly BATTLE_LASER_ACTIVATION: "battle_laser_activation.mp3";
|
|
1136
|
+
readonly BATTLE_LASER_DAMAGE: "battle_laser_damage.mp3";
|
|
1137
|
+
readonly BATTLE_PULSE_ACTIVATION: "battle_pulse_activation.mp3";
|
|
1138
|
+
readonly BATTLE_PULSE_DAMAGE: "battle_pulse_damage.mp3";
|
|
1139
|
+
readonly BATTLE_SHIELD_ACTIVATION: "battle_shield_activation.mp3";
|
|
1140
|
+
readonly BATTLE_SHOT_ACTIVATION: "battle_shot_activation.mp3";
|
|
1141
|
+
readonly BATTLE_SHOT_DAMAGE: "battle_shot_damage.mp3";
|
|
1142
|
+
readonly BATTLE_STAR_DAMAGE: "battle_star_damage.mp3";
|
|
1143
|
+
readonly BATTLE_TRAP_ACTIVATION: "battle_trap_activation.mp3";
|
|
1144
|
+
readonly BATTLE_TRAP_DAMAGE: "battle_trap_damage.mp3";
|
|
1145
|
+
readonly BATTLE_TURBO_ACTIVATION: "battle_turbo_activation.mp3";
|
|
1146
|
+
readonly COUNTDOWN_3_2_1: "countdown_3_2_1.mp3";
|
|
1147
|
+
readonly EMERGENCY_ALERT: "emergency_alert.mp3";
|
|
1148
|
+
readonly ENGINE_START: "engine_start.mp3";
|
|
1149
|
+
readonly FINAL_LAP_MARIO_KART: "final_lap_mario_kart.mp3";
|
|
1150
|
+
readonly KART_SKIDING: "kart_skiding.mp3";
|
|
1151
|
+
readonly PICK_COIN_X2: "pick_coin_x2.mp3";
|
|
1152
|
+
readonly POWER_UP_SELECTION: "power_up_selection.mp3";
|
|
1153
|
+
readonly SAD_TRUMPET_LOSER: "sad_trumpet_loser.mp3";
|
|
1154
|
+
readonly SYSTEM_STARTED: "system_started.mp3";
|
|
1155
|
+
readonly WARNING_ALERT_THIS_IS_NOT_A_TEST: "warning_alert_this_is_not_a_test.mp3";
|
|
1156
|
+
readonly WINNER_LAUGH: "winner_laugh.mp3";
|
|
1157
|
+
readonly TUTORIAL_COUNTDOWN: "tutorial/3,2,1 GO.mp3";
|
|
1158
|
+
readonly TUTORIAL_WELCOME: "tutorial/welcome_to_battle_racing.mp3";
|
|
1159
|
+
readonly TUTORIAL_SECURE_BELONGINGS: "tutorial/secure_belongins.mp3";
|
|
1160
|
+
readonly TUTORIAL_BUCKLE_UP: "tutorial/buckle_up.mp3";
|
|
1161
|
+
readonly TUTORIAL_GAS_PEDAL: "tutorial/gas_pedal.mp3";
|
|
1162
|
+
readonly TUTORIAL_BUTTON_PRESS: "tutorial/button_press.mp3";
|
|
1163
|
+
readonly TUTORIAL_FINAL: "tutorial/final_tutorial.mp3";
|
|
1164
|
+
}>;
|
|
1165
|
+
durationMs: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"infinite">]>>;
|
|
1166
|
+
channel: z.ZodOptional<z.ZodEnum<{
|
|
1167
|
+
readonly MAIN: "main";
|
|
1168
|
+
readonly EFFECT: "effect";
|
|
1169
|
+
}>>;
|
|
1170
|
+
}, z.core.$strip>>;
|
|
1089
1171
|
steps: z.ZodArray<z.ZodObject<{
|
|
1090
1172
|
id: z.ZodString;
|
|
1091
1173
|
index: z.ZodNumber;
|
|
@@ -1114,6 +1196,8 @@ export declare const tutorialPhaseConfigSchema: z.ZodObject<{
|
|
|
1114
1196
|
listenEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1115
1197
|
on: z.ZodLiteral<"timeout">;
|
|
1116
1198
|
durationMs: z.ZodNumber;
|
|
1199
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1200
|
+
on: z.ZodLiteral<"operator">;
|
|
1117
1201
|
}, z.core.$strip>, z.ZodObject<{
|
|
1118
1202
|
on: z.ZodLiteral<"wheelButton">;
|
|
1119
1203
|
button: z.ZodEnum<{
|
|
@@ -2018,6 +2102,33 @@ export declare const tutorialPhaseConfigSchema: z.ZodObject<{
|
|
|
2018
2102
|
revision: z.ZodOptional<z.ZodNumber>;
|
|
2019
2103
|
presentationRevision: z.ZodOptional<z.ZodNumber>;
|
|
2020
2104
|
step: z.ZodLiteral<"TutorialCompleted">;
|
|
2105
|
+
hud: z.ZodOptional<z.ZodObject<{
|
|
2106
|
+
coins: z.ZodNonOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
2107
|
+
position: z.ZodNonOptional<z.ZodOptional<z.ZodObject<{
|
|
2108
|
+
current: z.ZodNullable<z.ZodNumber>;
|
|
2109
|
+
total: z.ZodNullable<z.ZodNumber>;
|
|
2110
|
+
}, z.core.$strip>>>;
|
|
2111
|
+
laps: z.ZodNonOptional<z.ZodOptional<z.ZodObject<{
|
|
2112
|
+
current: z.ZodNullable<z.ZodNumber>;
|
|
2113
|
+
total: z.ZodNullable<z.ZodNumber>;
|
|
2114
|
+
}, z.core.$strip>>>;
|
|
2115
|
+
gameTimeLeft: z.ZodNonOptional<z.ZodOptional<z.ZodObject<{
|
|
2116
|
+
minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2117
|
+
seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2118
|
+
}, z.core.$strip>>>;
|
|
2119
|
+
powerUp: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2120
|
+
readonly BATTLE_GOD: "Battle God";
|
|
2121
|
+
readonly BATTLE_STAR: "Battle Star";
|
|
2122
|
+
readonly BATTLE_SHOT: "Battle Shot";
|
|
2123
|
+
readonly BATTLE_NITRO: "Battle Nitro";
|
|
2124
|
+
readonly BATTLE_PULSE: "Battle Pulse";
|
|
2125
|
+
readonly BATTLE_TRAP: "Battle Trap";
|
|
2126
|
+
readonly BATTLE_SHIELD: "Battle Shield";
|
|
2127
|
+
readonly BATTLE_TURBO: "Battle Turbo";
|
|
2128
|
+
readonly BATTLE_BLUE_SHOT: "Battle Blue Shot";
|
|
2129
|
+
}>, z.ZodLiteral<"Clear PowerUp">]>>>;
|
|
2130
|
+
powerUpAnimationTimeSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2131
|
+
}, z.core.$strip>>;
|
|
2021
2132
|
}, z.core.$strip>], "step">;
|
|
2022
2133
|
}, z.core.$strip>, z.ZodObject<{
|
|
2023
2134
|
module: z.ZodLiteral<"screen">;
|
|
@@ -2083,10 +2194,19 @@ export declare const tutorialPhaseConfigSchema: z.ZodObject<{
|
|
|
2083
2194
|
readonly SYSTEM_STARTED: "system_started.mp3";
|
|
2084
2195
|
readonly WARNING_ALERT_THIS_IS_NOT_A_TEST: "warning_alert_this_is_not_a_test.mp3";
|
|
2085
2196
|
readonly WINNER_LAUGH: "winner_laugh.mp3";
|
|
2197
|
+
readonly TUTORIAL_COUNTDOWN: "tutorial/3,2,1 GO.mp3";
|
|
2086
2198
|
readonly TUTORIAL_WELCOME: "tutorial/welcome_to_battle_racing.mp3";
|
|
2199
|
+
readonly TUTORIAL_SECURE_BELONGINGS: "tutorial/secure_belongins.mp3";
|
|
2200
|
+
readonly TUTORIAL_BUCKLE_UP: "tutorial/buckle_up.mp3";
|
|
2087
2201
|
readonly TUTORIAL_GAS_PEDAL: "tutorial/gas_pedal.mp3";
|
|
2202
|
+
readonly TUTORIAL_BUTTON_PRESS: "tutorial/button_press.mp3";
|
|
2203
|
+
readonly TUTORIAL_FINAL: "tutorial/final_tutorial.mp3";
|
|
2088
2204
|
}>;
|
|
2089
|
-
|
|
2205
|
+
channel: z.ZodOptional<z.ZodEnum<{
|
|
2206
|
+
readonly MAIN: "main";
|
|
2207
|
+
readonly EFFECT: "effect";
|
|
2208
|
+
}>>;
|
|
2209
|
+
durationMs: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"infinite">]>, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodString]>]>>;
|
|
2090
2210
|
}, z.core.$strip>;
|
|
2091
2211
|
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
2092
2212
|
module: z.ZodLiteral<"emergency">;
|
|
@@ -2137,6 +2257,45 @@ export declare const tutorialMasterConfigSchema: z.ZodObject<{
|
|
|
2137
2257
|
}>;
|
|
2138
2258
|
name: z.ZodString;
|
|
2139
2259
|
index: z.ZodNumber;
|
|
2260
|
+
inputFeedbackSound: z.ZodOptional<z.ZodObject<{
|
|
2261
|
+
soundName: z.ZodEnum<{
|
|
2262
|
+
readonly BATTLE_GOD_ACTIVATION: "battle_god_activation.mp3";
|
|
2263
|
+
readonly BATTLE_LASER_ACTIVATION: "battle_laser_activation.mp3";
|
|
2264
|
+
readonly BATTLE_LASER_DAMAGE: "battle_laser_damage.mp3";
|
|
2265
|
+
readonly BATTLE_PULSE_ACTIVATION: "battle_pulse_activation.mp3";
|
|
2266
|
+
readonly BATTLE_PULSE_DAMAGE: "battle_pulse_damage.mp3";
|
|
2267
|
+
readonly BATTLE_SHIELD_ACTIVATION: "battle_shield_activation.mp3";
|
|
2268
|
+
readonly BATTLE_SHOT_ACTIVATION: "battle_shot_activation.mp3";
|
|
2269
|
+
readonly BATTLE_SHOT_DAMAGE: "battle_shot_damage.mp3";
|
|
2270
|
+
readonly BATTLE_STAR_DAMAGE: "battle_star_damage.mp3";
|
|
2271
|
+
readonly BATTLE_TRAP_ACTIVATION: "battle_trap_activation.mp3";
|
|
2272
|
+
readonly BATTLE_TRAP_DAMAGE: "battle_trap_damage.mp3";
|
|
2273
|
+
readonly BATTLE_TURBO_ACTIVATION: "battle_turbo_activation.mp3";
|
|
2274
|
+
readonly COUNTDOWN_3_2_1: "countdown_3_2_1.mp3";
|
|
2275
|
+
readonly EMERGENCY_ALERT: "emergency_alert.mp3";
|
|
2276
|
+
readonly ENGINE_START: "engine_start.mp3";
|
|
2277
|
+
readonly FINAL_LAP_MARIO_KART: "final_lap_mario_kart.mp3";
|
|
2278
|
+
readonly KART_SKIDING: "kart_skiding.mp3";
|
|
2279
|
+
readonly PICK_COIN_X2: "pick_coin_x2.mp3";
|
|
2280
|
+
readonly POWER_UP_SELECTION: "power_up_selection.mp3";
|
|
2281
|
+
readonly SAD_TRUMPET_LOSER: "sad_trumpet_loser.mp3";
|
|
2282
|
+
readonly SYSTEM_STARTED: "system_started.mp3";
|
|
2283
|
+
readonly WARNING_ALERT_THIS_IS_NOT_A_TEST: "warning_alert_this_is_not_a_test.mp3";
|
|
2284
|
+
readonly WINNER_LAUGH: "winner_laugh.mp3";
|
|
2285
|
+
readonly TUTORIAL_COUNTDOWN: "tutorial/3,2,1 GO.mp3";
|
|
2286
|
+
readonly TUTORIAL_WELCOME: "tutorial/welcome_to_battle_racing.mp3";
|
|
2287
|
+
readonly TUTORIAL_SECURE_BELONGINGS: "tutorial/secure_belongins.mp3";
|
|
2288
|
+
readonly TUTORIAL_BUCKLE_UP: "tutorial/buckle_up.mp3";
|
|
2289
|
+
readonly TUTORIAL_GAS_PEDAL: "tutorial/gas_pedal.mp3";
|
|
2290
|
+
readonly TUTORIAL_BUTTON_PRESS: "tutorial/button_press.mp3";
|
|
2291
|
+
readonly TUTORIAL_FINAL: "tutorial/final_tutorial.mp3";
|
|
2292
|
+
}>;
|
|
2293
|
+
durationMs: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"infinite">]>>;
|
|
2294
|
+
channel: z.ZodOptional<z.ZodEnum<{
|
|
2295
|
+
readonly MAIN: "main";
|
|
2296
|
+
readonly EFFECT: "effect";
|
|
2297
|
+
}>>;
|
|
2298
|
+
}, z.core.$strip>>;
|
|
2140
2299
|
steps: z.ZodArray<z.ZodObject<{
|
|
2141
2300
|
id: z.ZodString;
|
|
2142
2301
|
index: z.ZodNumber;
|
|
@@ -2165,6 +2324,8 @@ export declare const tutorialMasterConfigSchema: z.ZodObject<{
|
|
|
2165
2324
|
listenEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2166
2325
|
on: z.ZodLiteral<"timeout">;
|
|
2167
2326
|
durationMs: z.ZodNumber;
|
|
2327
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2328
|
+
on: z.ZodLiteral<"operator">;
|
|
2168
2329
|
}, z.core.$strip>, z.ZodObject<{
|
|
2169
2330
|
on: z.ZodLiteral<"wheelButton">;
|
|
2170
2331
|
button: z.ZodEnum<{
|
|
@@ -3069,6 +3230,33 @@ export declare const tutorialMasterConfigSchema: z.ZodObject<{
|
|
|
3069
3230
|
revision: z.ZodOptional<z.ZodNumber>;
|
|
3070
3231
|
presentationRevision: z.ZodOptional<z.ZodNumber>;
|
|
3071
3232
|
step: z.ZodLiteral<"TutorialCompleted">;
|
|
3233
|
+
hud: z.ZodOptional<z.ZodObject<{
|
|
3234
|
+
coins: z.ZodNonOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
3235
|
+
position: z.ZodNonOptional<z.ZodOptional<z.ZodObject<{
|
|
3236
|
+
current: z.ZodNullable<z.ZodNumber>;
|
|
3237
|
+
total: z.ZodNullable<z.ZodNumber>;
|
|
3238
|
+
}, z.core.$strip>>>;
|
|
3239
|
+
laps: z.ZodNonOptional<z.ZodOptional<z.ZodObject<{
|
|
3240
|
+
current: z.ZodNullable<z.ZodNumber>;
|
|
3241
|
+
total: z.ZodNullable<z.ZodNumber>;
|
|
3242
|
+
}, z.core.$strip>>>;
|
|
3243
|
+
gameTimeLeft: z.ZodNonOptional<z.ZodOptional<z.ZodObject<{
|
|
3244
|
+
minutes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3245
|
+
seconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3246
|
+
}, z.core.$strip>>>;
|
|
3247
|
+
powerUp: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3248
|
+
readonly BATTLE_GOD: "Battle God";
|
|
3249
|
+
readonly BATTLE_STAR: "Battle Star";
|
|
3250
|
+
readonly BATTLE_SHOT: "Battle Shot";
|
|
3251
|
+
readonly BATTLE_NITRO: "Battle Nitro";
|
|
3252
|
+
readonly BATTLE_PULSE: "Battle Pulse";
|
|
3253
|
+
readonly BATTLE_TRAP: "Battle Trap";
|
|
3254
|
+
readonly BATTLE_SHIELD: "Battle Shield";
|
|
3255
|
+
readonly BATTLE_TURBO: "Battle Turbo";
|
|
3256
|
+
readonly BATTLE_BLUE_SHOT: "Battle Blue Shot";
|
|
3257
|
+
}>, z.ZodLiteral<"Clear PowerUp">]>>>;
|
|
3258
|
+
powerUpAnimationTimeSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3259
|
+
}, z.core.$strip>>;
|
|
3072
3260
|
}, z.core.$strip>], "step">;
|
|
3073
3261
|
}, z.core.$strip>, z.ZodObject<{
|
|
3074
3262
|
module: z.ZodLiteral<"screen">;
|
|
@@ -3134,10 +3322,19 @@ export declare const tutorialMasterConfigSchema: z.ZodObject<{
|
|
|
3134
3322
|
readonly SYSTEM_STARTED: "system_started.mp3";
|
|
3135
3323
|
readonly WARNING_ALERT_THIS_IS_NOT_A_TEST: "warning_alert_this_is_not_a_test.mp3";
|
|
3136
3324
|
readonly WINNER_LAUGH: "winner_laugh.mp3";
|
|
3325
|
+
readonly TUTORIAL_COUNTDOWN: "tutorial/3,2,1 GO.mp3";
|
|
3137
3326
|
readonly TUTORIAL_WELCOME: "tutorial/welcome_to_battle_racing.mp3";
|
|
3327
|
+
readonly TUTORIAL_SECURE_BELONGINGS: "tutorial/secure_belongins.mp3";
|
|
3328
|
+
readonly TUTORIAL_BUCKLE_UP: "tutorial/buckle_up.mp3";
|
|
3138
3329
|
readonly TUTORIAL_GAS_PEDAL: "tutorial/gas_pedal.mp3";
|
|
3330
|
+
readonly TUTORIAL_BUTTON_PRESS: "tutorial/button_press.mp3";
|
|
3331
|
+
readonly TUTORIAL_FINAL: "tutorial/final_tutorial.mp3";
|
|
3139
3332
|
}>;
|
|
3140
|
-
|
|
3333
|
+
channel: z.ZodOptional<z.ZodEnum<{
|
|
3334
|
+
readonly MAIN: "main";
|
|
3335
|
+
readonly EFFECT: "effect";
|
|
3336
|
+
}>>;
|
|
3337
|
+
durationMs: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"infinite">]>, z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodString]>]>>;
|
|
3141
3338
|
}, z.core.$strip>;
|
|
3142
3339
|
}, z.core.$strip>, z.ZodUnion<readonly [z.ZodObject<{
|
|
3143
3340
|
module: z.ZodLiteral<"emergency">;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tutorialMasterConfigSchema = exports.tutorialPhaseConfigSchema = exports.tutorialStepConfigSchema = exports.tutorialListenEventSchema = exports.tutorialCheckpointListenEventSchema = exports.tutorialWheelButtonListenEventSchema = exports.tutorialTimeoutListenEventSchema = void 0;
|
|
3
|
+
exports.tutorialMasterConfigSchema = exports.tutorialPhaseConfigSchema = exports.tutorialStepConfigSchema = exports.tutorialListenEventSchema = exports.tutorialCheckpointListenEventSchema = exports.tutorialWheelButtonListenEventSchema = exports.tutorialOperatorListenEventSchema = exports.tutorialTimeoutListenEventSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const Command_schema_1 = require("../command/Command.schema");
|
|
6
|
+
const sound_1 = require("../hardware/sound");
|
|
6
7
|
const Tutorial_const_1 = require("./Tutorial.const");
|
|
7
8
|
const Tutorial_schema_1 = require("./Tutorial.schema");
|
|
8
9
|
exports.tutorialTimeoutListenEventSchema = zod_1.z.object({
|
|
9
10
|
on: zod_1.z.literal(Tutorial_const_1.TUTORIAL_LISTEN_EVENT_ON.TIMEOUT),
|
|
10
11
|
durationMs: zod_1.z.number().int().positive(),
|
|
11
12
|
});
|
|
13
|
+
exports.tutorialOperatorListenEventSchema = zod_1.z.object({
|
|
14
|
+
on: zod_1.z.literal(Tutorial_const_1.TUTORIAL_LISTEN_EVENT_ON.OPERATOR),
|
|
15
|
+
});
|
|
12
16
|
exports.tutorialWheelButtonListenEventSchema = zod_1.z.object({
|
|
13
17
|
on: zod_1.z.literal(Tutorial_const_1.TUTORIAL_LISTEN_EVENT_ON.WHEEL_BUTTON),
|
|
14
18
|
button: Tutorial_schema_1.tutorialSteeringWheelButtonSchema,
|
|
@@ -19,6 +23,7 @@ exports.tutorialCheckpointListenEventSchema = zod_1.z.object({
|
|
|
19
23
|
});
|
|
20
24
|
exports.tutorialListenEventSchema = zod_1.z.discriminatedUnion('on', [
|
|
21
25
|
exports.tutorialTimeoutListenEventSchema,
|
|
26
|
+
exports.tutorialOperatorListenEventSchema,
|
|
22
27
|
exports.tutorialWheelButtonListenEventSchema,
|
|
23
28
|
exports.tutorialCheckpointListenEventSchema,
|
|
24
29
|
]);
|
|
@@ -35,6 +40,7 @@ exports.tutorialPhaseConfigSchema = zod_1.z.object({
|
|
|
35
40
|
id: Tutorial_schema_1.tutorialPhaseIdSchema,
|
|
36
41
|
name: zod_1.z.string().min(1),
|
|
37
42
|
index: zod_1.z.number().int().nonnegative(),
|
|
43
|
+
inputFeedbackSound: sound_1.playSoundOptionsSchema.optional(),
|
|
38
44
|
steps: zod_1.z.array(exports.tutorialStepConfigSchema).min(1),
|
|
39
45
|
});
|
|
40
46
|
exports.tutorialMasterConfigSchema = zod_1.z.object({
|
package/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AllCommandsConfig,
|
|
3
|
+
PLAY_SOUND_DURATION,
|
|
3
4
|
POWER_UP_NAME,
|
|
5
|
+
SOUND_CHANNEL,
|
|
4
6
|
SOUND_NAME,
|
|
5
7
|
ScreenTutorialHud,
|
|
6
8
|
TUTORIAL_LISTEN_EVENT_ON,
|
|
@@ -72,6 +74,13 @@ export const allTutorialConfig: TutorialMasterConfig = {
|
|
|
72
74
|
step: TUTORIAL_SCREEN_STEP.COUNTDOWN,
|
|
73
75
|
},
|
|
74
76
|
},
|
|
77
|
+
{
|
|
78
|
+
module: 'sound',
|
|
79
|
+
action: 'play',
|
|
80
|
+
params: {
|
|
81
|
+
soundName: SOUND_NAME.TUTORIAL_COUNTDOWN,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
75
84
|
],
|
|
76
85
|
},
|
|
77
86
|
{
|
|
@@ -81,7 +90,7 @@ export const allTutorialConfig: TutorialMasterConfig = {
|
|
|
81
90
|
screenStep: TUTORIAL_SCREEN_STEP.WELCOME,
|
|
82
91
|
listenEvent: {
|
|
83
92
|
on: TUTORIAL_LISTEN_EVENT_ON.TIMEOUT,
|
|
84
|
-
durationMs:
|
|
93
|
+
durationMs: 5000,
|
|
85
94
|
},
|
|
86
95
|
triggerCommands: [
|
|
87
96
|
...stopKartCommands,
|
|
@@ -108,7 +117,7 @@ export const allTutorialConfig: TutorialMasterConfig = {
|
|
|
108
117
|
screenStep: TUTORIAL_SCREEN_STEP.PERSONAL_ITEMS,
|
|
109
118
|
listenEvent: {
|
|
110
119
|
on: TUTORIAL_LISTEN_EVENT_ON.TIMEOUT,
|
|
111
|
-
durationMs:
|
|
120
|
+
durationMs: 5000,
|
|
112
121
|
},
|
|
113
122
|
triggerCommands: [
|
|
114
123
|
...stopKartCommands,
|
|
@@ -119,6 +128,13 @@ export const allTutorialConfig: TutorialMasterConfig = {
|
|
|
119
128
|
step: TUTORIAL_SCREEN_STEP.PERSONAL_ITEMS,
|
|
120
129
|
},
|
|
121
130
|
},
|
|
131
|
+
{
|
|
132
|
+
module: 'sound',
|
|
133
|
+
action: 'play',
|
|
134
|
+
params: {
|
|
135
|
+
soundName: SOUND_NAME.TUTORIAL_SECURE_BELONGINGS,
|
|
136
|
+
},
|
|
137
|
+
},
|
|
122
138
|
],
|
|
123
139
|
},
|
|
124
140
|
{
|
|
@@ -139,6 +155,13 @@ export const allTutorialConfig: TutorialMasterConfig = {
|
|
|
139
155
|
step: TUTORIAL_SCREEN_STEP.SEAT_BELT,
|
|
140
156
|
},
|
|
141
157
|
},
|
|
158
|
+
{
|
|
159
|
+
module: 'sound',
|
|
160
|
+
action: 'play',
|
|
161
|
+
params: {
|
|
162
|
+
soundName: SOUND_NAME.TUTORIAL_BUCKLE_UP,
|
|
163
|
+
},
|
|
164
|
+
},
|
|
142
165
|
],
|
|
143
166
|
},
|
|
144
167
|
{
|
|
@@ -195,6 +218,10 @@ export const allTutorialConfig: TutorialMasterConfig = {
|
|
|
195
218
|
id: TUTORIAL_PHASE_ID.CONTROLS_AND_HUD,
|
|
196
219
|
name: 'Controls and HUD',
|
|
197
220
|
index: 1,
|
|
221
|
+
inputFeedbackSound: {
|
|
222
|
+
soundName: SOUND_NAME.TUTORIAL_BUTTON_PRESS,
|
|
223
|
+
channel: SOUND_CHANNEL.EFFECT,
|
|
224
|
+
},
|
|
198
225
|
steps: [
|
|
199
226
|
{
|
|
200
227
|
id: 'step_wheel_0_of_2',
|
|
@@ -429,6 +456,13 @@ export const allTutorialConfig: TutorialMasterConfig = {
|
|
|
429
456
|
hud: defaultTutorialHud,
|
|
430
457
|
},
|
|
431
458
|
},
|
|
459
|
+
{
|
|
460
|
+
module: 'sound',
|
|
461
|
+
action: 'play',
|
|
462
|
+
params: {
|
|
463
|
+
soundName: SOUND_NAME.POWER_UP_SELECTION,
|
|
464
|
+
},
|
|
465
|
+
},
|
|
432
466
|
],
|
|
433
467
|
},
|
|
434
468
|
{
|
|
@@ -466,8 +500,7 @@ export const allTutorialConfig: TutorialMasterConfig = {
|
|
|
466
500
|
name: 'Tutorial Completed Screen',
|
|
467
501
|
screenStep: TUTORIAL_SCREEN_STEP.TUTORIAL_COMPLETED,
|
|
468
502
|
listenEvent: {
|
|
469
|
-
on: TUTORIAL_LISTEN_EVENT_ON.
|
|
470
|
-
durationMs: 5000,
|
|
503
|
+
on: TUTORIAL_LISTEN_EVENT_ON.OPERATOR,
|
|
471
504
|
},
|
|
472
505
|
triggerCommands: [
|
|
473
506
|
...stopKartCommands,
|
|
@@ -476,6 +509,15 @@ export const allTutorialConfig: TutorialMasterConfig = {
|
|
|
476
509
|
action: 'showTutorialView',
|
|
477
510
|
params: {
|
|
478
511
|
step: TUTORIAL_SCREEN_STEP.TUTORIAL_COMPLETED,
|
|
512
|
+
hud: defaultTutorialHud,
|
|
513
|
+
},
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
module: 'sound',
|
|
517
|
+
action: 'play',
|
|
518
|
+
params: {
|
|
519
|
+
soundName: SOUND_NAME.TUTORIAL_FINAL,
|
|
520
|
+
durationMs: PLAY_SOUND_DURATION.INFINITE,
|
|
479
521
|
},
|
|
480
522
|
},
|
|
481
523
|
],
|
|
@@ -45,7 +45,7 @@ export const speedModuleCommandSchema = z.union([
|
|
|
45
45
|
|
|
46
46
|
// --- Sound Commands ---
|
|
47
47
|
export const playSoundActionCommandOptionsSchema = playSoundOptionsSchema.omit({ durationMs: true }).extend({
|
|
48
|
-
durationMs:
|
|
48
|
+
durationMs: z.union([playSoundOptionsSchema.shape.durationMs.unwrap(), arithmeticExpressionSchema]).optional(),
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
export const soundModuleCommandSchema = z.object({
|
|
@@ -60,5 +60,7 @@ export const screenTutorialViewInputSchema = z.discriminatedUnion('step', [
|
|
|
60
60
|
createHudTutorialStepSchema(TUTORIAL_SCREEN_STEP.POWER_UP_NITRO_READY),
|
|
61
61
|
createHudTutorialStepSchema(TUTORIAL_SCREEN_STEP.POWER_UP_RETURN_TO_HUD),
|
|
62
62
|
|
|
63
|
-
createStaticTutorialStepSchema(TUTORIAL_SCREEN_STEP.TUTORIAL_COMPLETED)
|
|
63
|
+
createStaticTutorialStepSchema(TUTORIAL_SCREEN_STEP.TUTORIAL_COMPLETED).extend({
|
|
64
|
+
hud: screenTutorialHudSchema.optional(),
|
|
65
|
+
}),
|
|
64
66
|
]);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { soundNameSchema } from '../../sounds'; // Import from domains/sounds
|
|
3
|
-
import { PLAY_SOUND_DURATION, SOUND_ACTION_COMMAND } from './Sound.const';
|
|
3
|
+
import { PLAY_SOUND_DURATION, SOUND_ACTION_COMMAND, SOUND_CHANNEL } from './Sound.const';
|
|
4
4
|
|
|
5
5
|
export const soundActionCommandSchema = z.enum(SOUND_ACTION_COMMAND);
|
|
6
6
|
|
|
7
7
|
export const playSoundOptionsSchema = z.object({
|
|
8
8
|
soundName: soundNameSchema,
|
|
9
9
|
durationMs: z.union([z.number(), z.literal(PLAY_SOUND_DURATION.INFINITE)]).optional(),
|
|
10
|
+
channel: z.enum(SOUND_CHANNEL).optional(),
|
|
10
11
|
});
|
|
@@ -22,6 +22,11 @@ export const SOUND_NAME = {
|
|
|
22
22
|
SYSTEM_STARTED: 'system_started.mp3',
|
|
23
23
|
WARNING_ALERT_THIS_IS_NOT_A_TEST: 'warning_alert_this_is_not_a_test.mp3',
|
|
24
24
|
WINNER_LAUGH: 'winner_laugh.mp3',
|
|
25
|
+
TUTORIAL_COUNTDOWN: 'tutorial/3,2,1 GO.mp3',
|
|
25
26
|
TUTORIAL_WELCOME: 'tutorial/welcome_to_battle_racing.mp3',
|
|
27
|
+
TUTORIAL_SECURE_BELONGINGS: 'tutorial/secure_belongins.mp3',
|
|
28
|
+
TUTORIAL_BUCKLE_UP: 'tutorial/buckle_up.mp3',
|
|
26
29
|
TUTORIAL_GAS_PEDAL: 'tutorial/gas_pedal.mp3',
|
|
30
|
+
TUTORIAL_BUTTON_PRESS: 'tutorial/button_press.mp3',
|
|
31
|
+
TUTORIAL_FINAL: 'tutorial/final_tutorial.mp3',
|
|
27
32
|
} as const;
|