@armoury/fivem-roleplay-gamemode-common 1.0.40 → 1.0.46
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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.House = void 0;
|
|
4
4
|
var House = /** @class */ (function () {
|
|
5
|
-
function House(id, owner, entrance, exit, originalValue, sellingPrice, rentPrice, requiredLevel) {
|
|
5
|
+
function House(id, owner, entrance, exit, originalValue, address, sellingPrice, rentPrice, requiredLevel, metadata) {
|
|
6
6
|
if (sellingPrice === void 0) { sellingPrice = 0; }
|
|
7
7
|
if (rentPrice === void 0) { rentPrice = 0; }
|
|
8
8
|
if (requiredLevel === void 0) { requiredLevel = 1; }
|
|
@@ -11,9 +11,18 @@ var House = /** @class */ (function () {
|
|
|
11
11
|
this.entrance = entrance;
|
|
12
12
|
this.exit = exit;
|
|
13
13
|
this.originalValue = originalValue;
|
|
14
|
+
this.address = address;
|
|
14
15
|
this.sellingPrice = sellingPrice;
|
|
15
16
|
this.rentPrice = rentPrice;
|
|
16
17
|
this.requiredLevel = requiredLevel;
|
|
18
|
+
this.metadata = metadata;
|
|
19
|
+
metadata = {
|
|
20
|
+
isOwned: owner != null,
|
|
21
|
+
tenants: 0, // TODO: Implement this
|
|
22
|
+
maxTenants: 10, // TODO: Implement this
|
|
23
|
+
acceptsTenants: true, // TODO: Implement this
|
|
24
|
+
address: address,
|
|
25
|
+
};
|
|
17
26
|
}
|
|
18
27
|
House.toStub = function (house) {
|
|
19
28
|
return {
|
|
@@ -21,6 +30,7 @@ var House = /** @class */ (function () {
|
|
|
21
30
|
sellingPrice: house.sellingPrice,
|
|
22
31
|
rentPrice: house.rentPrice,
|
|
23
32
|
requiredLevel: house.requiredLevel,
|
|
33
|
+
metadata: house.metadata,
|
|
24
34
|
};
|
|
25
35
|
};
|
|
26
36
|
return House;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var House = /** @class */ (function () {
|
|
2
|
-
function House(id, owner, entrance, exit, originalValue, sellingPrice, rentPrice, requiredLevel) {
|
|
2
|
+
function House(id, owner, entrance, exit, originalValue, address, sellingPrice, rentPrice, requiredLevel, metadata) {
|
|
3
3
|
if (sellingPrice === void 0) { sellingPrice = 0; }
|
|
4
4
|
if (rentPrice === void 0) { rentPrice = 0; }
|
|
5
5
|
if (requiredLevel === void 0) { requiredLevel = 1; }
|
|
@@ -8,9 +8,18 @@ var House = /** @class */ (function () {
|
|
|
8
8
|
this.entrance = entrance;
|
|
9
9
|
this.exit = exit;
|
|
10
10
|
this.originalValue = originalValue;
|
|
11
|
+
this.address = address;
|
|
11
12
|
this.sellingPrice = sellingPrice;
|
|
12
13
|
this.rentPrice = rentPrice;
|
|
13
14
|
this.requiredLevel = requiredLevel;
|
|
15
|
+
this.metadata = metadata;
|
|
16
|
+
metadata = {
|
|
17
|
+
isOwned: owner != null,
|
|
18
|
+
tenants: 0, // TODO: Implement this
|
|
19
|
+
maxTenants: 10, // TODO: Implement this
|
|
20
|
+
acceptsTenants: true, // TODO: Implement this
|
|
21
|
+
address: address,
|
|
22
|
+
};
|
|
14
23
|
}
|
|
15
24
|
House.toStub = function (house) {
|
|
16
25
|
return {
|
|
@@ -18,6 +27,7 @@ var House = /** @class */ (function () {
|
|
|
18
27
|
sellingPrice: house.sellingPrice,
|
|
19
28
|
rentPrice: house.rentPrice,
|
|
20
29
|
requiredLevel: house.requiredLevel,
|
|
30
|
+
metadata: house.metadata,
|
|
21
31
|
};
|
|
22
32
|
};
|
|
23
33
|
return House;
|
|
@@ -8,6 +8,7 @@ export interface House {
|
|
|
8
8
|
readonly sellingPrice: number;
|
|
9
9
|
readonly rentPrice: number;
|
|
10
10
|
readonly requiredLevel: number;
|
|
11
|
+
readonly metadata?: HouseMetadata;
|
|
11
12
|
}
|
|
12
13
|
export declare class House {
|
|
13
14
|
readonly id: number;
|
|
@@ -15,12 +16,21 @@ export declare class House {
|
|
|
15
16
|
readonly entrance: Position;
|
|
16
17
|
readonly exit: Position;
|
|
17
18
|
readonly originalValue: number;
|
|
19
|
+
readonly address: string;
|
|
18
20
|
readonly sellingPrice: number;
|
|
19
21
|
readonly rentPrice: number;
|
|
20
22
|
readonly requiredLevel: number;
|
|
21
|
-
|
|
23
|
+
readonly metadata?: HouseMetadata;
|
|
24
|
+
constructor(id: number, owner: number | null, entrance: Position, exit: Position, originalValue: number, address: string, sellingPrice?: number, rentPrice?: number, requiredLevel?: number, metadata?: HouseMetadata);
|
|
22
25
|
static toStub(house: House): Stub<House>;
|
|
23
26
|
}
|
|
27
|
+
export interface HouseMetadata {
|
|
28
|
+
isOwned?: boolean;
|
|
29
|
+
tenants?: number;
|
|
30
|
+
maxTenants?: number;
|
|
31
|
+
acceptsTenants?: boolean;
|
|
32
|
+
address?: string;
|
|
33
|
+
}
|
|
24
34
|
type Position = {
|
|
25
35
|
x: number;
|
|
26
36
|
y: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { House } from './models/house/house';
|
|
1
|
+
import type { House, HouseMetadata } from './models/house/house';
|
|
2
2
|
declare module '@armoury/fivem-framework-common' {
|
|
3
3
|
interface StubFieldRegistry {
|
|
4
4
|
House: {
|
|
@@ -7,6 +7,7 @@ declare module '@armoury/fivem-framework-common' {
|
|
|
7
7
|
sellingPrice: number;
|
|
8
8
|
rentPrice: number;
|
|
9
9
|
requiredLevel: number;
|
|
10
|
+
metadata?: HouseMetadata;
|
|
10
11
|
};
|
|
11
12
|
};
|
|
12
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@armoury/fivem-roleplay-gamemode-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.46",
|
|
4
4
|
"description": "Shared APIs for the Armoury FiveM roleplay gamemode",
|
|
5
5
|
"main": "dist/cjs/shared/index.js",
|
|
6
6
|
"module": "dist/esm/shared/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"files": ["dist"],
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@armoury/fivem-framework-common": "^1.0.
|
|
17
|
+
"@armoury/fivem-framework-common": "^1.0.46"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "npm run build:cjs && npm run build:esm && npm run build:types",
|