@armoury/fivem-framework-server 1.0.55 → 1.0.62

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.
@@ -23,6 +23,7 @@ const services_1 = require("./services");
23
23
  exports.SERVER_LAZY_PROVIDERS = [];
24
24
  exports.SERVER_EAGER_PROVIDERS = [
25
25
  services_1.Blip,
26
+ services_1.Entities,
26
27
  services_1.SessionService,
27
28
  services_1.PickupService,
28
29
  ];
@@ -38,4 +38,5 @@ exports.Blip = Blip;
38
38
  Blip._blipIds = [];
39
39
  exports.Blip = Blip = __decorate([
40
40
  (0, injection_js_1.Injectable)()
41
+ // TODO: For name consistency, rename to "Blips"
41
42
  ], Blip);
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ var Entities_1;
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.Entities = void 0;
17
+ const fivem_framework_common_1 = require("@armoury/fivem-framework-common");
18
+ const injection_js_1 = require("injection-js");
19
+ let Entities = Entities_1 = class Entities {
20
+ constructor(_armouryResourceRef) {
21
+ Entities_1._armouryResourceRef = _armouryResourceRef;
22
+ }
23
+ static setInteractionFlags(entity, flags) {
24
+ this._armouryResourceRef.instance.setInteractionFlagsForEntity(entity, flags);
25
+ }
26
+ };
27
+ exports.Entities = Entities;
28
+ exports.Entities = Entities = Entities_1 = __decorate([
29
+ (0, injection_js_1.Injectable)(),
30
+ __param(0, (0, fivem_framework_common_1.Resource)('armoury')),
31
+ __metadata("design:paramtypes", [fivem_framework_common_1.ResourceRef])
32
+ ], Entities);
@@ -14,6 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ /** Entities */
18
+ __exportStar(require("./entities/entity.service"), exports);
17
19
  /** Blips */
18
20
  __exportStar(require("./blips/blip.service"), exports);
19
21
  /** Session */
@@ -28,7 +28,9 @@ let PickupService = class PickupService {
28
28
  };
29
29
  exports.PickupService = PickupService;
30
30
  exports.PickupService = PickupService = __decorate([
31
- (0, injection_js_1.Injectable)(),
31
+ (0, injection_js_1.Injectable)()
32
+ // TODO: For consistency, make the methods static and rename this to "Pickups"
33
+ ,
32
34
  __param(0, (0, fivem_framework_common_1.Resource)('armoury')),
33
35
  __metadata("design:paramtypes", [fivem_framework_common_1.ResourceRef])
34
36
  ], PickupService);
@@ -1,10 +1,11 @@
1
1
  /// <reference path = "../ambient.declarations.d.ts" />
2
2
  import 'reflect-metadata';
3
3
  import { bootstrapWithProviders } from '@armoury/fivem-framework-common';
4
- import { Blip, PickupService, SessionService } from './services';
4
+ import { Blip, Entities, PickupService, SessionService } from './services';
5
5
  export const SERVER_LAZY_PROVIDERS = [];
6
6
  export const SERVER_EAGER_PROVIDERS = [
7
7
  Blip,
8
+ Entities,
8
9
  SessionService,
9
10
  PickupService,
10
11
  ];
@@ -34,5 +34,6 @@ let Blip = class Blip {
34
34
  Blip._blipIds = [];
35
35
  Blip = __decorate([
36
36
  Injectable()
37
+ // TODO: For name consistency, rename to "Blips"
37
38
  ], Blip);
38
39
  export { Blip };
@@ -0,0 +1,29 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
+ return function (target, key) { decorator(target, key, paramIndex); }
12
+ };
13
+ var Entities_1;
14
+ import { Resource, ResourceRef } from '@armoury/fivem-framework-common';
15
+ import { Injectable } from 'injection-js';
16
+ let Entities = Entities_1 = class Entities {
17
+ constructor(_armouryResourceRef) {
18
+ Entities_1._armouryResourceRef = _armouryResourceRef;
19
+ }
20
+ static setInteractionFlags(entity, flags) {
21
+ this._armouryResourceRef.instance.setInteractionFlagsForEntity(entity, flags);
22
+ }
23
+ };
24
+ Entities = Entities_1 = __decorate([
25
+ Injectable(),
26
+ __param(0, Resource('armoury')),
27
+ __metadata("design:paramtypes", [ResourceRef])
28
+ ], Entities);
29
+ export { Entities };
@@ -1,3 +1,5 @@
1
+ /** Entities */
2
+ export * from './entities/entity.service';
1
3
  /** Blips */
2
4
  export * from './blips/blip.service';
3
5
  /** Session */
@@ -24,7 +24,9 @@ let PickupService = class PickupService {
24
24
  }
25
25
  };
26
26
  PickupService = __decorate([
27
- Injectable(),
27
+ Injectable()
28
+ // TODO: For consistency, make the methods static and rename this to "Pickups"
29
+ ,
28
30
  __param(0, Resource('armoury')),
29
31
  __metadata("design:paramtypes", [ResourceRef])
30
32
  ], PickupService);
@@ -0,0 +1,6 @@
1
+ import { ResourceRef } from '@armoury/fivem-framework-common';
2
+ export declare class Entities {
3
+ private static _armouryResourceRef;
4
+ constructor(_armouryResourceRef: ResourceRef);
5
+ static setInteractionFlags(entity: number, flags: number): void;
6
+ }
@@ -1,3 +1,5 @@
1
+ /** Entities */
2
+ export * from './entities/entity.service';
1
3
  /** Blips */
2
4
  export * from './blips/blip.service';
3
5
  /** Session */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@armoury/fivem-framework-server",
3
- "version": "1.0.55",
3
+ "version": "1.0.62",
4
4
  "description": "Server APIs for the Armoury FiveM framework",
5
5
  "main": "dist/cjs/server/index.js",
6
6
  "module": "dist/esm/server/index.js",
@@ -27,7 +27,7 @@
27
27
  "rxjs": "^7.8.1"
28
28
  },
29
29
  "peerDependencies": {
30
- "@armoury/fivem-framework-common": "1.0.55"
30
+ "@armoury/fivem-framework-common": "1.0.62"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"