@rpg-engine/shared 0.3.16 → 0.3.19

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 (124) hide show
  1. package/README.md +29 -29
  2. package/dist/constants/date.constants.d.ts +2 -2
  3. package/dist/constants/date.constants.js +5 -5
  4. package/dist/constants/npc.constants.d.ts +1 -1
  5. package/dist/constants/npc.constants.js +4 -4
  6. package/dist/constants/socket.constants.d.ts +2 -2
  7. package/dist/constants/socket.constants.js +6 -6
  8. package/dist/constants/world.constants.d.ts +10 -10
  9. package/dist/constants/world.constants.js +13 -13
  10. package/dist/helpers/skillHelpers.d.ts +5 -0
  11. package/dist/helpers/skillHelpers.d.ts.map +1 -0
  12. package/dist/helpers/skillHelpers.js +26 -0
  13. package/dist/helpers/skillHelpers.js.map +1 -0
  14. package/dist/index.d.ts +38 -37
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +54 -53
  17. package/dist/index.js.map +1 -1
  18. package/dist/libs/GridHelper.d.ts +11 -11
  19. package/dist/libs/GridHelper.js +37 -37
  20. package/dist/libs/MathHelper.d.ts +16 -16
  21. package/dist/libs/MathHelper.js +14 -14
  22. package/dist/libs/SocketHelper.d.ts +2 -2
  23. package/dist/libs/SocketHelper.js +14 -14
  24. package/dist/libs/TextHelper.d.ts +7 -7
  25. package/dist/libs/TextHelper.js +21 -21
  26. package/dist/libs/TypeHelper.d.ts +3 -3
  27. package/dist/libs/TypeHelper.js +16 -16
  28. package/dist/translations/app-rate.lang.json +38 -38
  29. package/dist/translations/assets.lang.json +82 -82
  30. package/dist/translations/auth.lang.json +182 -182
  31. package/dist/translations/email.lang.json +70 -70
  32. package/dist/translations/error.lang.json +18 -18
  33. package/dist/translations/form.lang.json +94 -94
  34. package/dist/translations/global.lang.json +90 -90
  35. package/dist/translations/logs.lang.json +6 -6
  36. package/dist/translations/onboarding.lang.d.ts +10 -10
  37. package/dist/translations/onboarding.lang.js +21 -21
  38. package/dist/translations/onboarding.lang.json +50 -50
  39. package/dist/translations/order.lang.json +90 -90
  40. package/dist/translations/search.lang.json +50 -50
  41. package/dist/translations/settings.lang.json +14 -14
  42. package/dist/translations/tabs.lang.json +22 -22
  43. package/dist/translations/users.lang.json +22 -22
  44. package/dist/translations/validation.lang.json +86 -86
  45. package/dist/types/animation.types.d.ts +16 -16
  46. package/dist/types/animation.types.js +2 -2
  47. package/dist/types/api.types.d.ts +21 -21
  48. package/dist/types/api.types.js +20 -20
  49. package/dist/types/asset.types.d.ts +6 -6
  50. package/dist/types/asset.types.js +2 -2
  51. package/dist/types/auth.types.d.ts +7 -7
  52. package/dist/types/auth.types.js +2 -2
  53. package/dist/types/battle.types.d.ts +33 -33
  54. package/dist/types/battle.types.js +17 -17
  55. package/dist/types/character.types.d.ts +134 -134
  56. package/dist/types/character.types.js +29 -29
  57. package/dist/types/chat.types.d.ts +30 -30
  58. package/dist/types/chat.types.js +14 -14
  59. package/dist/types/device.types.d.ts +24 -24
  60. package/dist/types/device.types.js +7 -7
  61. package/dist/types/entity.types.d.ts +20 -20
  62. package/dist/types/entity.types.js +14 -14
  63. package/dist/types/env.types.d.ts +5 -5
  64. package/dist/types/env.types.js +9 -9
  65. package/dist/types/equipment.types.d.ts +18 -0
  66. package/dist/types/equipment.types.d.ts.map +1 -0
  67. package/dist/types/{container.types.js → equipment.types.js} +3 -3
  68. package/dist/types/equipment.types.js.map +1 -0
  69. package/dist/types/googleOAuth.types.d.ts +47 -47
  70. package/dist/types/googleOAuth.types.js +2 -2
  71. package/dist/types/item.types.d.ts +148 -134
  72. package/dist/types/item.types.d.ts.map +1 -1
  73. package/dist/types/item.types.js +75 -72
  74. package/dist/types/item.types.js.map +1 -1
  75. package/dist/types/itemContainer.types.d.ts +52 -52
  76. package/dist/types/itemContainer.types.js +2 -2
  77. package/dist/types/maps.types.d.ts +17 -17
  78. package/dist/types/maps.types.js +10 -10
  79. package/dist/types/notification.types.d.ts +14 -14
  80. package/dist/types/notification.types.js +2 -2
  81. package/dist/types/npc.types.d.ts +104 -104
  82. package/dist/types/npc.types.js +35 -35
  83. package/dist/types/pagination.types.d.ts +13 -13
  84. package/dist/types/pagination.types.js +2 -2
  85. package/dist/types/places.types.d.ts +16 -16
  86. package/dist/types/places.types.js +9 -9
  87. package/dist/types/preloadScene.types.d.ts +4 -4
  88. package/dist/types/preloadScene.types.js +7 -7
  89. package/dist/types/resource.types.d.ts +5 -5
  90. package/dist/types/resource.types.js +2 -2
  91. package/dist/types/scene.types.d.ts +8 -8
  92. package/dist/types/scene.types.js +8 -8
  93. package/dist/types/skills.types.d.ts +44 -44
  94. package/dist/types/skills.types.js +12 -12
  95. package/dist/types/socket.types.d.ts +17 -17
  96. package/dist/types/socket.types.js +8 -8
  97. package/dist/types/tiled.types.d.ts +107 -107
  98. package/dist/types/tiled.types.js +13 -13
  99. package/dist/types/translation.types.d.ts +5 -5
  100. package/dist/types/translation.types.js +8 -8
  101. package/dist/types/ui.types.d.ts +8 -8
  102. package/dist/types/ui.types.js +7 -7
  103. package/dist/types/user.types.d.ts +101 -101
  104. package/dist/types/user.types.js +38 -38
  105. package/dist/types/validation.types.d.ts +9 -9
  106. package/dist/types/validation.types.js +2 -2
  107. package/dist/types/view.types.d.ts +14 -14
  108. package/dist/types/view.types.js +7 -7
  109. package/package.json +41 -41
  110. package/dist/libs/MapZipHelper.d.ts +0 -2
  111. package/dist/libs/MapZipHelper.d.ts.map +0 -1
  112. package/dist/libs/MapZipHelper.js +0 -27
  113. package/dist/libs/MapZipHelper.js.map +0 -1
  114. package/dist/types/container.types.d.ts +0 -9
  115. package/dist/types/container.types.d.ts.map +0 -1
  116. package/dist/types/container.types.js.map +0 -1
  117. package/dist/types/npcMetadata.types.d.ts +0 -7
  118. package/dist/types/npcMetadata.types.d.ts.map +0 -1
  119. package/dist/types/npcMetadata.types.js +0 -20
  120. package/dist/types/npcMetadata.types.js.map +0 -1
  121. package/dist/types/player.types.d.ts +0 -49
  122. package/dist/types/player.types.d.ts.map +0 -1
  123. package/dist/types/player.types.js +0 -14
  124. package/dist/types/player.types.js.map +0 -1
