magicrealmsshared 0.6.42 → 1.0.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.
- package/dist/types/charcter.d.ts +1 -2
- package/dist/types/items.d.ts +2 -13
- package/dist/types/items.js +1 -4
- package/dist/types/junk.d.ts +16 -0
- package/dist/types/junk.js +24 -0
- package/package.json +5 -1
package/dist/types/charcter.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { GameItem, HeadGear
|
|
2
|
+
import { GameItem, HeadGear } from "./items";
|
|
3
3
|
import { ObjectWithId } from "./types";
|
|
4
4
|
export type Equipment<IDFormat, DateFormat> = {
|
|
5
5
|
head: HeadGear<IDFormat, DateFormat> | null;
|
|
6
|
-
manaCrystals: ManaCrytal<IDFormat, DateFormat>[];
|
|
7
6
|
};
|
|
8
7
|
export type GameCharacter<IDFormat, DateFormat> = ObjectWithId<IDFormat> & {
|
|
9
8
|
ownerId: IDFormat;
|
package/dist/types/items.d.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { ObjectWithId } from "./types";
|
|
2
2
|
export declare enum EItemTraitType {
|
|
3
|
-
|
|
4
|
-
MANA_CRYSTAL_MAX_HARD = 1001,
|
|
5
|
-
MANA_CRYSTAL_MAX_SOFT = 1002
|
|
3
|
+
TEST = -1
|
|
6
4
|
}
|
|
7
5
|
export type ItemTrait = {
|
|
8
6
|
type: EItemTraitType;
|
|
9
7
|
value: number;
|
|
10
8
|
};
|
|
11
9
|
export declare enum EGameItemType {
|
|
12
|
-
ManaCrytal = 1,
|
|
13
10
|
HeadGear = 10
|
|
14
11
|
}
|
|
15
12
|
type GameItemCommon<IDFormat, DateFormat> = ObjectWithId<IDFormat> & {
|
|
@@ -19,18 +16,10 @@ type GameItemCommon<IDFormat, DateFormat> = ObjectWithId<IDFormat> & {
|
|
|
19
16
|
desc: string;
|
|
20
17
|
traits: ItemTrait[];
|
|
21
18
|
};
|
|
22
|
-
export type ManaCrytal<IDFormat, DateFormat> = GameItemCommon<IDFormat, DateFormat> & {
|
|
23
|
-
type: EGameItemType.ManaCrytal;
|
|
24
|
-
color: number;
|
|
25
|
-
maxSoft: number;
|
|
26
|
-
maxHard: number;
|
|
27
|
-
current: number;
|
|
28
|
-
currentGain: number;
|
|
29
|
-
};
|
|
30
19
|
export type HeadGear<IDFormat, DateFormat> = GameItemCommon<IDFormat, DateFormat> & {
|
|
31
20
|
type: EGameItemType.HeadGear;
|
|
32
21
|
};
|
|
33
|
-
export type GameItem<IDFormat, DateFormat> = HeadGear<IDFormat, DateFormat
|
|
22
|
+
export type GameItem<IDFormat, DateFormat> = HeadGear<IDFormat, DateFormat>;
|
|
34
23
|
export type GameItemTemplate<IDFormat> = ObjectWithId<IDFormat> & {
|
|
35
24
|
name: string;
|
|
36
25
|
template: Omit<GameItem<IDFormat, any>, "_id" | "defVersion" | "creationDate">;
|
package/dist/types/items.js
CHANGED
|
@@ -3,12 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EGameItemType = exports.EItemTraitType = void 0;
|
|
4
4
|
var EItemTraitType;
|
|
5
5
|
(function (EItemTraitType) {
|
|
6
|
-
EItemTraitType[EItemTraitType["
|
|
7
|
-
EItemTraitType[EItemTraitType["MANA_CRYSTAL_MAX_HARD"] = 1001] = "MANA_CRYSTAL_MAX_HARD";
|
|
8
|
-
EItemTraitType[EItemTraitType["MANA_CRYSTAL_MAX_SOFT"] = 1002] = "MANA_CRYSTAL_MAX_SOFT";
|
|
6
|
+
EItemTraitType[EItemTraitType["TEST"] = -1] = "TEST";
|
|
9
7
|
})(EItemTraitType || (exports.EItemTraitType = EItemTraitType = {}));
|
|
10
8
|
var EGameItemType;
|
|
11
9
|
(function (EGameItemType) {
|
|
12
|
-
EGameItemType[EGameItemType["ManaCrytal"] = 1] = "ManaCrytal";
|
|
13
10
|
EGameItemType[EGameItemType["HeadGear"] = 10] = "HeadGear";
|
|
14
11
|
})(EGameItemType || (exports.EGameItemType = EGameItemType = {}));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const ResourceId: {
|
|
2
|
+
readonly STEEL: "steel";
|
|
3
|
+
readonly SILVER: "silver";
|
|
4
|
+
};
|
|
5
|
+
export type ResourceId = typeof ResourceId[keyof typeof ResourceId];
|
|
6
|
+
export type Resource = {
|
|
7
|
+
weight: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const Resources: Record<ResourceId, Resource>;
|
|
10
|
+
export type Junk = {
|
|
11
|
+
weight: number;
|
|
12
|
+
res: Partial<Record<ResourceId, number>>;
|
|
13
|
+
};
|
|
14
|
+
export declare const Junks: Record<string, Junk>;
|
|
15
|
+
export type InventoryJunk = {};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Junks = exports.Resources = void 0;
|
|
4
|
+
const ResourceId = {
|
|
5
|
+
STEEL: "steel",
|
|
6
|
+
SILVER: "silver",
|
|
7
|
+
};
|
|
8
|
+
exports.Resources = {
|
|
9
|
+
steel: {
|
|
10
|
+
weight: 5
|
|
11
|
+
},
|
|
12
|
+
silver: {
|
|
13
|
+
weight: 10
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
exports.Junks = {
|
|
17
|
+
test_1: {
|
|
18
|
+
weight: 0,
|
|
19
|
+
res: {
|
|
20
|
+
"steel": 15,
|
|
21
|
+
"silver": 2,
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magicrealmsshared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -44,6 +44,10 @@
|
|
|
44
44
|
"types": "./dist/types/items.d.ts",
|
|
45
45
|
"default": "./dist/types/items.js"
|
|
46
46
|
},
|
|
47
|
+
"./junk": {
|
|
48
|
+
"types": "./dist/types/junk.d.ts",
|
|
49
|
+
"default": "./dist/types/junk.js"
|
|
50
|
+
},
|
|
47
51
|
"./types": {
|
|
48
52
|
"types": "./dist/types/types.d.ts",
|
|
49
53
|
"default": "./dist/types/types.js"
|