rock-mod 0.2.0 → 0.5.0

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.
Files changed (130) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +24 -2
  3. package/dist/server/RockMod.d.ts +16 -6
  4. package/dist/server/RockMod.js +32 -7
  5. package/dist/server/entities/altv/blip/AltVBlip.d.ts +15 -0
  6. package/dist/server/entities/altv/blip/AltVBlip.js +34 -0
  7. package/dist/server/entities/altv/blip/AltVBlipsManager.d.ts +9 -0
  8. package/dist/server/entities/altv/blip/AltVBlipsManager.js +25 -0
  9. package/dist/server/entities/altv/colshape/AltVCircleColshape.d.ts +7 -0
  10. package/dist/server/entities/altv/colshape/AltVCircleColshape.js +10 -0
  11. package/dist/server/entities/altv/colshape/AltVColshape.d.ts +7 -0
  12. package/dist/server/entities/altv/colshape/AltVColshape.js +10 -0
  13. package/dist/server/entities/altv/colshape/AltVColshapesManager.d.ts +26 -0
  14. package/dist/server/entities/altv/colshape/AltVColshapesManager.js +67 -0
  15. package/dist/server/entities/altv/colshape/AltVCuboidColshape.d.ts +7 -0
  16. package/dist/server/entities/altv/colshape/AltVCuboidColshape.js +10 -0
  17. package/dist/server/entities/altv/colshape/AltVCylinderColshape.d.ts +7 -0
  18. package/dist/server/entities/altv/colshape/AltVCylinderColshape.js +10 -0
  19. package/dist/server/entities/altv/colshape/AltVRectangleColshape.d.ts +7 -0
  20. package/dist/server/entities/altv/colshape/AltVRectangleColshape.js +10 -0
  21. package/dist/server/entities/altv/colshape/AltVSphereColshape.d.ts +7 -0
  22. package/dist/server/entities/altv/colshape/AltVSphereColshape.js +10 -0
  23. package/dist/server/entities/altv/marker/AltVMarker.d.ts +12 -0
  24. package/dist/server/entities/altv/marker/AltVMarker.js +23 -0
  25. package/dist/server/entities/altv/marker/AltVMarkersManager.d.ts +9 -0
  26. package/dist/server/entities/altv/marker/AltVMarkersManager.js +25 -0
  27. package/dist/server/entities/altv/object/AltVObject.d.ts +9 -0
  28. package/dist/server/entities/altv/object/AltVObject.js +16 -0
  29. package/dist/server/entities/altv/object/AltVObjectsManager.d.ts +9 -0
  30. package/dist/server/entities/altv/object/AltVObjectsManager.js +22 -0
  31. package/dist/server/entities/altv/ped/AltVPed.d.ts +8 -0
  32. package/dist/server/entities/altv/ped/AltVPed.js +10 -0
  33. package/dist/server/entities/altv/ped/AltVPedsManager.d.ts +9 -0
  34. package/dist/server/entities/altv/ped/AltVPedsManager.js +22 -0
  35. package/dist/server/entities/common/baseObject/IBaseObject.d.ts +5 -0
  36. package/dist/server/entities/common/baseObject/IBaseObject.js +5 -0
  37. package/dist/server/entities/common/blip/IBlip.d.ts +811 -0
  38. package/dist/server/entities/common/blip/IBlip.js +803 -0
  39. package/dist/server/entities/common/blip/IBlipsManager.d.ts +9 -0
  40. package/dist/server/entities/common/blip/IBlipsManager.js +2 -0
  41. package/dist/server/entities/common/blip/index.d.ts +2 -0
  42. package/dist/server/entities/common/blip/index.js +18 -0
  43. package/dist/server/entities/common/colshape/ICircleColshape.d.ts +5 -0
  44. package/dist/server/entities/common/colshape/ICircleColshape.js +2 -0
  45. package/dist/server/entities/common/colshape/IColshape.d.ts +5 -0
  46. package/dist/server/entities/common/colshape/IColshape.js +2 -0
  47. package/dist/server/entities/common/colshape/IColshapesManager.d.ts +35 -0
  48. package/dist/server/entities/common/colshape/IColshapesManager.js +2 -0
  49. package/dist/server/entities/common/colshape/ICuboidColshape.d.ts +5 -0
  50. package/dist/server/entities/common/colshape/ICuboidColshape.js +2 -0
  51. package/dist/server/entities/common/colshape/ICylinderColshape.d.ts +5 -0
  52. package/dist/server/entities/common/colshape/ICylinderColshape.js +2 -0
  53. package/dist/server/entities/common/colshape/IRectangleColshape.d.ts +5 -0
  54. package/dist/server/entities/common/colshape/IRectangleColshape.js +2 -0
  55. package/dist/server/entities/common/colshape/ISphereColshape.d.ts +5 -0
  56. package/dist/server/entities/common/colshape/ISphereColshape.js +2 -0
  57. package/dist/server/entities/common/colshape/index.d.ts +7 -0
  58. package/dist/server/entities/common/colshape/index.js +23 -0
  59. package/dist/server/entities/common/index.d.ts +5 -0
  60. package/dist/server/entities/common/index.js +5 -0
  61. package/dist/server/entities/common/marker/IMarker.d.ts +9 -0
  62. package/dist/server/entities/common/marker/IMarker.js +2 -0
  63. package/dist/server/entities/common/marker/IMarkersManager.d.ts +59 -0
  64. package/dist/server/entities/common/marker/IMarkersManager.js +51 -0
  65. package/dist/server/entities/common/marker/index.d.ts +2 -0
  66. package/dist/server/entities/common/marker/index.js +18 -0
  67. package/dist/server/entities/common/object/IObject.d.ts +7 -0
  68. package/dist/server/entities/common/object/IObject.js +2 -0
  69. package/dist/server/entities/common/object/IObjectsManager.d.ts +8 -0
  70. package/dist/server/entities/common/object/IObjectsManager.js +2 -0
  71. package/dist/server/entities/common/object/index.d.ts +2 -0
  72. package/dist/server/entities/common/object/index.js +18 -0
  73. package/dist/server/entities/common/ped/IPed.d.ts +5 -0
  74. package/dist/server/entities/common/ped/IPed.js +2 -0
  75. package/dist/server/entities/common/ped/IPedsManager.d.ts +7 -0
  76. package/dist/server/entities/common/ped/IPedsManager.js +2 -0
  77. package/dist/server/entities/common/ped/index.d.ts +2 -0
  78. package/dist/server/entities/common/ped/index.js +18 -0
  79. package/dist/server/entities/common/worldObject/IWorldObject.d.ts +2 -2
  80. package/dist/server/entities/common/worldObject/IWorldObjectsManager.d.ts +1 -1
  81. package/dist/server/entities/ragemp/blip/RageBlip.d.ts +15 -0
  82. package/dist/server/entities/ragemp/blip/RageBlip.js +34 -0
  83. package/dist/server/entities/ragemp/blip/RageBlipsManager.d.ts +9 -0
  84. package/dist/server/entities/ragemp/blip/RageBlipsManager.js +26 -0
  85. package/dist/server/entities/ragemp/colshape/RageCircleColshape.d.ts +7 -0
  86. package/dist/server/entities/ragemp/colshape/RageCircleColshape.js +10 -0
  87. package/dist/server/entities/ragemp/colshape/RageColshape.d.ts +6 -0
  88. package/dist/server/entities/ragemp/colshape/RageColshape.js +10 -0
  89. package/dist/server/entities/ragemp/colshape/RageColshapesManager.d.ts +26 -0
  90. package/dist/server/entities/ragemp/colshape/RageColshapesManager.js +62 -0
  91. package/dist/server/entities/ragemp/colshape/RageCuboidColshape.d.ts +7 -0
  92. package/dist/server/entities/ragemp/colshape/RageCuboidColshape.js +10 -0
  93. package/dist/server/entities/ragemp/colshape/RageCylinderColshape.d.ts +7 -0
  94. package/dist/server/entities/ragemp/colshape/RageCylinderColshape.js +10 -0
  95. package/dist/server/entities/ragemp/colshape/RageRectangleColshape.d.ts +7 -0
  96. package/dist/server/entities/ragemp/colshape/RageRectangleColshape.js +10 -0
  97. package/dist/server/entities/ragemp/colshape/RageSphereColshape.d.ts +7 -0
  98. package/dist/server/entities/ragemp/colshape/RageSphereColshape.js +10 -0
  99. package/dist/server/entities/ragemp/marker/RageMarker.d.ts +11 -0
  100. package/dist/server/entities/ragemp/marker/RageMarker.js +22 -0
  101. package/dist/server/entities/ragemp/marker/RageMarkersManager.d.ts +9 -0
  102. package/dist/server/entities/ragemp/marker/RageMarkersManager.js +25 -0
  103. package/dist/server/entities/ragemp/object/RageObject.d.ts +9 -0
  104. package/dist/server/entities/ragemp/object/RageObject.js +16 -0
  105. package/dist/server/entities/ragemp/object/RageObjectsManager.d.ts +9 -0
  106. package/dist/server/entities/ragemp/object/RageObjectsManager.js +25 -0
  107. package/dist/server/entities/ragemp/ped/RagePed.d.ts +7 -0
  108. package/dist/server/entities/ragemp/ped/RagePed.js +10 -0
  109. package/dist/server/entities/ragemp/ped/RagePedsManager.d.ts +9 -0
  110. package/dist/server/entities/ragemp/ped/RagePedsManager.js +24 -0
  111. package/dist/server/entities/ragemp/player/RagePlayersManager.d.ts +2 -1
  112. package/dist/server/entities/ragemp/player/RagePlayersManager.js +3 -4
  113. package/dist/server/entities/ragemp/vehicle/RageVehiclesManager.js +1 -0
  114. package/dist/server/entities/ragemp/worldObject/RageWorldObjectsManager.d.ts +1 -1
  115. package/dist/server/factories/altv/AltVManagersFactory.d.ts +12 -0
  116. package/dist/server/factories/altv/AltVManagersFactory.js +24 -0
  117. package/dist/server/factories/common/IManagersFactory.d.ts +9 -3
  118. package/dist/server/factories/ragemp/RageManagersFactory.d.ts +13 -1
  119. package/dist/server/factories/ragemp/RageManagersFactory.js +26 -2
  120. package/dist/server/utils/altv/AltVUtilsManager.d.ts +4 -0
  121. package/dist/server/utils/altv/AltVUtilsManager.js +9 -0
  122. package/dist/server/utils/common/IUtilsManager.d.ts +3 -0
  123. package/dist/server/utils/common/IUtilsManager.js +2 -0
  124. package/dist/server/utils/common/index.d.ts +1 -0
  125. package/dist/server/utils/common/index.js +17 -0
  126. package/dist/server/utils/index.d.ts +1 -0
  127. package/dist/server/utils/index.js +17 -0
  128. package/dist/server/utils/ragemp/RageUtilsManager.d.ts +4 -0
  129. package/dist/server/utils/ragemp/RageUtilsManager.js +9 -0
  130. package/package.json +62 -62
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Carter
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Carter
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,25 @@
1
- # rock-mod
1
+ # Rock-Mod
2
2
 