@@ -1,25 +1,25 @@
1
- import { Languages } from "./translation.types";
2
- interface IDeviceDetailedInfo {
3
- isVirtual: boolean;
4
- manufacturer: string;
5
- model: string;
6
- operatingSystem: string;
7
- osVersion: string;
8
- platform: string;
9
- }
10
- export interface IDeviceInfo {
11
- info: IDeviceDetailedInfo | null;
12
- screenOrientation: "landscape" | "portrait" | null;
13
- isAssetScreen: boolean | null;
14
- language: Languages | null;
15
- }
16
- export declare enum DeviceInfoActionTypes {
17
- updateDeviceInfo = "updateDeviceInfo"
18
- }
19
- export interface IDispatchUpdateDeviceInfo {
20
- type: DeviceInfoActionTypes.updateDeviceInfo;
21
- payload: IDeviceInfo;
22
- }
23
- export declare type DeviceAction = IDispatchUpdateDeviceInfo;
24
- export {};
1
+ import { Languages } from "./translation.types";
2
+ interface IDeviceDetailedInfo {
3
+ isVirtual: boolean;
4
+ manufacturer: string;
5
+ model: string;
6
+ operatingSystem: string;
7
+ osVersion: string;
8
+ platform: string;
9
+ }
10
+ export interface IDeviceInfo {
11
+ info: IDeviceDetailedInfo | null;
12
+ screenOrientation: "landscape" | "portrait" | null;
13
+ isAssetScreen: boolean | null;
14
+ language: Languages | null;
15
+ }
16
+ export declare enum DeviceInfoActionTypes {
17
+ updateDeviceInfo = "updateDeviceInfo"
18
+ }
19
+ export interface IDispatchUpdateDeviceInfo {
20
+ type: DeviceInfoActionTypes.updateDeviceInfo;
21
+ payload: IDeviceInfo;
22
+ }
23
+ export declare type DeviceAction = IDispatchUpdateDeviceInfo;
24
+ export {};
25
25
  //# sourceMappingURL=device.types.d.ts.map
