@nativewrappers/redm 0.0.121 → 0.0.123
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/Task.js +2 -1
- package/common/decors/ConVar.d.ts +14 -0
- package/common/decors/ConVar.js +70 -0
- package/common/decors/Events.d.ts +29 -28
- package/common/decors/Events.js +76 -121
- package/common/decors/Exports.d.ts +1 -0
- package/common/decors/Exports.js +53 -0
- package/common/decors/Permissions.d.ts +3 -0
- package/common/decors/Permissions.js +49 -0
- package/common/decors/Resources.d.ts +8 -0
- package/common/decors/Resources.js +83 -0
- package/common/decors/Ticks.d.ts +9 -0
- package/common/decors/Ticks.js +32 -0
- package/common-game/CommonGameConstants.d.ts +7 -0
- package/common-game/CommonGameConstants.js +24 -0
- package/common-game/CommonModel.d.ts +99 -0
- package/common-game/CommonModel.js +172 -0
- package/common-game/CommonTasks.d.ts +44 -0
- package/common-game/CommonTasks.js +233 -0
- package/common-game/cfx/StateBagChangeHandler.d.ts +1 -0
- package/common-game/cfx/StateBagChangeHandler.js +0 -0
- package/common-game/cfx/cfx.d.ts +6 -0
- package/common-game/cfx/cfx.js +4 -0
- package/common-game/definitions/index.d.js +0 -0
- package/common-game/definitions/redm.d.js +0 -0
- package/common-game/entities/CommonBaseEntity.d.ts +116 -0
- package/common-game/entities/CommonBaseEntity.js +266 -0
- package/common-game/entities/CommonBaseEntityBone.d.ts +11 -0
- package/common-game/entities/CommonBaseEntityBone.js +32 -0
- package/common-game/entities/CommonBaseEntityBoneCollection.d.ts +9 -0
- package/common-game/entities/CommonBaseEntityBoneCollection.js +17 -0
- package/common-game/entities/CommonEntityBone.d.ts +5 -0
- package/common-game/entities/CommonEntityBone.js +14 -0
- package/common-game/entities/CommonEntityBoneCollection.d.ts +9 -0
- package/common-game/entities/CommonEntityBoneCollection.js +24 -0
- package/common-game/entities/CommonEntityType.d.ts +4 -0
- package/common-game/entities/CommonEntityType.js +0 -0
- package/common-game/entities/CommonPed.d.ts +16 -0
- package/common-game/entities/CommonPed.js +52 -0
- package/common-game/entities/CommonPedBone.d.ts +6 -0
- package/common-game/entities/CommonPedBone.js +17 -0
- package/common-game/entities/CommonPedBoneCollection.d.ts +10 -0
- package/common-game/entities/CommonPedBoneCollection.js +31 -0
- package/common-game/entities/CommonPlayer.d.ts +61 -0
- package/common-game/entities/CommonPlayer.js +156 -0
- package/common-game/entities/CommonProp.d.ts +15 -0
- package/common-game/entities/CommonProp.js +43 -0
- package/common-game/entities/CommonVehicle.d.ts +11 -0
- package/common-game/entities/CommonVehicle.js +36 -0
- package/common-game/entities/GetEntityClassIdFromHandle.d.ts +2 -0
- package/common-game/entities/GetEntityClassIdFromHandle.js +23 -0
- package/common-game/entities/IHandle.d.ts +6 -0
- package/common-game/entities/IHandle.js +20 -0
- package/common-game/enums/VehicleSeat.d.ts +13 -0
- package/common-game/enums/VehicleSeat.js +17 -0
- package/common-game/interfaces/Dimension.d.ts +5 -0
- package/common-game/interfaces/Dimension.js +0 -0
- package/common-game/utils/Animations.d.ts +19 -0
- package/common-game/utils/Animations.js +43 -0
- package/entities/BaseEntity.d.ts +2 -70
- package/entities/BaseEntity.js +2 -95
- package/entities/Entity.d.ts +4 -0
- package/entities/Entity.js +3 -0
- package/entities/Ped.d.ts +6 -1
- package/entities/Ped.js +11 -5
- package/entities/Prop.d.ts +5 -0
- package/entities/Prop.js +9 -0
- package/entities/Vehicle.d.ts +4 -2
- package/entities/Vehicle.js +5 -1
- package/index.d.ts +30 -1
- package/index.js +30 -1
- package/package.json +1 -1
package/entities/Entity.js
CHANGED
|
@@ -3,10 +3,13 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
|
|
|
3
3
|
import { _N } from "../utils/Native";
|
|
4
4
|
import { EntityType, ForceType } from "../enums/Entity";
|
|
5
5
|
import { BaseEntity } from "./BaseEntity";
|
|
6
|
+
import { ClassTypes } from "../common/utils/ClassTypes";
|
|
6
7
|
class Entity extends BaseEntity {
|
|
7
8
|
static {
|
|
8
9
|
__name(this, "Entity");
|
|
9
10
|
}
|
|
11
|
+
type = ClassTypes.Entity;
|
|
12
|
+
bones;
|
|
10
13
|
// NOTE: There is nothing stopping you from using creating an invalid entity, you should do your own due-diligence
|
|
11
14
|
constructor(handle) {
|
|
12
15
|
super(handle);
|
package/entities/Ped.d.ts
CHANGED
|
@@ -10,7 +10,11 @@ import type { VehicleSeat } from "../enums/VehicleSeat";
|
|
|
10
10
|
import { BaseEntity } from "./BaseEntity";
|
|
11
11
|
import { Player } from "./Player";
|
|
12
12
|
import { Vehicle } from "./Vehicle";
|
|
13
|
+
import { ClassTypes } from "../common/utils/ClassTypes";
|
|
14
|
+
import { CommonPedBoneCollection } from "../common-game/entities/CommonPedBoneCollection";
|
|
13
15
|
export declare class Ped extends BaseEntity {
|
|
16
|
+
protected type: ClassTypes;
|
|
17
|
+
protected bones?: CommonPedBoneCollection | undefined;
|
|
14
18
|
private attributes;
|
|
15
19
|
private tasks;
|
|
16
20
|
/**
|
|
@@ -45,6 +49,7 @@ export declare class Ped extends BaseEntity {
|
|
|
45
49
|
*/
|
|
46
50
|
static removeScenarioBlock(scenarioId: number): void;
|
|
47
51
|
get Tasks(): Tasks;
|
|
52
|
+
get Bones(): CommonPedBoneCollection;
|
|
48
53
|
/**
|
|
49
54
|
* While this increases the peds max health, if used on a player it wont increase the max core value on the hud
|
|
50
55
|
*/
|
|
@@ -84,7 +89,7 @@ export declare class Ped extends BaseEntity {
|
|
|
84
89
|
/**
|
|
85
90
|
* returns the owner of the current animal
|
|
86
91
|
*/
|
|
87
|
-
get
|
|
92
|
+
get AnimalOwner(): Ped | null;
|
|
88
93
|
get TamingState(): TamingState;
|
|
89
94
|
get IsInteractingWithAnimal(): boolean;
|
|
90
95
|
get IsSittingInAnyVehicle(): boolean;
|
package/entities/Ped.js
CHANGED
|
@@ -9,10 +9,15 @@ import { Attributes } from "../Attribute";
|
|
|
9
9
|
import { BaseEntity } from "./BaseEntity";
|
|
10
10
|
import { Player } from "./Player";
|
|
11
11
|
import { Vehicle } from "./Vehicle";
|
|
12
|
+
import { CommonPed } from "../common-game/entities/CommonPed";
|
|
13
|
+
import { ClassTypes } from "../common/utils/ClassTypes";
|
|
14
|
+
import { CommonPedBoneCollection } from "../common-game/entities/CommonPedBoneCollection";
|
|
12
15
|
class Ped extends BaseEntity {
|
|
13
16
|
static {
|
|
14
17
|
__name(this, "Ped");
|
|
15
18
|
}
|
|
19
|
+
type = ClassTypes.Ped;
|
|
20
|
+
bones;
|
|
16
21
|
attributes;
|
|
17
22
|
tasks;
|
|
18
23
|
/**
|
|
@@ -61,10 +66,7 @@ class Ped extends BaseEntity {
|
|
|
61
66
|
return veh;
|
|
62
67
|
}
|
|
63
68
|
const horse = this.Mount;
|
|
64
|
-
|
|
65
|
-
return horse;
|
|
66
|
-
}
|
|
67
|
-
return null;
|
|
69
|
+
return horse;
|
|
68
70
|
}
|
|
69
71
|
/**
|
|
70
72
|
* Blocks scenarios inbetween the specified vectors
|
|
@@ -100,6 +102,10 @@ class Ped extends BaseEntity {
|
|
|
100
102
|
this.tasks = new Tasks(this);
|
|
101
103
|
return this.tasks;
|
|
102
104
|
}
|
|
105
|
+
get Bones() {
|
|
106
|
+
this.bones = this.bones ?? new CommonPedBoneCollection(this);
|
|
107
|
+
return this.bones;
|
|
108
|
+
}
|
|
103
109
|
/**
|
|
104
110
|
* While this increases the peds max health, if used on a player it wont increase the max core value on the hud
|
|
105
111
|
*/
|
|
@@ -178,7 +184,7 @@ class Ped extends BaseEntity {
|
|
|
178
184
|
/**
|
|
179
185
|
* returns the owner of the current animal
|
|
180
186
|
*/
|
|
181
|
-
get
|
|
187
|
+
get AnimalOwner() {
|
|
182
188
|
const pedId = _N("0xF103823FFE72BB49", this.handle, Citizen.resultAsInteger());
|
|
183
189
|
return Ped.fromHandle(pedId);
|
|
184
190
|
}
|
package/entities/Prop.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { ClassTypes } from "../common/utils/ClassTypes";
|
|
1
2
|
import { BaseEntity } from "./BaseEntity";
|
|
3
|
+
import { CommonEntityBoneCollection } from "../common-game/entities/CommonEntityBoneCollection";
|
|
2
4
|
export declare class Prop extends BaseEntity {
|
|
5
|
+
protected type: ClassTypes;
|
|
6
|
+
protected bones?: CommonEntityBoneCollection | undefined;
|
|
7
|
+
get Bones(): CommonEntityBoneCollection;
|
|
3
8
|
}
|
package/entities/Prop.js
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { CommonBaseEntityBoneCollection } from "../common-game/entities/CommonBaseEntityBoneCollection";
|
|
4
|
+
import { ClassTypes } from "../common/utils/ClassTypes";
|
|
3
5
|
import { BaseEntity } from "./BaseEntity";
|
|
6
|
+
import { CommonEntityBoneCollection } from "../common-game/entities/CommonEntityBoneCollection";
|
|
4
7
|
class Prop extends BaseEntity {
|
|
5
8
|
static {
|
|
6
9
|
__name(this, "Prop");
|
|
7
10
|
}
|
|
11
|
+
type = ClassTypes.Prop;
|
|
12
|
+
bones;
|
|
13
|
+
get Bones() {
|
|
14
|
+
this.bones = this.bones ?? new CommonEntityBoneCollection(this);
|
|
15
|
+
return this.bones;
|
|
16
|
+
}
|
|
8
17
|
}
|
|
9
18
|
export {
|
|
10
19
|
Prop
|
package/entities/Vehicle.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { VehicleSeat } from "../enums/VehicleSeat";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { ClassTypes } from "../common/utils/ClassTypes";
|
|
3
|
+
import { CommonVehicle } from "../common-game/entities/CommonVehicle";
|
|
4
|
+
export declare class Vehicle extends CommonVehicle {
|
|
5
|
+
protected type: ClassTypes;
|
|
4
6
|
constructor(handle: number);
|
|
5
7
|
/**
|
|
6
8
|
* Gets the entity from the handle given, if the entity doesn't exist it will return
|
package/entities/Vehicle.js
CHANGED
|
@@ -2,10 +2,14 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
3
|
import { _N } from "../utils/Native";
|
|
4
4
|
import { BaseEntity } from "./BaseEntity";
|
|
5
|
-
|
|
5
|
+
import { ClassTypes } from "../common/utils/ClassTypes";
|
|
6
|
+
import { CommonEntityBoneCollection } from "../common-game/entities/CommonEntityBoneCollection";
|
|
7
|
+
import { CommonVehicle } from "../common-game/entities/CommonVehicle";
|
|
8
|
+
class Vehicle extends CommonVehicle {
|
|
6
9
|
static {
|
|
7
10
|
__name(this, "Vehicle");
|
|
8
11
|
}
|
|
12
|
+
type = ClassTypes.Vehicle;
|
|
9
13
|
constructor(handle) {
|
|
10
14
|
super(handle);
|
|
11
15
|
}
|
package/index.d.ts
CHANGED
|
@@ -47,6 +47,30 @@ export * from "./entities/Vehicle";
|
|
|
47
47
|
export * from "./definitions/Citizen.d";
|
|
48
48
|
export * from "./definitions/index.d";
|
|
49
49
|
export * from "./definitions/redm.d";
|
|
50
|
+
export * from "./common-game/CommonGameConstants";
|
|
51
|
+
export * from "./common-game/CommonModel";
|
|
52
|
+
export * from "./common-game/CommonTasks";
|
|
53
|
+
export * from "./common-game/utils/Animations";
|
|
54
|
+
export * from "./common-game/interfaces/Dimension";
|
|
55
|
+
export * from "./common-game/enums/VehicleSeat";
|
|
56
|
+
export * from "./common-game/entities/CommonBaseEntity";
|
|
57
|
+
export * from "./common-game/entities/CommonBaseEntityBone";
|
|
58
|
+
export * from "./common-game/entities/CommonBaseEntityBoneCollection";
|
|
59
|
+
export * from "./common-game/entities/CommonEntityBone";
|
|
60
|
+
export * from "./common-game/entities/CommonEntityBoneCollection";
|
|
61
|
+
export * from "./common-game/entities/CommonEntityType";
|
|
62
|
+
export * from "./common-game/entities/CommonPed";
|
|
63
|
+
export * from "./common-game/entities/CommonPedBone";
|
|
64
|
+
export * from "./common-game/entities/CommonPedBoneCollection";
|
|
65
|
+
export * from "./common-game/entities/CommonPlayer";
|
|
66
|
+
export * from "./common-game/entities/CommonProp";
|
|
67
|
+
export * from "./common-game/entities/CommonVehicle";
|
|
68
|
+
export * from "./common-game/entities/GetEntityClassIdFromHandle";
|
|
69
|
+
export * from "./common-game/entities/IHandle";
|
|
70
|
+
export * from "./common-game/definitions/index.d";
|
|
71
|
+
export * from "./common-game/definitions/redm.d";
|
|
72
|
+
export * from "./common-game/cfx/StateBagChangeHandler";
|
|
73
|
+
export * from "./common-game/cfx/cfx";
|
|
50
74
|
export * from "./common/Command";
|
|
51
75
|
export * from "./common/Convar";
|
|
52
76
|
export * from "./common/GlobalData";
|
|
@@ -67,4 +91,9 @@ export * from "./common/utils/getStringFromUInt8Array";
|
|
|
67
91
|
export * from "./common/utils/getUInt32FromUint8Array";
|
|
68
92
|
export * from "./common/utils/randomInt";
|
|
69
93
|
export * from "./common/net/NetworkedMap";
|
|
70
|
-
export * from "./common/decors/
|
|
94
|
+
export * from "./common/decors/ConVar";
|
|
95
|
+
export * from "./common/decors/Events";
|
|
96
|
+
export * from "./common/decors/Exports";
|
|
97
|
+
export * from "./common/decors/Permissions";
|
|
98
|
+
export * from "./common/decors/Resources";
|
|
99
|
+
export * from "./common/decors/Ticks";
|
package/index.js
CHANGED
|
@@ -47,6 +47,30 @@ export * from "./entities/Vehicle";
|
|
|
47
47
|
export * from "./definitions/Citizen.d";
|
|
48
48
|
export * from "./definitions/index.d";
|
|
49
49
|
export * from "./definitions/redm.d";
|
|
50
|
+
export * from "./common-game/CommonGameConstants";
|
|
51
|
+
export * from "./common-game/CommonModel";
|
|
52
|
+
export * from "./common-game/CommonTasks";
|
|
53
|
+
export * from "./common-game/utils/Animations";
|
|
54
|
+
export * from "./common-game/interfaces/Dimension";
|
|
55
|
+
export * from "./common-game/enums/VehicleSeat";
|
|
56
|
+
export * from "./common-game/entities/CommonBaseEntity";
|
|
57
|
+
export * from "./common-game/entities/CommonBaseEntityBone";
|
|
58
|
+
export * from "./common-game/entities/CommonBaseEntityBoneCollection";
|
|
59
|
+
export * from "./common-game/entities/CommonEntityBone";
|
|
60
|
+
export * from "./common-game/entities/CommonEntityBoneCollection";
|
|
61
|
+
export * from "./common-game/entities/CommonEntityType";
|
|
62
|
+
export * from "./common-game/entities/CommonPed";
|
|
63
|
+
export * from "./common-game/entities/CommonPedBone";
|
|
64
|
+
export * from "./common-game/entities/CommonPedBoneCollection";
|
|
65
|
+
export * from "./common-game/entities/CommonPlayer";
|
|
66
|
+
export * from "./common-game/entities/CommonProp";
|
|
67
|
+
export * from "./common-game/entities/CommonVehicle";
|
|
68
|
+
export * from "./common-game/entities/GetEntityClassIdFromHandle";
|
|
69
|
+
export * from "./common-game/entities/IHandle";
|
|
70
|
+
export * from "./common-game/definitions/index.d";
|
|
71
|
+
export * from "./common-game/definitions/redm.d";
|
|
72
|
+
export * from "./common-game/cfx/StateBagChangeHandler";
|
|
73
|
+
export * from "./common-game/cfx/cfx";
|
|
50
74
|
export * from "./common/Command";
|
|
51
75
|
export * from "./common/Convar";
|
|
52
76
|
export * from "./common/GlobalData";
|
|
@@ -67,4 +91,9 @@ export * from "./common/utils/getStringFromUInt8Array";
|
|
|
67
91
|
export * from "./common/utils/getUInt32FromUint8Array";
|
|
68
92
|
export * from "./common/utils/randomInt";
|
|
69
93
|
export * from "./common/net/NetworkedMap";
|
|
70
|
-
export * from "./common/decors/
|
|
94
|
+
export * from "./common/decors/ConVar";
|
|
95
|
+
export * from "./common/decors/Events";
|
|
96
|
+
export * from "./common/decors/Exports";
|
|
97
|
+
export * from "./common/decors/Permissions";
|
|
98
|
+
export * from "./common/decors/Resources";
|
|
99
|
+
export * from "./common/decors/Ticks";
|