3
- Rock-Mod is a powerful framework designed for creating and managing mods for Grand Theft Auto (GTA) games.
3
+ **Rock-Mod** is a versatile and powerful framework designed for cross-platform mod development for Grand Theft Auto (GTA) servers. It supports both **RageMP** and **AltV** multiplayer platforms, allowing you to build and manage mods seamlessly across these environments.
4
+
5
+ ### Installation
6
+
7
+ To get started, simply install the package:
8
+
9
+ ```bash
10
+ npm install rock-mod
11
+ ```
12
+
13
+ ### Usage
14
+
15
+ On the server-side, initialize Rock-Mod with the appropriate multiplayer type:
16
+
17
+ ```typescript
18
+ const rockMod = await RockMod.create({
19
+ multiplayer: "RageMP", // or "AltV"
20
+ });
21
+ ```
22
+
23
+ Please note that client-side implementation is not yet available in this version.
24
+
25
+ Rock-Mod simplifies multiplayer mod development by providing unified tools for managing game entities, networking, and more across different platforms.
@@ -1,6 +1,6 @@
1
1
  import { INetManager } from "./net/common/INetManager";
2
- import { IPlayersManager } from "./entities/common/player/IPlayersManager";
3
- import { IVehiclesManager } from "./entities/common/vehicle/IVehiclesManager";
2
+ import { IBlipsManager, IColshapesManager, IMarkersManager, IObjectsManager, IPedsManager, IPlayersManager, IVehiclesManager } from "./entities";
3
+ import { IUtilsManager } from "./utils";
4
4
  type MultiplayerType = "RageMP" | "AltV";
