@nativewrappers/common 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/GlobalData.d.ts CHANGED
@@ -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;
package/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/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,
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"