@cybermp-community/client-types 2.5.5 → 2.6.0

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.
@@ -160,4 +160,12 @@ declare module '../../classes.d.ts' {
160
160
  */
161
161
  OnPlayerGenderChanged(gender: CyberEnums.PlayerGender): void;
162
162
  }
163
+
164
+ /**
165
+ * Codeware helper. Builds a TweakDBID from a raw hash.
166
+ * Unchecked: the hash is not verified against TweakDB.
167
+ */
168
+ export class TDBID {
169
+ static FromNumber(hash: bigint): string;
170
+ }
163
171
  }
@@ -184,6 +184,11 @@ declare module '../game.d.ts' {
184
184
  */
185
185
  onGameLoaded(callback: () => void): void;
186
186
 
187
+ /**
188
+ * Event when the game is started. Fires only once.
189
+ */
190
+ onceGameLoaded(callback: () => void): void;
191
+
187
192
  /**
188
193
  * Event when tweaks is loaded.
189
194
  */
@@ -6,5 +6,10 @@ export type * from './game';
6
6
  export type * from './local-storage';
7
7
  export type * from './meta';
8
8
  export type * from './mp';
9
+ export type * from './commands';
10
+ export type * from './exports';
11
+ export type * from './local';
12
+ export type * from './network';
13
+ export type * from './resources';
9
14
  export type * from './voice-chat';
10
15
  export type * from './enums';
@@ -76,4 +76,10 @@ export interface MpNetwork {
76
76
  * @returns Network ID of the player.
77
77
  */
78
78
  getPlayerId(gameId: number): number;
79
+
80
+ /**
81
+ * Returns the local player's network ID without a spawned player entity.
82
+ * @returns Network ID of the local player.
83
+ */
84
+ getLocalPlayerId(): number;
79
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cybermp-community/client-types",
3
- "version": "2.5.5",
3
+ "version": "2.6.0",
4
4
  "description": "TypeScript type definitions for the CyberMP client-side environment.",
5
5
  "license": "CC BY-SA 4.0",
6
6
  "author": {
@@ -34,9 +34,9 @@
34
34
  "lint": "biome lint .",
35
35
  "check": "biome check .",
36
36
  "redscript:dumper:build": "cd dumper && cargo build --release",
37
- "dumps:generate:codeware": "./dumper/target/release/codeware-dumper.exe ./libs/codeware/scripts -r -o ./json/redscript/codeware",
38
- "dumps:generate:tweak-xl": "./dumper/target/release/codeware-dumper.exe ./libs/tweak-xl/scripts -r -o ./json/redscript/tweak-xl",
39
- "dumps:generate:archive-xl": "./dumper/target/release/codeware-dumper.exe ./libs/archive-xl/scripts -r -o ./json/redscript/archive-xl",
37
+ "dumps:generate:codeware": "./dumper/target/release/cyberlib-dumper.exe ./libs/codeware/scripts -r -o ./json/redscript/codeware",
38
+ "dumps:generate:tweak-xl": "./dumper/target/release/cyberlib-dumper.exe ./libs/tweak-xl/scripts -r -o ./json/redscript/tweak-xl",
39
+ "dumps:generate:archive-xl": "./dumper/target/release/cyberlib-dumper.exe ./libs/archive-xl/scripts -r -o ./json/redscript/archive-xl",
40
40
  "dumps:cyberpunk:download": "tsx ./scripts/download-dumps.ts",
41
41
  "dumps:generate": "rimraf ./json && bun run dumps:cyberpunk:download && bun run dumps:generate:archive-xl && bun run dumps:generate:tweak-xl && bun run dumps:generate:codeware",
42
42
  "types:apply-modified": "tsx ./scripts/apply-modified.ts",
@@ -71,3 +71,4 @@
71
71
  "typescript": "^5.3.3"
72
72
  }
73
73
  }
74
+