@cybermp-community/client-types 2.3.6 → 2.4.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.
- package/LICENSE +14 -16
- package/{README.md.bak → README.md} +8 -3
- package/dist/bitfields.ts +179 -179
- package/dist/classes.d.ts +95907 -95898
- package/dist/enums.ts +13298 -13298
- package/dist/game.d.ts +391 -389
- package/dist/mp-classes.d.ts +4 -3
- package/dist/precomputed/cef.d.ts +4 -0
- package/dist/precomputed/{classes.d.ts → classes/extend.d.ts} +17 -27
- package/dist/precomputed/classes/index.d.ts +2 -0
- package/dist/precomputed/classes/screens.d.ts +37 -0
- package/dist/precomputed/events.d.ts +9 -7
- package/dist/precomputed/index.d.ts +1 -1
- package/dist/precomputed/mp.d.ts +1 -1
- package/package.json +14 -8
package/dist/mp-classes.d.ts
CHANGED
|
@@ -15869,8 +15869,6 @@ export interface MpClasses {
|
|
|
15869
15869
|
ResRef: typeof C.ResRef;
|
|
15870
15870
|
ResAsyncRef: typeof C.ResAsyncRef;
|
|
15871
15871
|
ResourceToken: typeof C.ResourceToken;
|
|
15872
|
-
SoundBankEntry: typeof C.SoundBankEntry;
|
|
15873
|
-
SoundBanksJson: typeof C.SoundBanksJson;
|
|
15874
15872
|
ResetSecuritySystemNetwork: typeof C.ResetSecuritySystemNetwork;
|
|
15875
15873
|
EntityBuilderWrapper: typeof C.EntityBuilderWrapper;
|
|
15876
15874
|
EntityBuilderTemplateWrapper: typeof C.EntityBuilderTemplateWrapper;
|
|
@@ -15892,7 +15890,6 @@ export interface MpClasses {
|
|
|
15892
15890
|
Reflection: typeof C.Reflection;
|
|
15893
15891
|
ReflectionClass: typeof C.ReflectionClass;
|
|
15894
15892
|
ReflectionEnum: typeof C.ReflectionEnum;
|
|
15895
|
-
ReflectionBitfield: typeof C.ReflectionBitfield;
|
|
15896
15893
|
ReflectionConst: typeof C.ReflectionConst;
|
|
15897
15894
|
ReflectionFunc: typeof C.ReflectionFunc;
|
|
15898
15895
|
ReflectionMemberFunc: typeof C.ReflectionMemberFunc;
|
|
@@ -15957,4 +15954,8 @@ export interface MpClasses {
|
|
|
15957
15954
|
StaticEntitySpec: typeof C.StaticEntitySpec;
|
|
15958
15955
|
StaticEntitySystem: C.StaticEntitySystem;
|
|
15959
15956
|
WorldNodeSetupWrapper: typeof C.WorldNodeSetupWrapper;
|
|
15957
|
+
ScriptableTweak: typeof C.ScriptableTweak;
|
|
15958
|
+
TweakDBBatch: typeof C.TweakDBBatch;
|
|
15959
|
+
TweakDBManager: typeof C.TweakDBManager;
|
|
15960
|
+
TweakXL: typeof C.TweakXL;
|
|
15960
15961
|
}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import type { UnwrapClass } from '
|
|
3
|
-
import type { MpClasses } from '
|
|
4
|
-
import * as CyberEnums from '
|
|
2
|
+
import type { UnwrapClass } from '../../game.d.ts';
|
|
3
|
+
import type { MpClasses } from '../../mp-classes.d.ts';
|
|
4
|
+
import * as CyberEnums from '../../enums';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
GetLoadingScreenState(): CyberEnums.ELoadingScreenState;
|
|
8
|
-
GetLoadingScreenProgress(): number;
|
|
9
|
-
OnLoadingScreenStateChange(newState: CyberEnums.ELoadingScreenState): void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module '../classes.d.ts' {
|
|
6
|
+
declare module '../../classes.d.ts' {
|
|
13
7
|
export interface entEntity {
|
|
14
8
|
GetMorphTargets(): entMorphTargetWeightEntry[];
|
|
15
9
|
}
|
|
@@ -62,10 +56,6 @@ declare module '../classes.d.ts' {
|
|
|
62
56
|
export function GetHash(value: any): bigint;
|
|
63
57
|
}
|
|
64
58
|
|
|
65
|
-
export namespace ScriptGameInstance {
|
|
66
|
-
export function GetLoadingScreenSystem(): LoadingScreenSystem;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
59
|
export interface inkISystemRequestsHandler {
|
|
70
60
|
StartMainMenu(): void;
|
|
71
61
|
}
|
|
@@ -83,29 +73,29 @@ declare module '../classes.d.ts' {
|
|
|
83
73
|
GetGender(): CyberEnums.RedscriptPlayerGender;
|
|
84
74
|
}
|
|
85
75
|
|
|
76
|
+
export interface entEntity {
|
|
77
|
+
GetMorphWeights(): entMorphTargetWeightEntry[];
|
|
78
|
+
ReassembleWithComponents(arr: entIComponent[]): void;
|
|
79
|
+
TeleportPed(position: Vector3, rotation?: EulerAngles): void;
|
|
80
|
+
}
|
|
81
|
+
|
|
86
82
|
export interface AimingStateDecisions {
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
OnItemEquipped(slot: CyberEnums.AttachmentSlots, item: gameItemID): void;
|
|
84
|
+
OnItemUnequipped(slot: CyberEnums.AttachmentSlots, item: gameItemID): void;
|
|
89
85
|
}
|
|
90
86
|
|
|
91
87
|
export interface AimingStateEvents {
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
OnItemEquipped(slot: CyberEnums.AttachmentSlots, item: gameItemID): void;
|
|
89
|
+
OnItemUnequipped(slot: CyberEnums.AttachmentSlots, item: gameItemID): void;
|
|
94
90
|
}
|
|
95
|
-
|
|
91
|
+
|
|
96
92
|
export interface ApplyStatGroupEffectorCallback {
|
|
97
|
-
|
|
98
|
-
|
|
93
|
+
OnItemEquipped(slot: CyberEnums.AttachmentSlots, item: gameItemID): void;
|
|
94
|
+
OnItemUnequipped(slot: CyberEnums.AttachmentSlots, item: gameItemID): void;
|
|
99
95
|
}
|
|
100
96
|
|
|
101
97
|
export interface gameuiICharacterCustomizationSystem {
|
|
102
98
|
SetPlayerGender(gender: CyberEnums.PlayerGender, savedPos?: boolean): void;
|
|
103
99
|
OnPlayerGenderChanged(gender: CyberEnums.PlayerGender): void;
|
|
104
100
|
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
declare module '../mp-classes.d.ts' {
|
|
108
|
-
export interface MpClasses {
|
|
109
|
-
LoadingScreenSystem: typeof LoadingScreenSystem;
|
|
110
|
-
}
|
|
111
101
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { MpClasses } from '../../mp-classes.d.ts';
|
|
2
|
+
import type * as CyberEnums from '../../enums';
|
|
3
|
+
|
|
4
|
+
export class LoadingScreenSystem {
|
|
5
|
+
GetLoadingScreenState(): CyberEnums.ELoadingScreenState;
|
|
6
|
+
GetLoadingScreenProgress(): number;
|
|
7
|
+
OnLoadingScreenStateChange(newState: CyberEnums.ELoadingScreenState): void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class MultiplayerSystem {
|
|
11
|
+
/**
|
|
12
|
+
* Removes game object classes (e.g., T extends gameObject, playerPuppet, NpcPuppet) from the map.
|
|
13
|
+
* @param objectClassMap Array of class names to delete.
|
|
14
|
+
*/
|
|
15
|
+
DeclareDeletedObjects(objectClassMap: Array<keyof MpClasses>): void;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Removes game objects by their unique hashes from the map.
|
|
19
|
+
* @param objectHashMap Array of unique game object hashes to delete.
|
|
20
|
+
*/
|
|
21
|
+
DeletedObjectsByUniqueHash(objectHashMap: string[]): void;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Enables or disables synchronization of default effects, as defined by the CyberMP platform.
|
|
25
|
+
* @param value Whether to use the default effects.
|
|
26
|
+
*/
|
|
27
|
+
UseDefaultEffectsByPlatform(value: boolean): void;
|
|
28
|
+
|
|
29
|
+
SetDefaultSpawnPosition(position: Vector3, yaw: number): void;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare module '../../mp-classes.d.ts' {
|
|
33
|
+
export interface MpClasses {
|
|
34
|
+
LoadingScreenSystem: typeof LoadingScreenSystem;
|
|
35
|
+
MultiplayerSystem: typeof MultiplayerSystem;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
+
type Args = any[];
|
|
2
|
+
|
|
1
3
|
export interface MpEvents {
|
|
2
4
|
/**
|
|
3
5
|
* Register a custom event listener.
|
|
4
6
|
* @param eventName Name of the event.
|
|
5
7
|
* @param callback Callback function.
|
|
6
8
|
*/
|
|
7
|
-
on(eventName: string, callback: (...args:
|
|
9
|
+
on<T extends Array = Args>(eventName: string, callback: (...args: T) => void): void;
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* UnRegister a custom event listener.
|
|
11
13
|
* @param eventName Name of the event.
|
|
12
14
|
* @param callback Callback function.
|
|
13
15
|
*/
|
|
14
|
-
off(eventName: string, callback: (...args:
|
|
16
|
+
off<T extends Array = Args>(eventName: string, callback: (...args: T) => void): void;
|
|
15
17
|
|
|
16
18
|
/**
|
|
17
19
|
* Emit a previously registered custom event.
|
|
@@ -19,29 +21,29 @@ export interface MpEvents {
|
|
|
19
21
|
* @param eventName Name of the event.
|
|
20
22
|
* @param args Arguments to pass.
|
|
21
23
|
*/
|
|
22
|
-
emit(eventName: string, ...args:
|
|
24
|
+
emit<T extends Array = Args>(eventName: string, ...args: T): void;
|
|
23
25
|
|
|
24
26
|
/**
|
|
25
27
|
* Register a listener for server event on client.
|
|
26
28
|
*/
|
|
27
|
-
onServer(eventName: string, callback: (...args:
|
|
29
|
+
onServer<T extends Array = Args>(eventName: string, callback: (...args: T) => void): void;
|
|
28
30
|
|
|
29
31
|
/**
|
|
30
32
|
* Emit an event to the server.
|
|
31
33
|
*/
|
|
32
|
-
emitServer(eventName: string, ...args:
|
|
34
|
+
emitServer<T extends Array = Args>(eventName: string, ...args: T): void;
|
|
33
35
|
|
|
34
36
|
/**
|
|
35
37
|
* Emit an event to the cef.
|
|
36
38
|
*/
|
|
37
|
-
emitCef(eventName: string, ...args:
|
|
39
|
+
emitCef<T extends Array = Args>(eventName: string, ...args: T): void;
|
|
38
40
|
|
|
39
41
|
/**
|
|
40
42
|
* Register a custom cef event listener.
|
|
41
43
|
* @param eventName Name of the event.
|
|
42
44
|
* @param callback Callback function.
|
|
43
45
|
*/
|
|
44
|
-
onCef(eventName: string, callback: (...args:
|
|
46
|
+
onCef<T extends Array = Args>(eventName: string, callback: (...args: T) => void): void;
|
|
45
47
|
|
|
46
48
|
/**
|
|
47
49
|
* Register a command in the client scope.
|
package/dist/precomputed/mp.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cybermp-community/client-types",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "TypeScript type definitions for the CyberMP client-side environment.",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "CC BY-SA 4.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "An1by",
|
|
8
8
|
"url": "https://gitlab.com/an1by"
|
|
@@ -30,12 +30,15 @@
|
|
|
30
30
|
"dist"
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
|
-
"
|
|
33
|
+
"format": "biome format --write .",
|
|
34
|
+
"lint": "biome lint .",
|
|
35
|
+
"check": "biome check .",
|
|
36
|
+
"redscript:dumper:build": "cd dumper && cargo build --release",
|
|
34
37
|
"dumps:generate:codeware": "./dumper/target/release/codeware-dumper.exe ./libs/codeware/scripts -r -o ./json/redscript/codeware",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
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
40
|
"dumps:cyberpunk:download": "tsx ./scripts/download-dumps.ts",
|
|
38
|
-
"dumps:generate": "rimraf ./json && bun run dumps:cyberpunk:download && bun run
|
|
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",
|
|
39
42
|
"types:apply-modified": "tsx ./scripts/apply-modified.ts",
|
|
40
43
|
"types:generate": "tsx ./src",
|
|
41
44
|
"generate": "bun run dumps:generate && bun run types:apply-modified && bun run types:generate",
|
|
@@ -51,10 +54,13 @@
|
|
|
51
54
|
"redscript",
|
|
52
55
|
"codeware",
|
|
53
56
|
"mp",
|
|
54
|
-
"types"
|
|
57
|
+
"types",
|
|
58
|
+
"archivexl",
|
|
59
|
+
"tweakxl"
|
|
55
60
|
],
|
|
56
61
|
"devDependencies": {
|
|
57
|
-
"@
|
|
62
|
+
"@biomejs/biome": "^2.0.0",
|
|
63
|
+
"@types/node": "^25.6.0",
|
|
58
64
|
"consola": "^3.2.3",
|
|
59
65
|
"fs-extra": "^11.3.4",
|
|
60
66
|
"rimraf": "^5.0.5",
|