5
5
  export interface RockModOptions {
6
6
  multiplayer: MultiplayerType;
@@ -10,14 +10,24 @@ export declare class RockMod {
10
10
  static create(options: RockModOptions): Promise<RockMod>;
11
11
  static get instance(): RockMod;
12
12
  private static _initManagersFactory;
13
- private readonly _managersFactory;
14
13
  private readonly _net;
15
- private _players;
16
- private _vehicles;
14
+ private readonly _blips;
15
+ private readonly _colshapes;
16
+ private readonly _markers;
17
+ private readonly _objects;
18
+ private readonly _peds;
19
+ private readonly _players;
20
+ private readonly _utils;
21
+ private readonly _vehicles;
17
22
  get net(): INetManager;
23
+ get blips(): IBlipsManager;
24
+ get colshapes(): IColshapesManager;
25
+ get markers(): IMarkersManager;
26
+ get objects(): IObjectsManager;
27
+ get peds(): IPedsManager;
18
28
  get players(): IPlayersManager;
29
+ get utils(): IUtilsManager;
19
30
  get vehicles(): IVehiclesManager;
20
31
  private constructor();
21
- init(): void;
22
32
  }
23
33
  export {};
@@ -53,27 +53,52 @@ class RockMod {
53
53
  }
54
54
  }