@@ -1,8 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DeviceInfoActionTypes = void 0;
4
- var DeviceInfoActionTypes;
5
- (function (DeviceInfoActionTypes) {
6
- DeviceInfoActionTypes["updateDeviceInfo"] = "updateDeviceInfo";
7
- })(DeviceInfoActionTypes = exports.DeviceInfoActionTypes || (exports.DeviceInfoActionTypes = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeviceInfoActionTypes = void 0;
4
+ var DeviceInfoActionTypes;
5
+ (function (DeviceInfoActionTypes) {
6
+ DeviceInfoActionTypes["updateDeviceInfo"] = "updateDeviceInfo";
7
+ })(DeviceInfoActionTypes = exports.DeviceInfoActionTypes || (exports.DeviceInfoActionTypes = {}));
8
8
  //# sourceMappingURL=device.types.js.map
@@ -1,21 +1,21 @@
1
- export declare enum EntityType {
2
- Character = "Character",
3
- NPC = "NPC"
4
- }
5
- export declare enum EntityAttackType {
6
- Melee = "Melee",
7
- Ranged = "Ranged",
8
- None = "None"
9
- }
10
- export interface IEntitiesInView {
11
- [id: string]: IEntityInViewBasicInfo;
12
- }
13
- export interface IEntityInViewBasicInfo {
14
- id: string;
15
- type?: EntityType;
16
- name?: string;
17
- x?: number;
18
- y?: number;
19
- direction?: string;
20
- }
1
+ export declare enum EntityType {
2
+ Character = "Character",
3
+ NPC = "NPC"
4
+ }
5
+ export declare enum EntityAttackType {
6
+ Melee = "Melee",
7
+ Ranged = "Ranged",
8
+ None = "None"
9
+ }
10
+ export interface IEntitiesInView {
11
+ [id: string]: IEntityInViewBasicInfo;
12
+ }
13
+ export interface IEntityInViewBasicInfo {
14
+ id: string;
15
+ type?: EntityType;
16
+ name?: string;
17
+ x?: number;
18
+ y?: number;
19
+ direction?: string;
20
+ }
21
21
  //# sourceMappingURL=entity.types.d.ts.map
@@ -1,15 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EntityAttackType = exports.EntityType = void 0;
4
- var EntityType;
5
- (function (EntityType) {
6
- EntityType["Character"] = "Character";
7
- EntityType["NPC"] = "NPC";
8
- })(EntityType = exports.EntityType || (exports.EntityType = {}));
9
- var EntityAttackType;
10
- (function (EntityAttackType) {
11
- EntityAttackType["Melee"] = "Melee";
12
- EntityAttackType["Ranged"] = "Ranged";
13
- EntityAttackType["None"] = "None";
14
- })(EntityAttackType = exports.EntityAttackType || (exports.EntityAttackType = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EntityAttackType = exports.EntityType = void 0;
4
+ var EntityType;
5
+ (function (EntityType) {
6
+ EntityType["Character"] = "Character";
7
+ EntityType["NPC"] = "NPC";
8
+ })(EntityType = exports.EntityType || (exports.EntityType = {}));
9
+ var EntityAttackType;
10
+ (function (EntityAttackType) {
11
+ EntityAttackType["Melee"] = "Melee";
12
+ EntityAttackType["Ranged"] = "Ranged";
13
+ EntityAttackType["None"] = "None";
14
+ })(EntityAttackType = exports.EntityAttackType || (exports.EntityAttackType = {}));
15
15
  //# sourceMappingURL=entity.types.js.map
@@ -1,6 +1,6 @@
1
- export declare enum EnvType {
2
- Development = "Development",
3
- Staging = "Staging",
4
- Production = "Production"
5
- }
1
+ export declare enum EnvType {
2
+ Development = "Development",
3
+ Staging = "Staging",
4
+ Production = "Production"
5
+ }
6
6
  //# sourceMappingURL=env.types.d.ts.map
@@ -1,10 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EnvType = void 0;
4
- var EnvType;
5
- (function (EnvType) {
6
- EnvType["Development"] = "Development";
7
- EnvType["Staging"] = "Staging";
8
- EnvType["Production"] = "Production";
9
- })(EnvType = exports.EnvType || (exports.EnvType = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EnvType = void 0;
4
+ var EnvType;
5
+ (function (EnvType) {
6
+ EnvType["Development"] = "Development";
7
+ EnvType["Staging"] = "Staging";
8
+ EnvType["Production"] = "Production";
9
+ })(EnvType = exports.EnvType || (exports.EnvType = {}));
10
10
  //# sourceMappingURL=env.types.js.map
@@ -0,0 +1,18 @@
1
+ import { ICharacter } from "./character.types";
2
+ import { IItem } from "./item.types";
3
+ import { IItemContainer } from "./itemContainer.types";
4
+ import { IResource } from "./resource.types";
5
+ export interface IEquipementSet extends IResource {
6
+ owner?: ICharacter | string;
7
+ head?: IItem | string;
8
+ neck?: IItem | string;
9
+ leftHand?: IItem | string;
10
+ rightHand?: IItem | string;
11
+ ring?: IItem | string;
12
+ legs?: IItem | string;
13
+ boot?: IItem | string;
14
+ armor?: IItem | string;
15
+ acessory?: IItem | string;
16
+ inventory: IItemContainer | string;
17
+ }
18
+ //# sourceMappingURL=equipment.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equipment.types.d.ts","sourceRoot":"","sources":["../../src/types/equipment.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC7C,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC5B,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC1B,SAAS,EAAE,cAAc,GAAG,MAAM,CAAC;CACtC"}
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=container.types.js.map
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=equipment.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equipment.types.js","sourceRoot":"","sources":["../../src/types/equipment.types.ts"],"names":[],"mappings":""}
@@ -1,48 +1,48 @@
1
- export interface IGoogleConfig {
2
- clientID: string;
3
- clientSecret: string;
4
- redirectURI: string;
5
- }
6
- export interface IGoogleOAuthUrlResponse {
7
- googleOAuthUrl: string;
8
- }
9
- export interface IGoogleOAuthTokenPayload {
10
- access_token: string;
11
- id_token: string;
12
- expires_in: string;
13
- token_type: string;
14
- refresh_token: string;
15
- }
16
- export interface IGoogleOAuthUserInfoResponse {
17
- id: string;
18
- email: string;
19
- verified_email: boolean;
20
- name: string;
21
- given_name: string;
22
- family_name: string;
23
- picture: string;
24
- locale: string;
25
- }
26
- export interface IGoogleCapacitorOAuthResponse {
27
- email: string;
28
- familyName: string;
29
- givenName: string;
30
- id: string;
31
- imageUrl: string;
32
- name: string;
33
- authentication: IAuthentication;
34
- serverAuthCode: string;
35
- }
36
- export interface IAuthentication {
37
- accessToken: string;
38
- idToken: string;
39
- }
40
- export interface IGoogleOAuthIdTokenResponse extends IGoogleOAuthUserInfoResponse {
41
- iss: string;
42
- sub: string;
43
- azp: string;
44
- aud: string;
45
- iat: string;
46
- exp: string;
47
- }
1
+ export interface IGoogleConfig {
2
+ clientID: string;
3
+ clientSecret: string;
4
+ redirectURI: string;
5
+ }
6
+ export interface IGoogleOAuthUrlResponse {
7
+ googleOAuthUrl: string;
8
+ }
9
+ export interface IGoogleOAuthTokenPayload {
10
+ access_token: string;
11
+ id_token: string;
12
+ expires_in: string;
13
+ token_type: string;
14
+ refresh_token: string;
15
+ }
16
+ export interface IGoogleOAuthUserInfoResponse {
17
+ id: string;
18
+ email: string;
19
+ verified_email: boolean;
20
+ name: string;
21
+ given_name: string;
22
+ family_name: string;
23
+ picture: string;
24
+ locale: string;
25
+ }
26
+ export interface IGoogleCapacitorOAuthResponse {
27
+ email: string;
28
+ familyName: string;
29
+ givenName: string;
30
+ id: string;
31
+ imageUrl: string;
32
+ name: string;
33
+ authentication: IAuthentication;
34
+ serverAuthCode: string;
35
+ }
36
+ export interface IAuthentication {
37
+ accessToken: string;
38
+ idToken: string;
39
+ }
40
+ export interface IGoogleOAuthIdTokenResponse extends IGoogleOAuthUserInfoResponse {
41
+ iss: string;
42
+ sub: string;
43
+ azp: string;
44
+ aud: string;
45
+ iat: string;
46
+ exp: string;
47
+ }
48
48
  //# sourceMappingURL=googleOAuth.types.d.ts.map
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=googleOAuth.types.js.map
@@ -1,135 +1,149 @@
1
- import { ICharacter } from "./character.types";
2
- import { MapLayers } from "./maps.types";
3
- import { IResource } from "./resource.types";
4
- export interface IItem extends IResource {
5
- tiledId?: number;
6
- owner?: ICharacter | string;
7
- type: ItemType;
8
- subType: ItemSubType;
9
- name: string;
10
- description: string;
11
- fullDescription: string;
12
- key: string;
13
- textureAtlas: string;
14
- texturePath: string;
15
- textureKey: string;
16
- attack?: number;
17
- defense?: number;
18
- weight: number;
19
- allowedEquipSlotType: ItemSlotType[];
20
- isEquipable: boolean;
21
- equipSlotType?: ItemSlotType;
22
- isStackable: boolean;
23
- maxStackSize: number;
24
- stackQty?: number;
25
- isUsable: boolean;
26
- usableEffect?: string;
27
- isStorable: boolean;
28
- x?: number;
29
- y?: number;
30
- scene?: string;
31
- layer?: MapLayers;
32
- isSolid: boolean;
33
- isItemContainer?: boolean;
34
- itemContainer?: string;
35
- generateContainerSlots: number;
36
- }
37
- export declare enum ItemType {
38
- Weapon = "Weapon",
39
- Armor = "Armor",
40
- Accessory = "Accessory",
41
- Jewelry = "Jewelry",
42
- Consumable = "Consumable",
43
- CraftMaterial = "CraftMaterial",
44
- Quest = "Quest",
45
- Information = "Information",
46
- Tool = "Tool",
47
- Container = "Container",
48
- Other = "Other"
49
- }
50
- export declare enum ItemSubType {
51
- Accessory = "Accessory",
52
- Armor = "Armor",
53
- Axe = "Axe",
54
- Boot = "Boot",
55
- Bow = "Bow",
56
- Food = "Food",
57
- Glove = "Glove",
58
- Helmet = "Helmet",
59
- Magic = "Magic",
60
- Potion = "Potion",
61
- Shield = "Shield",
62
- Spear = "Spear",
63
- Staff = "Staff",
64
- Sword = "Sword",
65
- Other = "Other",
66
- DeadBody = "DeadBody",
67
- Dagger = "Dagger"
68
- }
69
- export declare enum ItemSlotType {
70
- Head = "Head",
71
- Neck = "Neck",
72
- Torso = "Torso",
73
- LeftHand = "LeftHand",
74
- RightHand = "RightHand",
75
- Waist = "Waist",
76
- Legs = "Legs",
77
- Feet = "Feet",
78
- Ring = "Ring",
79
- Accessory = "Accessory",
80
- Inventory = "Inventory"
81
- }
82
- export declare enum ItemSocketEvents {
83
- Update = "Update",
84
- Look = "Look",
85
- Equip = "Equip",
86
- Unequip = "Unequip",
87
- Pickup = "Pickup",
88
- Drop = "Drop",
89
- Use = "Use",
90
- GetItemInfo = "GetItemInfo",
91
- ReadItemInfo = "ReadItemInfo",
92
- ContainerOpen = "ContainerOpen",
93
- ContainerRead = "ContainerRead",
94
- ContainerTransfer = "ContainerTransfer"
95
- }
96
- export interface IGetItemInfo {
97
- id: string;
98
- fields: string[];
99
- }
100
- export interface IReadItemInfo {
101
- id: string;
102
- information: string;
103
- }
104
- export interface IItemUpdate {
105
- id: string;
106
- textureKey: string;
107
- textureAtlas: string;
108
- texturePath: string;
109
- type: ItemType;
110
- subType: ItemSubType;
111
- name: string;
112
- x: number;
113
- y: number;
114
- scene: string;
115
- layer: MapLayers;
116
- }
117
- export interface IItemsInView {
118
- [id: string]: IItemInViewBasicInfo;
119
- }
120
- export interface IItemInViewBasicInfo {
121
- id: string;
122
- x?: number;
123
- y?: number;
124
- }
125
- export declare const ActionsByItemType: {
126
- Equipment: ItemSocketEvents[];
127
- Consumable: ItemSocketEvents[];
128
- CraftMaterial: ItemSocketEvents[];
129
- Other: ItemSocketEvents[];
130
- };
131
- export interface IPayloadProps {
132
- item: IItem | null;
133
- actionType: ItemSocketEvents | string;
134
- }
1
+ import { ICharacter } from "./character.types";
2
+ import { MapLayers } from "./maps.types";
3
+ import { IResource } from "./resource.types";
4
+ export interface IItem extends IResource {
5
+ tiledId?: number;
6
+ owner?: ICharacter | string;
7
+ type: ItemType;
8
+ subType: ItemSubType;
9
+ name: string;
10
+ description: string;
11
+ fullDescription: string;
12
+ key: string;
13
+ textureAtlas: string;
14
+ texturePath: string;
15
+ textureKey: string;
16
+ attack?: number;
17
+ defense?: number;
18
+ weight: number;
19
+ allowedEquipSlotType: ItemSlotType[];
20
+ isEquipable: boolean;
21
+ equipSlotType?: ItemSlotType;
22
+ isStackable: boolean;
23
+ maxStackSize: number;
24
+ stackQty?: number;
25
+ isUsable: boolean;
26
+ usableEffect?: string;
27
+ isStorable: boolean;
28
+ x?: number;
29
+ y?: number;
30
+ scene?: string;
31
+ layer?: MapLayers;
32
+ isSolid: boolean;
33
+ isItemContainer?: boolean;
34
+ itemContainer?: string;
35
+ generateContainerSlots: number;
36
+ }
37
+ export declare enum ItemType {
38
+ Weapon = "Weapon",
39
+ Armor = "Armor",
40
+ Accessory = "Accessory",
41
+ Jewelry = "Jewelry",
42
+ Consumable = "Consumable",
43
+ CraftMaterial = "CraftMaterial",
44
+ Quest = "Quest",
45
+ Information = "Information",
46
+ Tool = "Tool",
47
+ Container = "Container",
48
+ Other = "Other"
49
+ }
50
+ export declare enum ItemSubType {
51
+ Accessory = "Accessory",
52
+ Armor = "Armor",
53
+ Axe = "Axe",
54
+ Boot = "Boot",
55
+ Bow = "Bow",
56
+ Food = "Food",
57
+ Glove = "Glove",
58
+ Helmet = "Helmet",
59
+ Magic = "Magic",
60
+ Potion = "Potion",
61
+ Shield = "Shield",
62
+ Spear = "Spear",
63
+ Staff = "Staff",
64
+ Sword = "Sword",
65
+ Other = "Other",
66
+ DeadBody = "DeadBody",
67
+ Dagger = "Dagger"
68
+ }
69
+ export declare enum ItemSlotType {
70
+ Head = "Head",
71
+ Neck = "Neck",
72
+ Torso = "Torso",
73
+ LeftHand = "LeftHand",
74
+ RightHand = "RightHand",
75
+ Waist = "Waist",
76
+ Legs = "Legs",
77
+ Feet = "Feet",
78
+ Ring = "Ring",
79
+ Accessory = "Accessory",
80
+ Inventory = "Inventory"
81
+ }
82
+ export declare enum ItemSocketEvents {
83
+ Update = "Update",
84
+ Look = "Look",
85
+ Equip = "Equip",
86
+ Unequip = "Unequip",
87
+ Pickup = "Pickup",
88
+ Drop = "Drop",
89
+ Use = "Use",
90
+ GetItemInfo = "GetItemInfo",
91
+ ReadItemInfo = "ReadItemInfo",
92
+ ContainerOpen = "ContainerOpen",
93
+ ContainerRead = "ContainerRead",
94
+ ContainerTransfer = "ContainerTransfer",
95
+ EquipmentAndInventoryUpdate = "EquipmentAndInventoryUpdate"
96
+ }
97
+ export interface IGetItemInfo {
98
+ id: string;
99
+ fields: string[];
100
+ }
101
+ export interface IReadItemInfo {
102
+ id: string;
103
+ information: string;
104
+ }
105
+ export interface IItemUpdate {
106
+ id: string;
107
+ textureKey: string;
108
+ textureAtlas: string;
109
+ texturePath: string;
110
+ type: ItemType;
111
+ subType: ItemSubType;
112
+ name: string;
113
+ x: number;
114
+ y: number;
115
+ scene: string;
116
+ layer: MapLayers;
117
+ }
118
+ export interface IItemsInView {
119
+ [id: string]: IItemInViewBasicInfo;
120
+ }
121
+ export interface IItemInViewBasicInfo {
122
+ id: string;
123
+ x?: number;
124
+ y?: number;
125
+ }
126
+ export declare const ActionsByItemType: {
127
+ Equipment: ItemSocketEvents[];
128
+ Consumable: ItemSocketEvents[];
129
+ CraftMaterial: ItemSocketEvents[];
130
+ Other: ItemSocketEvents[];
131
+ EquipmenSetItems: ItemSocketEvents[];
132
+ EquipmenSetContainer: ItemSocketEvents[];
133
+ };
134
+ export interface IPayloadProps {
135
+ item: IItem | null;
136
+ actionType: ItemSocketEvents | string;
137
+ }
138
+ export interface IEquipItemPayload {
139
+ itemId: string;
140
+ targetSlot: ItemSlotType;
141
+ }
142
+ export interface IUnequipItemPayload {
143
+ itemId: string;
144
+ }
145
+ export interface IEquipmentAndInventoryUpdatePayload {
146
+ equipment: object;
147
+ inventory: object;
148
+ }
135
149
  //# sourceMappingURL=item.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"item.types.d.ts","sourceRoot":"","sources":["../../src/types/item.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,WAAW,KAAM,SAAQ,SAAS;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAC5B,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,YAAY,EAAE,CAAC;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OA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