@battle-racing/br-common-lib 1.5.0 → 1.5.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.
@@ -13,7 +13,7 @@ export interface Kart {
13
13
  /** kartGuid assigned by Game Track (multiple karts could have the same Id) */
14
14
  id: number;
15
15
  mac: string;
16
- hostName: string;
16
+ hostname: string;
17
17
  isConnected: boolean;
18
18
  status: KartStatus;
19
19
  shield: KartShield;
@@ -1,4 +1,4 @@
1
1
  export type SocketInitRaspberryInput = {
2
2
  macAddress: string;
3
- hostName: string;
3
+ hostname: string;
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import type { Game, GameType } from '../../game';
2
2
  import type { GameTrack } from '../../gameTrack';
3
- import type { Kart } from '../../kart';
3
+ import type { Kart, KartStatus } from '../../kart';
4
4
  import type { Response } from '../../response';
5
5
  import type { SocketPowerUpEventsParams } from '../SocketPowerUpEventsParams';
6
6
  interface BaseGameEventParams {
@@ -23,6 +23,10 @@ export interface SocketKartEventsParams {
23
23
  'kart:gameTrack:emergency:started': undefined;
24
24
  /** When the physical button of the game track is released */
25
25
  'kart:gameTrack:emergency:stopped': undefined;
26
+ /** Force kart to change status */
27
+ 'kart:status:change': {
28
+ status: KartStatus;
29
+ };
26
30
  }
27
31
  export interface SocketGameEventParams {
28
32
  /** Kart is selected for a game */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@battle-racing/br-common-lib",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Common library for all Battle Racing Repositorios",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -15,7 +15,7 @@ export interface Kart {
15
15
  /** kartGuid assigned by Game Track (multiple karts could have the same Id) */
16
16
  id: number;
17
17
  mac: string;
18
- hostName: string;
18
+ hostname: string;
19
19
  isConnected: boolean;
20
20
  status: KartStatus;
21
21
  shield: KartShield;
@@ -1,4 +1,4 @@
1
1
  export type SocketInitRaspberryInput = {
2
2
  macAddress: string;
3
- hostName: string;
3
+ hostname: string;
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import type { Game, GameType } from '../../game';
2
2
  import type { GameTrack } from '../../gameTrack';
3
- import type { Kart } from '../../kart';
3
+ import type { Kart, KartStatus } from '../../kart';
4
4
  import type { Response } from '../../response';
5
5
  import type { SocketPowerUpEventsParams } from '../SocketPowerUpEventsParams';
6
6
 
@@ -24,6 +24,8 @@ export interface SocketKartEventsParams {
24
24
  'kart:gameTrack:emergency:started': undefined;
25
25
  /** When the physical button of the game track is released */
26
26
  'kart:gameTrack:emergency:stopped': undefined;
27
+ /** Force kart to change status */
28
+ 'kart:status:change': { status: KartStatus };
27
29
  }
28
30
 
29
31
  export interface SocketGameEventParams {