@nativewrappers/redm 0.0.115 → 0.0.117
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 +0 -65
- package/common/GlobalData.d.ts +2 -0
- package/common/GlobalData.js +2 -0
- package/common/decors/Events.d.ts +11 -0
- package/common/decors/Events.js +2 -0
- package/package.json +1 -1
package/Task.js
CHANGED
|
@@ -112,33 +112,6 @@ class Tasks {
|
|
|
112
112
|
);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
// public followPointRoute(points: Vector3[]): void {
|
|
116
|
-
// TaskFlushRoute();
|
|
117
|
-
//
|
|
118
|
-
// points.forEach((point) => TaskExtendRoute(point.x, point.y, point.z));
|
|
119
|
-
//
|
|
120
|
-
// TaskFollowPointRoute(this.ped.Handle, 1, 0);
|
|
121
|
-
// }
|
|
122
|
-
// public followToOffsetFromEntity(
|
|
123
|
-
// target: BaseEntity,
|
|
124
|
-
// offset: Vector3,
|
|
125
|
-
// timeout: number,
|
|
126
|
-
// stoppingRange: number,
|
|
127
|
-
// movementSpeed = 1,
|
|
128
|
-
// persistFollowing = true,
|
|
129
|
-
// ): void {
|
|
130
|
-
// TaskFollowToOffsetOfEntity(
|
|
131
|
-
// this.ped.Handle,
|
|
132
|
-
// target.Handle,
|
|
133
|
-
// offset.x,
|
|
134
|
-
// offset.y,
|
|
135
|
-
// offset.z,
|
|
136
|
-
// movementSpeed,
|
|
137
|
-
// timeout,
|
|
138
|
-
// stoppingRange,
|
|
139
|
-
// persistFollowing,
|
|
140
|
-
// );
|
|
141
|
-
// }
|
|
142
115
|
goTo(position, ignorePaths = false, timeout = -1, speed = 1, targetHeading = 0, distanceToSlide = 0, flags = 0) {
|
|
143
116
|
if (ignorePaths) {
|
|
144
117
|
TaskGoStraightToCoord(
|
|
@@ -185,16 +158,6 @@ class Tasks {
|
|
|
185
158
|
TaskLookAtCoord(this.ped.Handle, targetOrPosition.x, targetOrPosition.y, targetOrPosition.z, duration, 0, 51, 0);
|
|
186
159
|
}
|
|
187
160
|
}
|
|
188
|
-
// public performSequence(sequence: TaskSequence): void {
|
|
189
|
-
// if (!sequence.IsClosed) {
|
|
190
|
-
// sequence.close();
|
|
191
|
-
// }
|
|
192
|
-
//
|
|
193
|
-
// this.clearAll();
|
|
194
|
-
// // this.ped.BlockPermanentEvents = true;
|
|
195
|
-
//
|
|
196
|
-
// TaskPerformSequence(this.ped.Handle, sequence.Handle);
|
|
197
|
-
// }
|
|
198
161
|
async playAnimation(animDict, animName, blendInSpeed, blendOutSpeed, duration, playbackRate, animFlags, ikFlags) {
|
|
199
162
|
await LoadAnimDict(animDict);
|
|
200
163
|
TaskPlayAnim(
|
|
@@ -241,34 +204,6 @@ class Tasks {
|
|
|
241
204
|
standStill(duration) {
|
|
242
205
|
TaskStandStill(this.ped.Handle, duration);
|
|
243
206
|
}
|
|
244
|
-
// public startScenario(
|
|
245
|
-
// name: string,
|
|
246
|
-
// position: Vector3,
|
|
247
|
-
// heading = 0,
|
|
248
|
-
// duration = 0,
|
|
249
|
-
// sittingScenario = false,
|
|
250
|
-
// teleport = true,
|
|
251
|
-
// ): void {
|
|
252
|
-
// TaskStartScenarioAtPosition(
|
|
253
|
-
// this.ped.Handle,
|
|
254
|
-
// name,
|
|
255
|
-
// position.x,
|
|
256
|
-
// position.y,
|
|
257
|
-
// position.z,
|
|
258
|
-
// heading,
|
|
259
|
-
// duration,
|
|
260
|
-
// sittingScenario,
|
|
261
|
-
// teleport,
|
|
262
|
-
// );
|
|
263
|
-
// }
|
|
264
|
-
// public swapWeapon(): void {
|
|
265
|
-
// TaskSwapWeapon(this.ped.Handle, false);
|
|
266
|
-
// }
|
|
267
|
-
// public turnTo(targetOrPosition: BaseEntity | Vector3, duration = -1): void {
|
|
268
|
-
// if (targetOrPosition instanceof BaseEntity)
|
|
269
|
-
// TaskTurnPedToFaceEntity(this.ped.Handle, targetOrPosition.Handle, duration);
|
|
270
|
-
// else TaskTurnPedToFaceCoord(this.ped.Handle, targetOrPosition.x, targetOrPosition.y, targetOrPosition.z, duration);
|
|
271
|
-
// }
|
|
272
207
|
vehicleShootAtPed(target) {
|
|
273
208
|
TaskVehicleShootAtPed(this.ped.Handle, target.Handle, 20);
|
|
274
209
|
}
|
package/common/GlobalData.d.ts
CHANGED
package/common/GlobalData.js
CHANGED
|
@@ -5,6 +5,8 @@ class GlobalData {
|
|
|
5
5
|
__name(this, "GlobalData");
|
|
6
6
|
}
|
|
7
7
|
static CurrentResource = GetCurrentResourceName();
|
|
8
|
+
static GameName = GetGameName();
|
|
9
|
+
static GameBuild = GetGameBuildNumber();
|
|
8
10
|
static IS_SERVER = IsDuplicityVersion();
|
|
9
11
|
static IS_CLIENT = !GlobalData.IS_SERVER;
|
|
10
12
|
static NetworkTick = null;
|
|
@@ -19,6 +19,17 @@ export declare function Exports(exportName: string): (originalMethod: any, conte
|
|
|
19
19
|
* @param eventName the event to bind to
|
|
20
20
|
*/
|
|
21
21
|
export declare function Event(eventName: string): (originalMethod: any, context: ClassMethodDecoratorContext) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Registers the Event call for {@link eventName} to this method.
|
|
24
|
+
*
|
|
25
|
+
* This has internal pretty-printing to make errors easier to track, if
|
|
26
|
+
* you want to disable this you will need to call {@link DisablePrettyPrint}, or if you're
|
|
27
|
+
* using esbuild you can add `REMOVE_EVENT_LOG` to your drop label {@link https://esbuild.github.io/api/#drop-labels}
|
|
28
|
+
*
|
|
29
|
+
* This is the same thing as just using `Event` but this disambiguates the call from DOM
|
|
30
|
+
* @param eventName the event to bind to
|
|
31
|
+
*/
|
|
32
|
+
export declare const CfxEvent: typeof Event;
|
|
22
33
|
/**
|
|
23
34
|
* Registers the Net Event call for {@link eventName} to this method
|
|
24
35
|
*
|
package/common/decors/Events.js
CHANGED
|
@@ -80,6 +80,7 @@ function Event(eventName) {
|
|
|
80
80
|
}, "actualDecorator");
|
|
81
81
|
}
|
|
82
82
|
__name(Event, "Event");
|
|
83
|
+
const CfxEvent = Event;
|
|
83
84
|
function NetEvent(eventName, remoteOnly = true) {
|
|
84
85
|
return /* @__PURE__ */ __name(function actualDecorator(originalMethod, context) {
|
|
85
86
|
if (context.private) {
|
|
@@ -195,6 +196,7 @@ function SetTick() {
|
|
|
195
196
|
}
|
|
196
197
|
__name(SetTick, "SetTick");
|
|
197
198
|
export {
|
|
199
|
+
CfxEvent,
|
|
198
200
|
ConVar,
|
|
199
201
|
ConVarType,
|
|
200
202
|
DisablePrettyPrint,
|