55
55
  }
56
- _managersFactory;
57
56
  _net;
57
+ _blips;
58
+ _colshapes;
59
+ _markers;
60
+ _objects;
61
+ _peds;
58
62
  _players;
63
+ _utils;
59
64
  _vehicles;
60
65
  get net() {
61
66
  return this._net;
62
67
  }
68
+ get blips() {
69
+ return this._blips;
70
+ }
71
+ get colshapes() {
72
+ return this._colshapes;
73
+ }
74
+ get markers() {
75
+ return this._markers;
76
+ }
77
+ get objects() {
78
+ return this._objects;
79
+ }
80
+ get peds() {
81
+ return this._peds;
82
+ }
63
83
  get players() {
64
84
  return this._players;
65
85
  }
86
+ get utils() {
87
+ return this._utils;
88
+ }
66
89
  get vehicles() {
67
90
  return this._vehicles;
68
91
  }
69
92
  constructor(managersFactory) {
70
- this._managersFactory = managersFactory;
71
93
  this._net = managersFactory.createNetManager();
72
- }
73
- init() {
74
- console.log("RockMod init");
75
- this._players = this._managersFactory.createPlayersManager();
76
- this._vehicles = this._managersFactory.createVehiclesManager();
94
+ this._blips = managersFactory.createBlipsManager();
95
+ this._colshapes = managersFactory.createColshapesManager();
96
+ this._markers = managersFactory.createMarkersManager();
97
+ this._objects = managersFactory.createObjectsManager();
98
+ this._peds = managersFactory.createPedsManager();
99
+ this._players = managersFactory.createPlayersManager(this._net);
100
+ this._utils = managersFactory.createUtilsManager();
101
+ this._vehicles = managersFactory.createVehiclesManager();
77
102
  }
78
103
  }
79
104
  exports.RockMod = RockMod;
