@nativewrappers/redm 0.0.114 → 0.0.116

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 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
  }
@@ -1,5 +1,7 @@
1
1
  export declare class GlobalData {
2
2
  static CurrentResource: string;
3
+ static GameName: string;
4
+ static GameBuild: number;
3
5
  static IS_SERVER: boolean;
4
6
  static IS_CLIENT: boolean;
5
7
  static NetworkTick: number | null;
@@ -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
  *
@@ -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,
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "license": "MIT",
10
10
  "type": "module",
11
- "version": "0.0.114",
11
+ "version": "0.0.116",
12
12
  "repository": {
13
13
  "type": "git",
14
14
  "url": "https://github.com/nativewrappers/nativewrappers.git"