magicrealmsshared 0.4.0 → 0.4.2
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/dist/types/charcter.d.ts +4 -17
- package/dist/types/charcter.js +0 -5
- package/dist/types/items.d.ts +22 -0
- package/dist/types/items.js +8 -0
- package/package.json +5 -1
package/dist/types/charcter.d.ts
CHANGED
|
@@ -1,26 +1,13 @@
|
|
|
1
|
+
import { GameItem, HeadGear, ManaCrytal } from "./items";
|
|
1
2
|
import { ObjectWithId } from "./types";
|
|
2
|
-
export type ItemTrait = {};
|
|
3
|
-
export declare enum EGameItemType {
|
|
4
|
-
ManaCrytal = 1
|
|
5
|
-
}
|
|
6
|
-
export type ManaCrytal = {
|
|
7
|
-
color: number;
|
|
8
|
-
capacity: number;
|
|
9
|
-
status: number;
|
|
10
|
-
};
|
|
11
|
-
export type GameItemType = ManaCrytal;
|
|
12
|
-
export type GameItem<IDFormat, DateFormat> = ObjectWithId<IDFormat> & ManaCrytal & {
|
|
13
|
-
creationDate: DateFormat;
|
|
14
|
-
name: string;
|
|
15
|
-
traits: ItemTrait[];
|
|
16
|
-
};
|
|
17
3
|
export type Equipment<IDFormat, DateFormat> = {
|
|
18
|
-
head:
|
|
19
|
-
manaCrystals:
|
|
4
|
+
head: HeadGear<IDFormat, DateFormat> | null;
|
|
5
|
+
manaCrystals: ManaCrytal<IDFormat, DateFormat>[];
|
|
20
6
|
};
|
|
21
7
|
export type GameCharacter<IDFormat, DateFormat> = ObjectWithId<IDFormat> & {
|
|
22
8
|
ownerId: IDFormat;
|
|
23
9
|
name: string;
|
|
24
10
|
creationDate: DateFormat;
|
|
25
11
|
equipment: Equipment<IDFormat, DateFormat>;
|
|
12
|
+
inventory: GameItem<IDFormat, DateFormat>[];
|
|
26
13
|
};
|
package/dist/types/charcter.js
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EGameItemType = void 0;
|
|
4
|
-
var EGameItemType;
|
|
5
|
-
(function (EGameItemType) {
|
|
6
|
-
EGameItemType[EGameItemType["ManaCrytal"] = 1] = "ManaCrytal";
|
|
7
|
-
})(EGameItemType || (exports.EGameItemType = EGameItemType = {}));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ObjectWithId } from "./types";
|
|
2
|
+
export type ItemTrait = {};
|
|
3
|
+
export declare enum EGameItemType {
|
|
4
|
+
ManaCrytal = 1,
|
|
5
|
+
HeadGear = 10
|
|
6
|
+
}
|
|
7
|
+
type GameItemCommon<IDFormat, DateFormat> = ObjectWithId<IDFormat> & {
|
|
8
|
+
creationDate: DateFormat;
|
|
9
|
+
name: string;
|
|
10
|
+
traits: ItemTrait[];
|
|
11
|
+
};
|
|
12
|
+
export type ManaCrytal<IDFormat, DateFormat> = GameItemCommon<IDFormat, DateFormat> & {
|
|
13
|
+
type: EGameItemType.ManaCrytal;
|
|
14
|
+
color: number;
|
|
15
|
+
capacity: number;
|
|
16
|
+
status: number;
|
|
17
|
+
};
|
|
18
|
+
export type HeadGear<IDFormat, DateFormat> = GameItemCommon<IDFormat, DateFormat> & {
|
|
19
|
+
type: EGameItemType.HeadGear;
|
|
20
|
+
};
|
|
21
|
+
export type GameItem<IDFormat, DateFormat> = HeadGear<IDFormat, DateFormat> | ManaCrytal<IDFormat, DateFormat>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EGameItemType = void 0;
|
|
4
|
+
var EGameItemType;
|
|
5
|
+
(function (EGameItemType) {
|
|
6
|
+
EGameItemType[EGameItemType["ManaCrytal"] = 1] = "ManaCrytal";
|
|
7
|
+
EGameItemType[EGameItemType["HeadGear"] = 10] = "HeadGear";
|
|
8
|
+
})(EGameItemType || (exports.EGameItemType = EGameItemType = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magicrealmsshared",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -36,6 +36,10 @@
|
|
|
36
36
|
"types": "./dist/geo/chunks.d.ts",
|
|
37
37
|
"default": "./dist/geo/chunks.js"
|
|
38
38
|
},
|
|
39
|
+
"./items": {
|
|
40
|
+
"types": "./dist/types/items.d.ts",
|
|
41
|
+
"default": "./dist/types/items.js"
|
|
42
|
+
},
|
|
39
43
|
"./types": {
|
|
40
44
|
"types": "./dist/types/types.d.ts",
|
|
41
45
|
"default": "./dist/types/types.js"
|