@battle-racing/br-common-lib 1.1.2 → 1.1.4

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.
@@ -1,5 +1,6 @@
1
1
  import type { Checkpoint } from '../checkpoint';
2
2
  import type { GameType } from '../game';
3
+ import type { GameTrackGameDefaultValues } from './GameTrackGameDefaultValues';
3
4
  import type { GameTrackKartsConfig } from './GameTrackKartsConfig';
4
5
  export interface GameTrack {
5
6
  id: string;
@@ -9,4 +10,5 @@ export interface GameTrack {
9
10
  kartsConfig: GameTrackKartsConfig;
10
11
  macAddress?: string;
11
12
  isConnected: boolean;
13
+ gameDefaultValues?: GameTrackGameDefaultValues;
12
14
  }
@@ -0,0 +1,4 @@
1
+ export interface GameTrackGameDefaultValues {
2
+ speed: number[];
3
+ powerUpIds: string[];
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,3 @@
1
1
  export * from './GameTrack';
2
+ export * from './GameTrackGameDefaultValues';
2
3
  export * from './GameTrackKartsConfig';
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./GameTrack"), exports);
18
+ __exportStar(require("./GameTrackGameDefaultValues"), exports);
18
19
  __exportStar(require("./GameTrackKartsConfig"), exports);
@@ -1,4 +1,5 @@
1
1
  import type { DamageEffectName } from '../../damage';
2
+ import type { Kart } from '../../kart';
2
3
  import type { SocketInitRaspberryInput, SocketRegisterKartCheckpointInput } from '../inputs';
3
4
  export interface SocketKartClientToServerEventsParams {
4
5
  'kart:init': SocketInitRaspberryInput;
@@ -13,4 +14,8 @@ export interface SocketKartClientToServerEventsParams {
13
14
  macAddress: string;
14
15
  damageName: DamageEffectName;
15
16
  };
17
+ 'kart:data:changed': {
18
+ macAddress: string;
19
+ kart: Kart;
20
+ };
16
21
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@battle-racing/br-common-lib",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Common library for all Battle Racing Repositorios",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "tsc",
9
- "release": "npm run build && npm publish"
9
+ "release": "npm run build && npm publish --access public"
10
10
  },
11
11
  "keywords": [
12
12
  "Battle",
@@ -1,5 +1,6 @@
1
1
  import type { Checkpoint } from '../checkpoint';
2
2
  import type { GameType } from '../game';
3
+ import type { GameTrackGameDefaultValues } from './GameTrackGameDefaultValues';
3
4
  import type { GameTrackKartsConfig } from './GameTrackKartsConfig';
4
5
 
5
6
  export interface GameTrack {
@@ -10,4 +11,5 @@ export interface GameTrack {
10
11
  kartsConfig: GameTrackKartsConfig;
11
12
  macAddress?: string;
12
13
  isConnected: boolean;
14
+ gameDefaultValues?: GameTrackGameDefaultValues;
13
15
  }
@@ -0,0 +1,4 @@
1
+ export interface GameTrackGameDefaultValues {
2
+ speed: number[];
3
+ powerUpIds: string[];
4
+ }
@@ -1,2 +1,3 @@
1
1
  export * from './GameTrack';
2
+ export * from './GameTrackGameDefaultValues';
2
3
  export * from './GameTrackKartsConfig';
@@ -1,4 +1,5 @@
1
1
  import type { DamageEffectName } from '../../damage';
2
+ import type { Kart } from '../../kart';
2
3
  import type { SocketInitRaspberryInput, SocketRegisterKartCheckpointInput } from '../inputs';
3
4
 
4
5
  export interface SocketKartClientToServerEventsParams {
@@ -8,4 +9,8 @@ export interface SocketKartClientToServerEventsParams {
8
9
  'kart:damage:sent': { macAddress: string; damageName: DamageEffectName };
9
10
  /** The Kart received damage */
10
11
  'kart:damage:received': { macAddress: string; damageName: DamageEffectName };
12
+ 'kart:data:changed': {
13
+ macAddress: string;
14
+ kart: Kart;
15
+ };
11
16
  }