@@ -0,0 +1,15 @@
1
+ import { AltVWorldObject, IAltVWorldObjectOptions } from "../worldObject/AltVWorldObject";
2
+ import { IBlip, IBlipColor, IBlipSprite } from "../../common";
3
+ export interface IAltVBlipOptions extends IAltVWorldObjectOptions<AltVServer.Blip> {
4
+ }
5
+ export declare class AltVBlip extends AltVWorldObject<AltVServer.Blip> implements IBlip {
6
+ get sprite(): IBlipSprite;
7
+ get alpha(): number;
8
+ get name(): string;
9
+ get color(): IBlipColor;
10
+ constructor(options: IAltVBlipOptions);
11
+ setSprite(value: IBlipSprite): void;
12
+ setAlpha(value: number): void;
13
+ setName(value: string): void;
14
+ setColor(value: IBlipColor): void;
15
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AltVBlip = void 0;
4
+ const AltVWorldObject_1 = require("../worldObject/AltVWorldObject");
5
+ class AltVBlip extends AltVWorldObject_1.AltVWorldObject {
6
+ get sprite() {
7
+ return this.mpEntity.sprite;
8
+ }
9
+ get alpha() {
10
+ return this.mpEntity.alpha;
11
+ }
12
+ get name() {
13
+ return this.mpEntity.name;
14
+ }
15
+ get color() {
16
+ return this.mpEntity.color;
17
+ }
18
+ constructor(options) {
19
+ super(options);
20
+ }
21
+ setSprite(value) {
22
+ this.mpEntity.sprite = value;
23
+ }
24
+ setAlpha(value) {
25
+ this.mpEntity.alpha = value;
26
+ }
27
+ setName(value) {
28
+ this.mpEntity.name = value;
29
+ }
30
+ setColor(value) {
31
+ this.mpEntity.color = value;
32
+ }
33
+ }
34
+ exports.AltVBlip = AltVBlip;
@@ -0,0 +1,9 @@
1
+ import { IBlipCreateOptions, IBlipsManager } from "../../common";
2
+ import { AltVWorldObjectsManager } from "../worldObject/AltVWorldObjectsManager";
3
+ import { AltVBlip } from "./AltVBlip";
4
+ export interface IAltVBlipCreateOptions extends IBlipCreateOptions {
5
+ }
6
+ export declare class AltVBlipsManager extends AltVWorldObjectsManager<AltVBlip> implements IBlipsManager {
7
+ constructor();
8
+ create(options: IAltVBlipCreateOptions): AltVBlip;
9
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AltVBlipsManager = void 0;
4
+ const AltVWorldObjectsManager_1 = require("../worldObject/AltVWorldObjectsManager");
5
+ const AltVBlip_1 = require("./AltVBlip");
6
+ var PointBlip = AltVServer.PointBlip;
7
+ var Vector3 = AltVShared.Vector3;
8
+ class AltVBlipsManager extends AltVWorldObjectsManager_1.AltVWorldObjectsManager {
9
+ constructor() {
10
+ super({
11
+ baseObjectsType: "blip",
12
+ });
13
+ }
14
+ create(options) {
15
+ const { sprite, position, dimension, alpha } = options;
16
+ const mpEntity = new PointBlip(new Vector3(position), true);
17
+ mpEntity.sprite = sprite;
18
+ mpEntity.dimension = dimension;
19
+ mpEntity.alpha = alpha;
20
+ const blip = new AltVBlip_1.AltVBlip({ mpEntity });
21
+ this.registerBaseObject(blip);
22
+ return blip;
23
+ }
24
+ }
25
+ exports.AltVBlipsManager = AltVBlipsManager;
@@ -0,0 +1,7 @@
1
+ import { ICircleColshape } from "../../common";
2
+ import { AltVColshape, IAltVColshapeOptions } from "./AltVColshape";
3
+ export interface IAltVCircleColshapeOptions extends IAltVColshapeOptions {
4
+ }
5
+ export declare class AltVCircleColshape extends AltVColshape implements ICircleColshape {
6
+ constructor(options: IAltVCircleColshapeOptions);
7
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AltVCircleColshape = void 0;
4
+ const AltVColshape_1 = require("./AltVColshape");
5
+ class AltVCircleColshape extends AltVColshape_1.AltVColshape {
6
+ constructor(options) {
7
+ super(options);
8
+ }
9
+ }
10
+ exports.AltVCircleColshape = AltVCircleColshape;
@@ -0,0 +1,7 @@
1
+ import { AltVWorldObject, IAltVWorldObjectOptions } from "../worldObject/AltVWorldObject";
2
+ import Colshape = AltVServer.Colshape;
3
+ export interface IAltVColshapeOptions extends IAltVWorldObjectOptions<Colshape> {
4
+ }
5
+ export declare abstract class AltVColshape extends AltVWorldObject<Colshape> {
6
+ protected constructor(options: IAltVColshapeOptions);
7
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AltVColshape = void 0;
4
+ const AltVWorldObject_1 = require("../worldObject/AltVWorldObject");
5
+ class AltVColshape extends AltVWorldObject_1.AltVWorldObject {
6
+ constructor(options) {
7
+ super(options);
8
+ }
9
+ }
10
+ exports.AltVColshape = AltVColshape;
@@ -0,0 +1,26 @@
1
+ import { ICircleColshapeCreateOptions, IColshapesManager, ICuboidColshapeCreateOptions, ICylinderColshapeCreateOptions, IRectangleColshapeCreateOptions, ISphereColshapeCreateOptions } from "../../common";
2
+ import { AltVWorldObjectsManager } from "../worldObject/AltVWorldObjectsManager";
3
+ import { AltVColshape } from "./AltVColshape";
4
+ import { AltVCircleColshape } from "./AltVCircleColshape";
5
+ import { AltVCuboidColshape } from "./AltVCuboidColshape";
6
+ import { AltVCylinderColshape } from "./AltVCylinderColshape";
7
+ import { AltVRectangleColshape } from "./AltVRectangleColshape";
8
+ import { AltVSphereColshape } from "./AltVSphereColshape";
9
+ export interface IAltVCircleColshapeCreateOptions extends ICircleColshapeCreateOptions {
10
+ }
11
+ export interface IAltVCuboidColshapeCreateOptions extends ICuboidColshapeCreateOptions {
12
+ }
13
+ export interface IAltVCylinderColshapeCreateOptions extends ICylinderColshapeCreateOptions {
14
+ }
15
+ export interface IAltVRectangleColshapeCreateOptions extends IRectangleColshapeCreateOptions {
16
+ }
17
+ export interface IAltVSphereColshapeCreateOptions extends ISphereColshapeCreateOptions {
18
+ }
19
+ export declare class AltVColshapesManager extends AltVWorldObjectsManager<AltVColshape> implements IColshapesManager {
20
+ constructor();
21
+ createCircle(options: IAltVCircleColshapeCreateOptions): AltVCircleColshape;
22
+ createCuboid(options: IAltVCuboidColshapeCreateOptions): AltVCuboidColshape;
23
+ createCylinder(options: IAltVCylinderColshapeCreateOptions): AltVCylinderColshape;
24
+ createRectangle(options: IAltVRectangleColshapeCreateOptions): AltVRectangleColshape;
25
+ createSphere(options: IAltVSphereColshapeCreateOptions): AltVSphereColshape;
26
+ }
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AltVColshapesManager = void 0;
4
+ const AltVWorldObjectsManager_1 = require("../worldObject/AltVWorldObjectsManager");
5
+ const AltVCircleColshape_1 = require("./AltVCircleColshape");
6
+ const AltVCuboidColshape_1 = require("./AltVCuboidColshape");
7
+ const AltVCylinderColshape_1 = require("./AltVCylinderColshape");
8
+ const AltVRectangleColshape_1 = require("./AltVRectangleColshape");
9
+ const AltVSphereColshape_1 = require("./AltVSphereColshape");
10
+ var ColshapeCircle = AltVServer.ColshapeCircle;
11
+ var ColshapeCuboid = AltVServer.ColshapeCuboid;
12
+ var ColshapeCylinder = AltVServer.ColshapeCylinder;
13
+ var ColshapeRectangle = AltVServer.ColshapeRectangle;
14
+ var ColshapeSphere = AltVServer.ColshapeSphere;
15
+ class AltVColshapesManager extends AltVWorldObjectsManager_1.AltVWorldObjectsManager {
16
+ constructor() {
17
+ super({
18
+ baseObjectsType: "colshape",
19
+ });
20
+ }
21
+ createCircle(options) {
22
+ const { range, position, dimension } = options;
23
+ const { x, y } = position;
24
+ const mpEntity = new ColshapeCircle(x, y, range);
25
+ mpEntity.dimension = dimension;
26
+ const colshape = new AltVCircleColshape_1.AltVCircleColshape({ mpEntity });
27
+ this.registerBaseObject(colshape);
28
+ return colshape;
29
+ }
30
+ createCuboid(options) {
31
+ const { width, depth, height, position, dimension } = options;
32
+ const { x, y, z } = position;
33
+ const mpEntity = new ColshapeCuboid(x, y, z, x + width, y + depth, z + height);
34
+ mpEntity.dimension = dimension;
35
+ const colshape = new AltVCuboidColshape_1.AltVCuboidColshape({ mpEntity });
36
+ this.registerBaseObject(colshape);
37
+ return colshape;
38
+ }
39
+ createCylinder(options) {
40
+ const { height, range, position, dimension } = options;
41
+ const { x, y, z } = position;
42
+ const mpEntity = new ColshapeCylinder(x, y, z, range, height);
43
+ mpEntity.dimension = dimension;
44
+ const colshape = new AltVCylinderColshape_1.AltVCylinderColshape({ mpEntity });
45
+ this.registerBaseObject(colshape);
46
+ return colshape;
47
+ }
48
+ createRectangle(options) {
49
+ const { width, height, position, dimension } = options;
50
+ const { x, y } = position;
51
+ const mpEntity = new ColshapeRectangle(x, y, x + width, y + height);
52
+ mpEntity.dimension = dimension;
53
+ const colshape = new AltVRectangleColshape_1.AltVRectangleColshape({ mpEntity });
54
+ this.registerBaseObject(colshape);
55
+ return colshape;
56
+ }
57
+ createSphere(options) {
58
+ const { range, position, dimension } = options;
59
+ const { x, y, z } = position;
60
+ const mpEntity = new ColshapeSphere(x, y, z, range);
61
+ mpEntity.dimension = dimension;
62
+ const colshape = new AltVSphereColshape_1.AltVSphereColshape({ mpEntity });
63
+ this.registerBaseObject(colshape);
64
+ return colshape;
65
+ }
66
+ }
67
+ exports.AltVColshapesManager = AltVColshapesManager;
@@ -0,0 +1,7 @@
1
+ import { ICuboidColshape } from "../../common";
2
+ import { AltVColshape, IAltVColshapeOptions } from "./AltVColshape";
3
+ export interface IAltVCuboidColshapeOptions extends IAltVColshapeOptions {
4
+ }
5
+ export declare class AltVCuboidColshape extends AltVColshape implements ICuboidColshape {
6
+ constructor(options: IAltVCuboidColshapeOptions);
7
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AltVCuboidColshape = void 0;
4
+ const AltVColshape_1 = require("./AltVColshape");
5
+ class AltVCuboidColshape extends AltVColshape_1.AltVColshape {
6
+ constructor(options) {
7
+ super(options);
8
+ }
9
+ }
10
+ exports.AltVCuboidColshape = AltVCuboidColshape;
@@ -0,0 +1,7 @@
1
+ import { ICylinderColshape } from "../../common";
2
+ import { AltVColshape, IAltVColshapeOptions } from "./AltVColshape";
3
+ export interface IAltVCylinderColshapeOptions extends IAltVColshapeOptions {
4
+ }
5
+ export declare class AltVCylinderColshape extends AltVColshape implements ICylinderColshape {
6
+ constructor(options: IAltVCylinderColshapeOptions);
7
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AltVCylinderColshape = void 0;
4
+ const AltVColshape_1 = require("./AltVColshape");
5
+ class AltVCylinderColshape extends AltVColshape_1.AltVColshape {
6
+ constructor(options) {
7
+ super(options);
8
+ }
9
+ }
10
+ exports.AltVCylinderColshape = AltVCylinderColshape;
@@ -0,0 +1,7 @@
1
+ import { IRectangleColshape } from "../../common";
2
+ import { AltVColshape, IAltVColshapeOptions } from "./AltVColshape";
3
+ export interface IAltVRectangleColshapeOptions extends IAltVColshapeOptions {
4
+ }
5
+ export declare class AltVRectangleColshape extends AltVColshape implements IRectangleColshape {
6
+ constructor(options: IAltVRectangleColshapeOptions);
7
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AltVRectangleColshape = void 0;
4
+ const AltVColshape_1 = require("./AltVColshape");
5
+ class AltVRectangleColshape extends AltVColshape_1.AltVColshape {
6
+ constructor(options) {
7
+ super(options);
8
+ }
9
+ }
10
+ exports.AltVRectangleColshape = AltVRectangleColshape;
@@ -0,0 +1,7 @@
1
+ import { ISphereColshape } from "../../common";
2
+ import { AltVColshape, IAltVColshapeOptions } from "./AltVColshape";
3
+ export interface IAltVSphereColshapeOptions extends IAltVColshapeOptions {
4
+ }
5
+ export declare class AltVSphereColshape extends AltVColshape implements ISphereColshape {
6
+ constructor(options: IAltVSphereColshapeOptions);
7
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AltVSphereColshape = void 0;
4
+ const AltVColshape_1 = require("./AltVColshape");
5
+ class AltVSphereColshape extends AltVColshape_1.AltVColshape {
6
+ constructor(options) {
7
+ super(options);
8
+ }
9
+ }
10
+ exports.AltVSphereColshape = AltVSphereColshape;
@@ -0,0 +1,12 @@
1
+ import { AltVWorldObject, IAltVWorldObjectOptions } from "../worldObject/AltVWorldObject";
2
+ import Marker = AltVServer.Marker;
3
+ import { IMarker } from "../../common";
4
+ export interface IAltVMarkerOptions extends IAltVWorldObjectOptions<Marker> {
5
+ }
6
+ export declare class AltVMarker extends AltVWorldObject<Marker> implements IMarker {
7
+ get visible(): boolean;
8
+ get scale(): number;
9
+ constructor(options: IAltVMarkerOptions);
10
+ setVisible(value: boolean): void;
11
+ setScale(value: number): void;
12
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AltVMarker = void 0;
4
+ const AltVWorldObject_1 = require("../worldObject/AltVWorldObject");
5
+ var Vector3 = AltVShared.Vector3;
6
+ class AltVMarker extends AltVWorldObject_1.AltVWorldObject {
7
+ get visible() {
8
+ return this.mpEntity.visible;
9
+ }
10
+ get scale() {
11
+ return this.mpEntity.scale.z;
12
+ }
13
+ constructor(options) {
14
+ super(options);
15
+ }
16
+ setVisible(value) {
17
+ this.mpEntity.visible = value;
18
+ }
19
+ setScale(value) {
20
+ this.mpEntity.scale = new Vector3(0, 0, value);
21
+ }
22
+ }
23
+ exports.AltVMarker = AltVMarker;
@@ -0,0 +1,9 @@
1
+ import { IMarkerCreateOptions, IMarkersManager } from "../../common";
2
+ import { AltVWorldObjectsManager } from "../worldObject/AltVWorldObjectsManager";
3
+ import { AltVMarker } from "./AltVMarker";
4
+ export interface IAltVMarkerCreateOptions extends IMarkerCreateOptions {
5
+ }
6
+ export declare class AltVMarkersManager extends AltVWorldObjectsManager<AltVMarker> implements IMarkersManager {
7
+ constructor();
8
+ create(options: IAltVMarkerCreateOptions): AltVMarker;
9
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AltVMarkersManager = void 0;
4
+ const AltVWorldObjectsManager_1 = require("../worldObject/AltVWorldObjectsManager");
5
+ const AltVMarker_1 = require("./AltVMarker");
6
+ var alt = AltVServer;
7
+ var Vector3 = AltVShared.Vector3;
8
+ class AltVMarkersManager extends AltVWorldObjectsManager_1.AltVWorldObjectsManager {
9
+ constructor() {
10
+ super({
11
+ baseObjectsType: "marker",
12
+ });
13
+ }
14
+ create(options) {
15
+ const { type, scale, color, position, dimension, rotation } = options;
16
+ const mpEntity = new alt.Marker(type, new Vector3(position), color);
17
+ mpEntity.scale = new Vector3(scale, scale, scale);
18
+ mpEntity.dimension = dimension;
19
+ mpEntity.rot = new Vector3(rotation);
20
+ const marker = new AltVMarker_1.AltVMarker({ mpEntity });
21
+ this.registerBaseObject(marker);
22
+ return marker;
23
+ }
24
+ }
25
+ exports.AltVMarkersManager = AltVMarkersManager;
@@ -0,0 +1,9 @@
1
+ import { AltVEntity, IAltVEntityOptions } from "../entity/AltVEntity";
2
+ import { IObject } from "../../common/object/IObject";
3
+ export interface IAltVObjectOptions extends IAltVEntityOptions<AltVServer.Object> {
4
+ }
5
+ export declare class AltVObject extends AltVEntity<AltVServer.Object> implements IObject {
6
+ get alpha(): number;
7
+ constructor(options: IAltVObjectOptions);
8
+ setAlpha(value: number): void;
9
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AltVObject = void 0;
4
+ const AltVEntity_1 = require("../entity/AltVEntity");
5
+ class AltVObject extends AltVEntity_1.AltVEntity {
6
+ get alpha() {
7
+ return this.mpEntity.alpha;
8
+ }
9
+ constructor(options) {
10
+ super(options);
11
+ }
12
+ setAlpha(value) {
13
+ this.mpEntity.alpha = value;
14
+ }
15
+ }
16
+ exports.AltVObject = AltVObject;
@@ -0,0 +1,9 @@
1
+ import { IObjectCreateOptions, IObjectsManager } from "../../common/object/IObjectsManager";
2
+ import { AltVEntitiesManager } from "../entity/AltVEntitiesManager";
3
+ import { AltVObject } from "./AltVObject";
4
+ export interface IAltVObjectCreateOptions extends IObjectCreateOptions {
5
+ }
6
+ export declare class AltVObjectsManager extends AltVEntitiesManager<AltVObject> implements IObjectsManager {
7
+ constructor();
8
+ create(options: IAltVObjectCreateOptions): AltVObject;
9
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AltVObjectsManager = void 0;
4
+ const AltVEntitiesManager_1 = require("../entity/AltVEntitiesManager");
5
+ const AltVObject_1 = require("./AltVObject");
6
+ var alt = AltVServer;
7
+ class AltVObjectsManager extends AltVEntitiesManager_1.AltVEntitiesManager {
8
+ constructor() {
9
+ super({
10
+ baseObjectsType: "object",
11
+ });
12
+ }
13
+ create(options) {
14
+ const { model, position, dimension, rotation, alpha } = options;
15
+ const mpEntity = new alt.Object(model, position, rotation, alpha);
16
+ mpEntity.dimension = dimension;
17
+ const object = new AltVObject_1.AltVObject({ mpEntity });
18
+ this.registerBaseObject(object);
19
+ return object;
20
+ }
21
+ }
22
+ exports.AltVObjectsManager = AltVObjectsManager;
@@ -0,0 +1,8 @@
1
+ import { AltVEntity, IAltVEntityOptions } from "../entity/AltVEntity";
2
+ import Ped = AltVServer.Ped;
3
+ import { IPed } from "../../common";
4
+ export interface IAltVPedOptions extends IAltVEntityOptions<Ped> {
5
+ }
6
+ export declare class AltVPed extends AltVEntity<Ped> implements IPed {
7
+ constructor(options: IAltVPedOptions);
8
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AltVPed = void 0;
4
+ const AltVEntity_1 = require("../entity/AltVEntity");
5
+ class AltVPed extends AltVEntity_1.AltVEntity {
6
+ constructor(options) {
7
+ super(options);
8
+ }
9
+ }
10
+ exports.AltVPed = AltVPed;
@@ -0,0 +1,9 @@
1
+ import { IPedCreateOptions, IPedsManager } from "../../common";
2
+ import { AltVEntitiesManager } from "../entity/AltVEntitiesManager";
3
+ import { AltVPed } from "./AltVPed";
4
+ export interface IAltVPedCreateOptions extends IPedCreateOptions {
5
+ }
6
+ export declare class AltVPedsManager extends AltVEntitiesManager<AltVPed> implements IPedsManager {
7
+ constructor();
8
+ create(options: IAltVPedCreateOptions): AltVPed;
9
+ }