@nativewrappers/redm 0.0.173 → 0.0.175

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.
@@ -219,7 +219,6 @@ class NetworkedMap extends Map {
219
219
  return Reflect.get(target, prop, reciever);
220
220
  },
221
221
  set(target, p, newValue, receiver) {
222
- if (!super.has(key)) return false;
223
222
  const success = Reflect.set(target, p, newValue, receiver);
224
223
  if (success) {
225
224
  curThis.#pushChangeForListener(key, target);
@@ -259,6 +258,7 @@ class NetworkedMap extends Map {
259
258
  }
260
259
  return true;
261
260
  });
261
+ this.#pushChangeForListener(key, void 0);
262
262
  return super.delete(key);
263
263
  }
264
264
  networkTick() {
@@ -19,7 +19,7 @@ export declare class BitSet<T extends number> {
19
19
  /**
20
20
  * @returns `true` if the bit at {@param position} is set.
21
21
  */
22
- test(position: number): number;
22
+ test(position: number): boolean;
23
23
  /**
24
24
  * @returns `true` if no bits in the bitset are set, false otherwise.
25
25
  */
@@ -30,7 +30,7 @@ class BitSet {
30
30
  * @returns `true` if the bit at {@param position} is set.
31
31
  */
32
32
  test(position) {
33
- return this.value & position;
33
+ return (this.value & 1 << position) !== 0;
34
34
  }
35
35
  /**
36
36
  * @returns `true` if no bits in the bitset are set, false otherwise.
@@ -1,10 +1,10 @@
1
1
  import type { ClassTypes } from "../../common/utils/ClassTypes";
2
2
  import type { Quaternion } from "../../common/utils/Quaternion";
3
3
  import { Vector3 } from "../../common/utils/Vector";
4
- import type { CommonBaseEntityBoneCollection } from "./CommonBaseEntityBoneCollection";
5
- import type { StateBagChangeHandler } from "../cfx/StateBagChangeHandler";
6
4
  import { CommonModel } from "../CommonModel";
5
+ import type { StateBagChangeHandler } from "../cfx/StateBagChangeHandler";
7
6
  import type { CommonBaseEntityBone } from "./CommonBaseEntityBone";
7
+ import type { CommonBaseEntityBoneCollection } from "./CommonBaseEntityBoneCollection";
8
8
  import { IHandle } from "./IHandle";
9
9
  export declare abstract class CommonBaseEntity extends IHandle {
10
10
  protected stateBagCookies: number[];
@@ -1,9 +1,9 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { GlobalData } from "../../common/GlobalData";
3
4
  import { Vector3 } from "../../common/utils/Vector";
4
- import cfx from "../cfx/cfx";
5
5
  import { CommonModel } from "../CommonModel";
6
- import { GlobalData } from "../../common/GlobalData";
6
+ import cfx from "../cfx/cfx";
7
7
  import { IHandle } from "./IHandle";
8
8
  class CommonBaseEntity extends IHandle {
9
9
  static {
@@ -95,7 +95,7 @@ class CommonBaseEntity extends IHandle {
95
95
  this.stateBagCookies = this.stateBagCookies.filter((cookie) => {
96
96
  const isCookie = cookie === tgtCookie;
97
97
  if (isCookie) RemoveStateBagChangeHandler(cookie);
98
- return isCookie;
98
+ return !isCookie;
99
99
  });
100
100
  }
101
101
  get Owner() {
@@ -1,6 +1,6 @@
1
1
  import type { StateBagChangeHandler } from "../cfx/StateBagChangeHandler";
2
- import { CommonPed } from "./CommonPed";
3
2
  import type { CommonEntity } from "./CommonEntityType";
3
+ import { CommonPed } from "./CommonPed";
4
4
  export declare class CommonPlayer {
5
5
  private handle;
6
6
  private ped?;
@@ -1,10 +1,10 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- import { CommonPed } from "./CommonPed";
4
3
  import { ClassTypes } from "../../common/utils/ClassTypes";
5
- import { GetEntityClassFromHandle } from "./GetEntityClassIdFromHandle";
6
- import cfx from "../cfx/cfx";
7
4
  import { CommonGameConstants } from "../CommonGameConstants";
5
+ import cfx from "../cfx/cfx";
6
+ import { CommonPed } from "./CommonPed";
7
+ import { GetEntityClassFromHandle } from "./GetEntityClassIdFromHandle";
8
8
  class CommonPlayer {
9
9
  static {
10
10
  __name(this, "CommonPlayer");
@@ -123,7 +123,7 @@ class CommonPlayer {
123
123
  this.stateBagCookies = this.stateBagCookies.filter((cookie) => {
124
124
  const isCookie = cookie === tgtCookie;
125
125
  if (isCookie) RemoveStateBagChangeHandler(cookie);
126
- return isCookie;
126
+ return !isCookie;
127
127
  });
128
128
  }
129
129
  removeAllStateListeners() {
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "license": "MIT",
10
10
  "type": "module",
11
- "version": "0.0.173",
11
+ "version": "0.0.175",
12
12
  "repository": {
13
13
  "type": "git",
14
14
  "url": "https://github.com/nativewrappers/nativewrappers.git"