@battle-racing/br-common-lib 6.2.0-rc.3 → 6.2.0-rc.5

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.
@@ -86,8 +86,8 @@ exports.allTutorialConfig = {
86
86
  name: 'Pedal Acceleration Check',
87
87
  screenStep: domains_1.TUTORIAL_SCREEN_STEP.PEDAL,
88
88
  listenEvent: {
89
- on: domains_1.TUTORIAL_LISTEN_EVENT_ON.CHECKPOINT,
90
- checkpoint: domains_1.TUTORIAL_LOGICAL_CHECKPOINT.CHECKPOINT_1,
89
+ on: domains_1.TUTORIAL_LISTEN_EVENT_ON.TIMEOUT,
90
+ durationMs: 5000,
91
91
  },
92
92
  triggerCommands: [
93
93
  {
@@ -102,8 +102,8 @@ exports.allTutorialConfig = {
102
102
  ],
103
103
  },
104
104
  {
105
- id: domains_1.TUTORIAL_PHASE_ID.CHECKPOINT_1,
106
- name: 'Checkpoint 1 - Controls and HUD',
105
+ id: domains_1.TUTORIAL_PHASE_ID.CONTROLS_AND_HUD,
106
+ name: 'Controls and HUD',
107
107
  index: 1,
108
108
  steps: [
109
109
  {
@@ -250,7 +250,7 @@ exports.allTutorialConfig = {
250
250
  screenStep: domains_1.TUTORIAL_SCREEN_STEP.HUD_COINS,
251
251
  listenEvent: {
252
252
  on: domains_1.TUTORIAL_LISTEN_EVENT_ON.CHECKPOINT,
253
- checkpoint: domains_1.TUTORIAL_LOGICAL_CHECKPOINT.CHECKPOINT_2,
253
+ target: domains_1.TUTORIAL_CHECKPOINT_TARGET.POWER_UP,
254
254
  },
255
255
  triggerCommands: [
256
256
  {
@@ -266,8 +266,8 @@ exports.allTutorialConfig = {
266
266
  ],
267
267
  },
268
268
  {
269
- id: domains_1.TUTORIAL_PHASE_ID.CHECKPOINT_2,
270
- name: 'Checkpoint 2 - Power Up Preview',
269
+ id: domains_1.TUTORIAL_PHASE_ID.POWER_UP,
270
+ name: 'Power Up Preview',
271
271
  index: 2,
272
272
  steps: [
273
273
  {
@@ -334,7 +334,7 @@ exports.allTutorialConfig = {
334
334
  screenStep: domains_1.TUTORIAL_SCREEN_STEP.POWER_UP_RETURN_TO_HUD,
335
335
  listenEvent: {
336
336
  on: domains_1.TUTORIAL_LISTEN_EVENT_ON.CHECKPOINT,
337
- checkpoint: domains_1.TUTORIAL_LOGICAL_CHECKPOINT.CHECKPOINT_3_FINISH,
337
+ target: domains_1.TUTORIAL_CHECKPOINT_TARGET.FINISH,
338
338
  },
339
339
  triggerCommands: [
340
340
  {
@@ -26,8 +26,8 @@ export declare const TUTORIAL_STATUS: {
26
26
  };
27
27
  export declare const TUTORIAL_PHASE_ID: {
28
28
  readonly STARTING_POINT: "starting_point";
29
- readonly CHECKPOINT_1: "checkpoint_1";
30
- readonly CHECKPOINT_2: "checkpoint_2";
29
+ readonly CONTROLS_AND_HUD: "controls_and_hud";
30
+ readonly POWER_UP: "power_up";
31
31
  readonly LAP_COMPLETION: "lap_completion";
32
32
  };
33
33
  export declare const TUTORIAL_LISTEN_EVENT_ON: {
@@ -40,10 +40,10 @@ export declare const TUTORIAL_STEERING_WHEEL_BUTTON: {
40
40
  readonly LEFT: "left";
41
41
  readonly ANY: "any";
42
42
  };
43
- export declare const TUTORIAL_LOGICAL_CHECKPOINT: {
44
- readonly CHECKPOINT_1: "checkpoint_1";
45
- readonly CHECKPOINT_2: "checkpoint_2";
46
- readonly CHECKPOINT_3_FINISH: "checkpoint_3_finish";
43
+ export declare const TUTORIAL_CHECKPOINT_TARGET: {
44
+ readonly TRACK: "TRACK";
45
+ readonly POWER_UP: "POWER_UP";
46
+ readonly FINISH: "FINISH";
47
47
  };
48
48
  export declare const TUTORIAL_INPUT_SIGNAL_TYPE: {
49
49
  readonly STEERING_WHEEL_BUTTON_PRESSED: "SteeringWheelButtonPressed";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TUTORIAL_INPUT_SIGNAL_TYPE = exports.TUTORIAL_LOGICAL_CHECKPOINT = exports.TUTORIAL_STEERING_WHEEL_BUTTON = exports.TUTORIAL_LISTEN_EVENT_ON = exports.TUTORIAL_PHASE_ID = exports.TUTORIAL_STATUS = exports.TUTORIAL_SCREEN_STEP = void 0;
3
+ exports.TUTORIAL_INPUT_SIGNAL_TYPE = exports.TUTORIAL_CHECKPOINT_TARGET = exports.TUTORIAL_STEERING_WHEEL_BUTTON = exports.TUTORIAL_LISTEN_EVENT_ON = exports.TUTORIAL_PHASE_ID = exports.TUTORIAL_STATUS = exports.TUTORIAL_SCREEN_STEP = void 0;
4
4
  exports.TUTORIAL_SCREEN_STEP = {
5
5
  WELCOME: 'Welcome',
6
6
  PERSONAL_ITEMS: 'PersonalItems',
@@ -29,8 +29,8 @@ exports.TUTORIAL_STATUS = {
29
29
  };
30
30
  exports.TUTORIAL_PHASE_ID = {
31
31
  STARTING_POINT: 'starting_point',
32
- CHECKPOINT_1: 'checkpoint_1',
33
- CHECKPOINT_2: 'checkpoint_2',
32
+ CONTROLS_AND_HUD: 'controls_and_hud',
33
+ POWER_UP: 'power_up',
34
34
  LAP_COMPLETION: 'lap_completion',
35
35
  };
36
36
  exports.TUTORIAL_LISTEN_EVENT_ON = {
@@ -43,10 +43,10 @@ exports.TUTORIAL_STEERING_WHEEL_BUTTON = {
43
43
  LEFT: 'left',
44
44
  ANY: 'any',
45
45
  };
46
- exports.TUTORIAL_LOGICAL_CHECKPOINT = {
47
- CHECKPOINT_1: 'checkpoint_1',
48
- CHECKPOINT_2: 'checkpoint_2',
49
- CHECKPOINT_3_FINISH: 'checkpoint_3_finish',
46
+ exports.TUTORIAL_CHECKPOINT_TARGET = {
47
+ TRACK: 'TRACK',
48
+ POWER_UP: 'POWER_UP',
49
+ FINISH: 'FINISH',
50
50
  };
51
51
  exports.TUTORIAL_INPUT_SIGNAL_TYPE = {
52
52
  STEERING_WHEEL_BUTTON_PRESSED: 'SteeringWheelButtonPressed',
@@ -27,8 +27,8 @@ export declare const tutorialStatusSchema: z.ZodEnum<{
27
27
  }>;
28
28
  export declare const tutorialPhaseIdSchema: z.ZodEnum<{
29
29
  starting_point: "starting_point";
30
- checkpoint_1: "checkpoint_1";
31
- checkpoint_2: "checkpoint_2";
30
+ controls_and_hud: "controls_and_hud";
31
+ power_up: "power_up";
32
32
  lap_completion: "lap_completion";
33
33
  }>;
34
34
  export declare const tutorialListenEventOnSchema: z.ZodEnum<{
@@ -41,10 +41,10 @@ export declare const tutorialSteeringWheelButtonSchema: z.ZodEnum<{
41
41
  left: "left";
42
42
  right: "right";
43
43
  }>;
44
- export declare const tutorialLogicalCheckpointSchema: z.ZodEnum<{
45
- checkpoint_1: "checkpoint_1";
46
- checkpoint_2: "checkpoint_2";
47
- checkpoint_3_finish: "checkpoint_3_finish";
44
+ export declare const tutorialCheckpointTargetSchema: z.ZodEnum<{
45
+ TRACK: "TRACK";
46
+ POWER_UP: "POWER_UP";
47
+ FINISH: "FINISH";
48
48
  }>;
49
49
  export declare const tutorialKartSnapshotSchema: z.ZodObject<{
50
50
  tutorialSessionId: z.ZodString;
@@ -59,8 +59,8 @@ export declare const tutorialKartSnapshotSchema: z.ZodObject<{
59
59
  }>;
60
60
  currentPhaseId: z.ZodEnum<{
61
61
  starting_point: "starting_point";
62
- checkpoint_1: "checkpoint_1";
63
- checkpoint_2: "checkpoint_2";
62
+ controls_and_hud: "controls_and_hud";
63
+ power_up: "power_up";
64
64
  lap_completion: "lap_completion";
65
65
  }>;
66
66
  currentStep: z.ZodEnum<{
@@ -111,16 +111,13 @@ export declare const tutorialKartSnapshotSchema: z.ZodObject<{
111
111
  }>, z.ZodLiteral<"Clear PowerUp">]>>>;
112
112
  powerUpAnimationTimeSeconds: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
113
113
  }, z.core.$strip>>;
114
- awaitingCheckpoint: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
115
- checkpoint_1: "checkpoint_1";
116
- checkpoint_2: "checkpoint_2";
117
- checkpoint_3_finish: "checkpoint_3_finish";
118
- }>>>;
119
- completedCheckpoints: z.ZodOptional<z.ZodArray<z.ZodEnum<{
120
- checkpoint_1: "checkpoint_1";
121
- checkpoint_2: "checkpoint_2";
122
- checkpoint_3_finish: "checkpoint_3_finish";
114
+ awaitingCheckpointTarget: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
115
+ TRACK: "TRACK";
116
+ POWER_UP: "POWER_UP";
117
+ FINISH: "FINISH";
123
118
  }>>>;
119
+ latestCheckpointId: z.ZodOptional<z.ZodString>;
120
+ latestCheckpointProgress: z.ZodOptional<z.ZodNumber>;
124
121
  updatedAtISO: z.ZodString;
125
122
  }, z.core.$strip>;
126
123
  export declare const tutorialInputSignalTypeSchema: z.ZodEnum<{
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tutorialInputSignalSchema = exports.tutorialSteeringWheelButtonPressedSchema = exports.tutorialKartEventBaseSchema = exports.tutorialInputSignalTypeSchema = exports.tutorialKartSnapshotSchema = exports.tutorialLogicalCheckpointSchema = exports.tutorialSteeringWheelButtonSchema = exports.tutorialListenEventOnSchema = exports.tutorialPhaseIdSchema = exports.tutorialStatusSchema = exports.tutorialScreenStepSchema = void 0;
3
+ exports.tutorialInputSignalSchema = exports.tutorialSteeringWheelButtonPressedSchema = exports.tutorialKartEventBaseSchema = exports.tutorialInputSignalTypeSchema = exports.tutorialKartSnapshotSchema = exports.tutorialCheckpointTargetSchema = exports.tutorialSteeringWheelButtonSchema = exports.tutorialListenEventOnSchema = exports.tutorialPhaseIdSchema = exports.tutorialStatusSchema = exports.tutorialScreenStepSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const ScreenTutorial_schema_1 = require("../hardware/screen/ScreenTutorial.schema");
6
6
  const Tutorial_const_1 = require("./Tutorial.const");
@@ -32,8 +32,8 @@ exports.tutorialStatusSchema = zod_1.z.enum([
32
32
  ]);
33
33
  exports.tutorialPhaseIdSchema = zod_1.z.enum([
34
34
  Tutorial_const_1.TUTORIAL_PHASE_ID.STARTING_POINT,
35
- Tutorial_const_1.TUTORIAL_PHASE_ID.CHECKPOINT_1,
36
- Tutorial_const_1.TUTORIAL_PHASE_ID.CHECKPOINT_2,
35
+ Tutorial_const_1.TUTORIAL_PHASE_ID.CONTROLS_AND_HUD,
36
+ Tutorial_const_1.TUTORIAL_PHASE_ID.POWER_UP,
37
37
  Tutorial_const_1.TUTORIAL_PHASE_ID.LAP_COMPLETION,
38
38
  ]);
39
39
  exports.tutorialListenEventOnSchema = zod_1.z.enum([
@@ -46,10 +46,10 @@ exports.tutorialSteeringWheelButtonSchema = zod_1.z.enum([
46
46
  Tutorial_const_1.TUTORIAL_STEERING_WHEEL_BUTTON.LEFT,
47
47
  Tutorial_const_1.TUTORIAL_STEERING_WHEEL_BUTTON.ANY,
48
48
  ]);
49
- exports.tutorialLogicalCheckpointSchema = zod_1.z.enum([
50
- Tutorial_const_1.TUTORIAL_LOGICAL_CHECKPOINT.CHECKPOINT_1,
51
- Tutorial_const_1.TUTORIAL_LOGICAL_CHECKPOINT.CHECKPOINT_2,
52
- Tutorial_const_1.TUTORIAL_LOGICAL_CHECKPOINT.CHECKPOINT_3_FINISH,
49
+ exports.tutorialCheckpointTargetSchema = zod_1.z.enum([
50
+ Tutorial_const_1.TUTORIAL_CHECKPOINT_TARGET.TRACK,
51
+ Tutorial_const_1.TUTORIAL_CHECKPOINT_TARGET.POWER_UP,
52
+ Tutorial_const_1.TUTORIAL_CHECKPOINT_TARGET.FINISH,
53
53
  ]);
54
54
  exports.tutorialKartSnapshotSchema = zod_1.z.object({
55
55
  tutorialSessionId: zod_1.z.string().min(1),
@@ -61,8 +61,9 @@ exports.tutorialKartSnapshotSchema = zod_1.z.object({
61
61
  revision: zod_1.z.number().int().nonnegative(),
62
62
  presentationRevision: zod_1.z.number().int().nonnegative(),
63
63
  hud: ScreenTutorial_schema_1.screenTutorialHudSchema.optional(),
64
- awaitingCheckpoint: exports.tutorialLogicalCheckpointSchema.nullable().optional(),
65
- completedCheckpoints: zod_1.z.array(exports.tutorialLogicalCheckpointSchema).optional(),
64
+ awaitingCheckpointTarget: exports.tutorialCheckpointTargetSchema.nullable().optional(),
65
+ latestCheckpointId: zod_1.z.string().optional(),
66
+ latestCheckpointProgress: zod_1.z.number().optional(),
66
67
  updatedAtISO: zod_1.z.string().datetime(),
67
68
  });
68
69
  exports.tutorialInputSignalTypeSchema = zod_1.z.enum([Tutorial_const_1.TUTORIAL_INPUT_SIGNAL_TYPE.STEERING_WHEEL_BUTTON_PRESSED]);
@@ -1,11 +1,11 @@
1
1
  import { z } from 'zod';
2
- import { tutorialInputSignalSchema, tutorialInputSignalTypeSchema, tutorialKartSnapshotSchema, tutorialListenEventOnSchema, tutorialLogicalCheckpointSchema, tutorialPhaseIdSchema, tutorialScreenStepSchema, tutorialStatusSchema, tutorialSteeringWheelButtonPressedSchema, tutorialSteeringWheelButtonSchema } from './Tutorial.schema';
2
+ import { tutorialInputSignalSchema, tutorialInputSignalTypeSchema, tutorialKartSnapshotSchema, tutorialListenEventOnSchema, tutorialCheckpointTargetSchema, tutorialPhaseIdSchema, tutorialScreenStepSchema, tutorialStatusSchema, tutorialSteeringWheelButtonPressedSchema, tutorialSteeringWheelButtonSchema } 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>;
6
6
  export type TutorialListenEventOn = z.infer<typeof tutorialListenEventOnSchema>;
7
7
  export type TutorialSteeringWheelButton = z.infer<typeof tutorialSteeringWheelButtonSchema>;
8
- export type TutorialLogicalCheckpoint = z.infer<typeof tutorialLogicalCheckpointSchema>;
8
+ export type TutorialCheckpointTarget = z.infer<typeof tutorialCheckpointTargetSchema>;
9
9
  export type TutorialKartSnapshot = z.infer<typeof tutorialKartSnapshotSchema>;
10
10
  export type TutorialInputSignalType = z.infer<typeof tutorialInputSignalTypeSchema>;
11
11
  export type TutorialSteeringWheelButtonPressed = z.infer<typeof tutorialSteeringWheelButtonPressedSchema>;
@@ -13,10 +13,10 @@ export declare const tutorialWheelButtonListenEventSchema: z.ZodObject<{
13
13
  }, z.core.$strip>;
14
14
  export declare const tutorialCheckpointListenEventSchema: z.ZodObject<{
15
15
  on: z.ZodLiteral<"checkpoint">;
16
- checkpoint: z.ZodEnum<{
17
- checkpoint_1: "checkpoint_1";
18
- checkpoint_2: "checkpoint_2";
19
- checkpoint_3_finish: "checkpoint_3_finish";
16
+ target: z.ZodEnum<{
17
+ TRACK: "TRACK";
18
+ POWER_UP: "POWER_UP";
19
+ FINISH: "FINISH";
20
20
  }>;
21
21
  }, z.core.$strip>;
22
22
  export declare const tutorialListenEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -31,10 +31,10 @@ export declare const tutorialListenEventSchema: z.ZodDiscriminatedUnion<[z.ZodOb
31
31
  }>;
32
32
  }, z.core.$strip>, z.ZodObject<{
33
33
  on: z.ZodLiteral<"checkpoint">;
34
- checkpoint: z.ZodEnum<{
35
- checkpoint_1: "checkpoint_1";
36
- checkpoint_2: "checkpoint_2";
37
- checkpoint_3_finish: "checkpoint_3_finish";
34
+ target: z.ZodEnum<{
35
+ TRACK: "TRACK";
36
+ POWER_UP: "POWER_UP";
37
+ FINISH: "FINISH";
38
38
  }>;
39
39
  }, z.core.$strip>], "on">;
40
40
  export declare const tutorialStepConfigSchema: z.ZodObject<{
@@ -72,10 +72,10 @@ export declare const tutorialStepConfigSchema: z.ZodObject<{
72
72
  }>;
73
73
  }, z.core.$strip>, z.ZodObject<{
74
74
  on: z.ZodLiteral<"checkpoint">;
75
- checkpoint: z.ZodEnum<{
76
- checkpoint_1: "checkpoint_1";
77
- checkpoint_2: "checkpoint_2";
78
- checkpoint_3_finish: "checkpoint_3_finish";
75
+ target: z.ZodEnum<{
76
+ TRACK: "TRACK";
77
+ POWER_UP: "POWER_UP";
78
+ FINISH: "FINISH";
79
79
  }>;
80
80
  }, z.core.$strip>], "on">;
81
81
  triggerCommands: z.ZodArray<z.ZodIntersection<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
@@ -946,8 +946,8 @@ export declare const tutorialStepConfigSchema: z.ZodObject<{
946
946
  export declare const tutorialPhaseConfigSchema: z.ZodObject<{
947
947
  id: z.ZodEnum<{
948
948
  starting_point: "starting_point";
949
- checkpoint_1: "checkpoint_1";
950
- checkpoint_2: "checkpoint_2";
949
+ controls_and_hud: "controls_and_hud";
950
+ power_up: "power_up";
951
951
  lap_completion: "lap_completion";
952
952
  }>;
953
953
  name: z.ZodString;
@@ -987,10 +987,10 @@ export declare const tutorialPhaseConfigSchema: z.ZodObject<{
987
987
  }>;
988
988
  }, z.core.$strip>, z.ZodObject<{
989
989
  on: z.ZodLiteral<"checkpoint">;
990
- checkpoint: z.ZodEnum<{
991
- checkpoint_1: "checkpoint_1";
992
- checkpoint_2: "checkpoint_2";
993
- checkpoint_3_finish: "checkpoint_3_finish";
990
+ target: z.ZodEnum<{
991
+ TRACK: "TRACK";
992
+ POWER_UP: "POWER_UP";
993
+ FINISH: "FINISH";
994
994
  }>;
995
995
  }, z.core.$strip>], "on">;
996
996
  triggerCommands: z.ZodArray<z.ZodIntersection<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
@@ -1865,8 +1865,8 @@ export declare const tutorialMasterConfigSchema: z.ZodObject<{
1865
1865
  phases: z.ZodArray<z.ZodObject<{
1866
1866
  id: z.ZodEnum<{
1867
1867
  starting_point: "starting_point";
1868
- checkpoint_1: "checkpoint_1";
1869
- checkpoint_2: "checkpoint_2";
1868
+ controls_and_hud: "controls_and_hud";
1869
+ power_up: "power_up";
1870
1870
  lap_completion: "lap_completion";
1871
1871
  }>;
1872
1872
  name: z.ZodString;
@@ -1906,10 +1906,10 @@ export declare const tutorialMasterConfigSchema: z.ZodObject<{
1906
1906
  }>;
1907
1907
  }, z.core.$strip>, z.ZodObject<{
1908
1908
  on: z.ZodLiteral<"checkpoint">;
1909
- checkpoint: z.ZodEnum<{
1910
- checkpoint_1: "checkpoint_1";
1911
- checkpoint_2: "checkpoint_2";
1912
- checkpoint_3_finish: "checkpoint_3_finish";
1909
+ target: z.ZodEnum<{
1910
+ TRACK: "TRACK";
1911
+ POWER_UP: "POWER_UP";
1912
+ FINISH: "FINISH";
1913
1913
  }>;
1914
1914
  }, z.core.$strip>], "on">;
1915
1915
  triggerCommands: z.ZodArray<z.ZodIntersection<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
@@ -15,7 +15,7 @@ exports.tutorialWheelButtonListenEventSchema = zod_1.z.object({
15
15
  });
16
16
  exports.tutorialCheckpointListenEventSchema = zod_1.z.object({
17
17
  on: zod_1.z.literal(Tutorial_const_1.TUTORIAL_LISTEN_EVENT_ON.CHECKPOINT),
18
- checkpoint: Tutorial_schema_1.tutorialLogicalCheckpointSchema,
18
+ target: Tutorial_schema_1.tutorialCheckpointTargetSchema,
19
19
  });
20
20
  exports.tutorialListenEventSchema = zod_1.z.discriminatedUnion('on', [
21
21
  exports.tutorialTimeoutListenEventSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@battle-racing/br-common-lib",
3
- "version": "6.2.0-rc.3",
3
+ "version": "6.2.0-rc.5",
4
4
  "description": "Common library for all Battle Racing Repositorios",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -2,7 +2,7 @@ import {
2
2
  POWER_UP_NAME,
3
3
  ScreenTutorialHud,
4
4
  TUTORIAL_LISTEN_EVENT_ON,
5
- TUTORIAL_LOGICAL_CHECKPOINT,
5
+ TUTORIAL_CHECKPOINT_TARGET,
6
6
  TUTORIAL_PHASE_ID,
7
7
  TUTORIAL_SCREEN_STEP,
8
8
  TUTORIAL_STEERING_WHEEL_BUTTON,
@@ -95,8 +95,8 @@ export const allTutorialConfig: TutorialMasterConfig = {
95
95
  name: 'Pedal Acceleration Check',
96
96
  screenStep: TUTORIAL_SCREEN_STEP.PEDAL,
97
97
  listenEvent: {
98
- on: TUTORIAL_LISTEN_EVENT_ON.CHECKPOINT,
99
- checkpoint: TUTORIAL_LOGICAL_CHECKPOINT.CHECKPOINT_1,
98
+ on: TUTORIAL_LISTEN_EVENT_ON.TIMEOUT,
99
+ durationMs: 5000,
100
100
  },
101
101
  triggerCommands: [
102
102
  {
@@ -111,8 +111,8 @@ export const allTutorialConfig: TutorialMasterConfig = {
111
111
  ],
112
112
  },
113
113
  {
114
- id: TUTORIAL_PHASE_ID.CHECKPOINT_1,
115
- name: 'Checkpoint 1 - Controls and HUD',
114
+ id: TUTORIAL_PHASE_ID.CONTROLS_AND_HUD,
115
+ name: 'Controls and HUD',
116
116
  index: 1,
117
117
  steps: [
118
118
  {
@@ -259,7 +259,7 @@ export const allTutorialConfig: TutorialMasterConfig = {
259
259
  screenStep: TUTORIAL_SCREEN_STEP.HUD_COINS,
260
260
  listenEvent: {
261
261
  on: TUTORIAL_LISTEN_EVENT_ON.CHECKPOINT,
262
- checkpoint: TUTORIAL_LOGICAL_CHECKPOINT.CHECKPOINT_2,
262
+ target: TUTORIAL_CHECKPOINT_TARGET.POWER_UP,
263
263
  },
264
264
  triggerCommands: [
265
265
  {
@@ -275,8 +275,8 @@ export const allTutorialConfig: TutorialMasterConfig = {
275
275
  ],
276
276
  },
277
277
  {
278
- id: TUTORIAL_PHASE_ID.CHECKPOINT_2,
279
- name: 'Checkpoint 2 - Power Up Preview',
278
+ id: TUTORIAL_PHASE_ID.POWER_UP,
279
+ name: 'Power Up Preview',
280
280
  index: 2,
281
281
  steps: [
282
282
  {
@@ -343,7 +343,7 @@ export const allTutorialConfig: TutorialMasterConfig = {
343
343
  screenStep: TUTORIAL_SCREEN_STEP.POWER_UP_RETURN_TO_HUD,
344
344
  listenEvent: {
345
345
  on: TUTORIAL_LISTEN_EVENT_ON.CHECKPOINT,
346
- checkpoint: TUTORIAL_LOGICAL_CHECKPOINT.CHECKPOINT_3_FINISH,
346
+ target: TUTORIAL_CHECKPOINT_TARGET.FINISH,
347
347
  },
348
348
  triggerCommands: [
349
349
  {
@@ -32,8 +32,8 @@ export const TUTORIAL_STATUS = {
32
32
 
33
33
  export const TUTORIAL_PHASE_ID = {
34
34
  STARTING_POINT: 'starting_point',
35
- CHECKPOINT_1: 'checkpoint_1',
36
- CHECKPOINT_2: 'checkpoint_2',
35
+ CONTROLS_AND_HUD: 'controls_and_hud',
36
+ POWER_UP: 'power_up',
37
37
  LAP_COMPLETION: 'lap_completion',
38
38
  } as const;
39
39
 
@@ -49,10 +49,10 @@ export const TUTORIAL_STEERING_WHEEL_BUTTON = {
49
49
  ANY: 'any',
50
50
  } as const;
51
51
 
52
- export const TUTORIAL_LOGICAL_CHECKPOINT = {
53
- CHECKPOINT_1: 'checkpoint_1',
54
- CHECKPOINT_2: 'checkpoint_2',
55
- CHECKPOINT_3_FINISH: 'checkpoint_3_finish',
52
+ export const TUTORIAL_CHECKPOINT_TARGET = {
53
+ TRACK: 'TRACK',
54
+ POWER_UP: 'POWER_UP',
55
+ FINISH: 'FINISH',
56
56
  } as const;
57
57
 
58
58
  export const TUTORIAL_INPUT_SIGNAL_TYPE = {
@@ -3,7 +3,7 @@ import { screenTutorialHudSchema } from '../hardware/screen/ScreenTutorial.schem
3
3
  import {
4
4
  TUTORIAL_INPUT_SIGNAL_TYPE,
5
5
  TUTORIAL_LISTEN_EVENT_ON,
6
- TUTORIAL_LOGICAL_CHECKPOINT,
6
+ TUTORIAL_CHECKPOINT_TARGET,
7
7
  TUTORIAL_PHASE_ID,
8
8
  TUTORIAL_SCREEN_STEP,
9
9
  TUTORIAL_STATUS,
@@ -40,8 +40,8 @@ export const tutorialStatusSchema = z.enum([
40
40
 
41
41
  export const tutorialPhaseIdSchema = z.enum([
42
42
  TUTORIAL_PHASE_ID.STARTING_POINT,
43
- TUTORIAL_PHASE_ID.CHECKPOINT_1,
44
- TUTORIAL_PHASE_ID.CHECKPOINT_2,
43
+ TUTORIAL_PHASE_ID.CONTROLS_AND_HUD,
44
+ TUTORIAL_PHASE_ID.POWER_UP,
45
45
  TUTORIAL_PHASE_ID.LAP_COMPLETION,
46
46
  ]);
47
47
 
@@ -57,10 +57,10 @@ export const tutorialSteeringWheelButtonSchema = z.enum([
57
57
  TUTORIAL_STEERING_WHEEL_BUTTON.ANY,
58
58
  ]);
59
59
 
60
- export const tutorialLogicalCheckpointSchema = z.enum([
61
- TUTORIAL_LOGICAL_CHECKPOINT.CHECKPOINT_1,
62
- TUTORIAL_LOGICAL_CHECKPOINT.CHECKPOINT_2,
63
- TUTORIAL_LOGICAL_CHECKPOINT.CHECKPOINT_3_FINISH,
60
+ export const tutorialCheckpointTargetSchema = z.enum([
61
+ TUTORIAL_CHECKPOINT_TARGET.TRACK,
62
+ TUTORIAL_CHECKPOINT_TARGET.POWER_UP,
63
+ TUTORIAL_CHECKPOINT_TARGET.FINISH,
64
64
  ]);
65
65
 
66
66
  export const tutorialKartSnapshotSchema = z.object({
@@ -73,8 +73,9 @@ export const tutorialKartSnapshotSchema = z.object({
73
73
  revision: z.number().int().nonnegative(),
74
74
  presentationRevision: z.number().int().nonnegative(),
75
75
  hud: screenTutorialHudSchema.optional(),
76
- awaitingCheckpoint: tutorialLogicalCheckpointSchema.nullable().optional(),
77
- completedCheckpoints: z.array(tutorialLogicalCheckpointSchema).optional(),
76
+ awaitingCheckpointTarget: tutorialCheckpointTargetSchema.nullable().optional(),
77
+ latestCheckpointId: z.string().optional(),
78
+ latestCheckpointProgress: z.number().optional(),
78
79
  updatedAtISO: z.string().datetime(),
79
80
  });
80
81
 
@@ -4,7 +4,7 @@ import {
4
4
  tutorialInputSignalTypeSchema,
5
5
  tutorialKartSnapshotSchema,
6
6
  tutorialListenEventOnSchema,
7
- tutorialLogicalCheckpointSchema,
7
+ tutorialCheckpointTargetSchema,
8
8
  tutorialPhaseIdSchema,
9
9
  tutorialScreenStepSchema,
10
10
  tutorialStatusSchema,
@@ -17,7 +17,7 @@ export type TutorialStatus = z.infer<typeof tutorialStatusSchema>;
17
17
  export type TutorialPhaseId = z.infer<typeof tutorialPhaseIdSchema>;
18
18
  export type TutorialListenEventOn = z.infer<typeof tutorialListenEventOnSchema>;
19
19
  export type TutorialSteeringWheelButton = z.infer<typeof tutorialSteeringWheelButtonSchema>;
20
- export type TutorialLogicalCheckpoint = z.infer<typeof tutorialLogicalCheckpointSchema>;
20
+ export type TutorialCheckpointTarget = z.infer<typeof tutorialCheckpointTargetSchema>;
21
21
  export type TutorialKartSnapshot = z.infer<typeof tutorialKartSnapshotSchema>;
22
22
  export type TutorialInputSignalType = z.infer<typeof tutorialInputSignalTypeSchema>;
23
23
  export type TutorialSteeringWheelButtonPressed = z.infer<typeof tutorialSteeringWheelButtonPressedSchema>;
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  import { allCommandsConfigSchema } from '../command/Command.schema';
3
3
  import { TUTORIAL_LISTEN_EVENT_ON } from './Tutorial.const';
4
4
  import {
5
- tutorialLogicalCheckpointSchema,
5
+ tutorialCheckpointTargetSchema,
6
6
  tutorialPhaseIdSchema,
7
7
  tutorialScreenStepSchema,
8
8
  tutorialSteeringWheelButtonSchema,
@@ -20,7 +20,7 @@ export const tutorialWheelButtonListenEventSchema = z.object({
20
20
 
21
21
  export const tutorialCheckpointListenEventSchema = z.object({
22
22
  on: z.literal(TUTORIAL_LISTEN_EVENT_ON.CHECKPOINT),
23
- checkpoint: tutorialLogicalCheckpointSchema,
23
+ target: tutorialCheckpointTargetSchema,
24
24
  });
25
25
 
26
26
  export const tutorialListenEventSchema = z.discriminatedUnion('on', [