@rpg-engine/shared 0.6.82 → 0.6.84

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 (120) 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/deviceHelpers.d.ts +2 -2
  11. package/dist/helpers/deviceHelpers.js +26 -24
  12. package/dist/helpers/deviceHelpers.js.map +1 -1
  13. package/dist/helpers/itemSlotHelper.d.ts +6 -6
  14. package/dist/helpers/itemSlotHelper.js +21 -21
  15. package/dist/helpers/skillHelpers.d.ts +4 -4
  16. package/dist/helpers/skillHelpers.js +25 -25
  17. package/dist/index.d.ts +48 -48
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +64 -64
  20. package/dist/index.js.map +1 -1
  21. package/dist/libs/GridHelper.d.ts +11 -11
  22. package/dist/libs/GridHelper.js +37 -37
  23. package/dist/libs/MathHelper.d.ts +16 -16
  24. package/dist/libs/MathHelper.js +14 -14
  25. package/dist/libs/SocketHelper.d.ts +2 -2
  26. package/dist/libs/SocketHelper.js +14 -14
  27. package/dist/libs/TextHelper.d.ts +7 -7
  28. package/dist/libs/TextHelper.js +21 -21
  29. package/dist/libs/TypeHelper.d.ts +3 -3
  30. package/dist/libs/TypeHelper.js +16 -16
  31. package/dist/translations/app-rate.lang.json +38 -38
  32. package/dist/translations/assets.lang.json +82 -82
  33. package/dist/translations/auth.lang.json +182 -182
  34. package/dist/translations/email.lang.json +70 -70
  35. package/dist/translations/error.lang.json +18 -18
  36. package/dist/translations/form.lang.json +94 -94
  37. package/dist/translations/global.lang.json +90 -90
  38. package/dist/translations/logs.lang.json +6 -6
  39. package/dist/translations/onboarding.lang.d.ts +10 -10
  40. package/dist/translations/onboarding.lang.js +21 -21
  41. package/dist/translations/onboarding.lang.json +50 -50
  42. package/dist/translations/order.lang.json +90 -90
  43. package/dist/translations/search.lang.json +50 -50
  44. package/dist/translations/settings.lang.json +14 -14
  45. package/dist/translations/tabs.lang.json +22 -22
  46. package/dist/translations/users.lang.json +22 -22
  47. package/dist/translations/validation.lang.json +86 -86
  48. package/dist/types/animation.types.d.ts +61 -61
  49. package/dist/types/animation.types.js +38 -38
  50. package/dist/types/api.types.d.ts +21 -21
  51. package/dist/types/api.types.js +20 -20
  52. package/dist/types/asset.types.d.ts +6 -6
  53. package/dist/types/asset.types.js +2 -2
  54. package/dist/types/auth.types.d.ts +7 -7
  55. package/dist/types/auth.types.js +2 -2
  56. package/dist/types/battle.types.d.ts +40 -40
  57. package/dist/types/battle.types.js +18 -18
  58. package/dist/types/character.types.d.ts +203 -203
  59. package/dist/types/character.types.js +52 -52
  60. package/dist/types/chat.types.d.ts +30 -30
  61. package/dist/types/chat.types.js +14 -14
  62. package/dist/types/depot.types.d.ts +18 -18
  63. package/dist/types/depot.types.js +9 -9
  64. package/dist/types/device.types.d.ts +24 -24
  65. package/dist/types/device.types.js +7 -7
  66. package/dist/types/entity.types.d.ts +30 -30
  67. package/dist/types/entity.types.js +20 -20
  68. package/dist/types/env.types.d.ts +5 -5
  69. package/dist/types/env.types.js +9 -9
  70. package/dist/types/equipment.types.d.ts +35 -35
  71. package/dist/types/equipment.types.js +18 -18
  72. package/dist/types/googleOAuth.types.d.ts +47 -47
  73. package/dist/types/googleOAuth.types.js +2 -2
  74. package/dist/types/inventory.types.d.ts +7 -7
  75. package/dist/types/inventory.types.js +2 -2
  76. package/dist/types/item.types.d.ts +242 -242
  77. package/dist/types/item.types.js +138 -138
  78. package/dist/types/itemContainer.types.d.ts +82 -82
  79. package/dist/types/itemContainer.types.js +10 -10
  80. package/dist/types/maps.types.d.ts +82 -82
  81. package/dist/types/maps.types.js +81 -81
  82. package/dist/types/notification.types.d.ts +14 -14
  83. package/dist/types/notification.types.js +2 -2
  84. package/dist/types/npc.types.d.ts +151 -151
  85. package/dist/types/npc.types.js +48 -48
  86. package/dist/types/pagination.types.d.ts +13 -13
  87. package/dist/types/pagination.types.js +2 -2
  88. package/dist/types/places.types.d.ts +16 -16
  89. package/dist/types/places.types.js +9 -9
  90. package/dist/types/preloadScene.types.d.ts +4 -4
  91. package/dist/types/preloadScene.types.js +7 -7
  92. package/dist/types/quest.types.d.ts +74 -74
  93. package/dist/types/quest.types.js +21 -21
  94. package/dist/types/resource.types.d.ts +5 -5
  95. package/dist/types/resource.types.js +2 -2
  96. package/dist/types/scene.types.d.ts +8 -8
  97. package/dist/types/scene.types.js +8 -8
  98. package/dist/types/skills.types.d.ts +126 -126
  99. package/dist/types/skills.types.js +85 -85
  100. package/dist/types/socket.types.d.ts +17 -17
  101. package/dist/types/socket.types.js +8 -8
  102. package/dist/types/spell.types.d.ts +20 -20
  103. package/dist/types/spell.types.js +8 -8
  104. package/dist/types/tiled.types.d.ts +119 -119
  105. package/dist/types/tiled.types.js +7 -7
  106. package/dist/types/trade.types.d.ts +41 -41
  107. package/dist/types/trade.types.js +8 -8
  108. package/dist/types/translation.types.d.ts +5 -5
  109. package/dist/types/translation.types.js +8 -8
  110. package/dist/types/ui.types.d.ts +8 -8
  111. package/dist/types/ui.types.js +7 -7
  112. package/dist/types/useWith.types.d.ts +25 -25
  113. package/dist/types/useWith.types.js +9 -9
  114. package/dist/types/user.types.d.ts +101 -101
  115. package/dist/types/user.types.js +38 -38
  116. package/dist/types/validation.types.d.ts +9 -9
  117. package/dist/types/validation.types.js +2 -2
  118. package/dist/types/view.types.d.ts +14 -14
  119. package/dist/types/view.types.js +7 -7
  120. package/package.json +42 -42
@@ -1,243 +1,243 @@
1
- import { ICharacter } from "./character.types";
2
- import { EntityAttackType } from "./entity.types";
3
- import { IEquipmentSet } from "./equipment.types";
4
- import { IItemContainer } from "./itemContainer.types";
5
- import { MapLayers } from "./maps.types";
6
- import { IResource } from "./resource.types";
7
- export interface IItem extends IResource {
8
- tiledId?: number;
9
- owner?: ICharacter | string;
10
- type: ItemType;
11
- subType: ItemSubType;
12
- name: string;
13
- description: string;
14
- fullDescription: string;
15
- key: string;
16
- textureAtlas: string;
17
- texturePath: string;
18
- textureKey: string;
19
- attack?: number;
20
- defense?: number;
21
- weight: number;
22
- rarity: string;
23
- allowedEquipSlotType: ItemSlotType[];
24
- isEquipable: boolean;
25
- isStackable: boolean;
26
- isTwoHanded: boolean;
27
- hasUseWith: boolean;
28
- maxStackSize: number;
29
- stackQty?: number;
30
- isUsable: boolean;
31
- usableEffect?: string;
32
- isStorable: boolean;
33
- x?: number;
34
- y?: number;
35
- scene?: string;
36
- layer?: MapLayers;
37
- isSolid: boolean;
38
- isItemContainer: boolean;
39
- itemContainer?: string | IItemContainer;
40
- generateContainerSlots?: number;
41
- decayTime?: Date;
42
- maxRange?: number;
43
- requiredAmmoKeys?: string[];
44
- rangeType?: EntityAttackType;
45
- }
46
- export declare enum ItemType {
47
- Weapon = "Weapon",
48
- Armor = "Armor",
49
- Accessory = "Accessory",
50
- Jewelry = "Jewelry",
51
- Consumable = "Consumable",
52
- Quest = "Quest",
53
- Information = "Information",
54
- Tool = "Tool",
55
- Container = "Container",
56
- Other = "Other",
57
- CraftingResource = "CraftingResource"
58
- }
59
- export declare enum ItemRarities {
60
- Common = "Common",
61
- Uncommon = "Uncommon",
62
- Rare = "Rare",
63
- Epic = "Epic",
64
- Legendary = "Legendary"
65
- }
66
- export declare enum ItemSubType {
67
- Accessory = "Accessory",
68
- CraftingResource = "CraftingResource",
69
- Armor = "Armor",
70
- Legs = "Legs",
71
- Axe = "Axe",
72
- Boot = "Boot",
73
- Ranged = "Ranged",
74
- Food = "Food",
75
- Glove = "Glove",
76
- Helmet = "Helmet",
77
- Magic = "Magic",
78
- Potion = "Potion",
79
- Shield = "Shield",
80
- Spear = "Spear",
81
- Staff = "Staff",
82
- Sword = "Sword",
83
- Other = "Other",
84
- DeadBody = "DeadBody",
85
- Dagger = "Dagger",
86
- Mace = "Mace",
87
- Tool = "Tool",
88
- Book = "Book"
89
- }
90
- export declare enum ItemSlotType {
91
- Head = "Head",
92
- Neck = "Neck",
93
- Torso = "Torso",
94
- LeftHand = "LeftHand",
95
- RightHand = "RightHand",
96
- Waist = "Waist",
97
- Legs = "Legs",
98
- Feet = "Feet",
99
- Ring = "Ring",
100
- Accessory = "Accessory",
101
- Inventory = "Inventory"
102
- }
103
- export declare enum ItemSocketEvents {
104
- Update = "Update",
105
- UpdateAll = "UpdateAll",
106
- Look = "Look",
107
- Equip = "Equip",
108
- Unequip = "Unequip",
109
- Pickup = "Pickup",
110
- Drop = "Drop",
111
- Move = "Move",
112
- Use = "Use",
113
- UseWith = "Use with...",
114
- GetItemInfo = "GetItemInfo",
115
- ReadItemInfo = "ReadItemInfo",
116
- ContainerOpen = "ContainerOpen",
117
- ContainerRead = "ContainerRead",
118
- ContainerTransfer = "ContainerTransfer",
119
- EquipmentAndInventoryUpdate = "EquipmentAndInventoryUpdate",
120
- RangedAttack = "RangedAttack",
121
- Buy = "Buy",
122
- Sell = "Sell",
123
- InventoryOpen = "InventoryOpen",
124
- LoadCraftBook = "LoadCraftBook",
125
- CraftableItems = "CraftableItems",
126
- CraftItem = "CraftItem"
127
- }
128
- interface IStringIndex {
129
- [key: string]: any;
130
- }
131
- export declare const ItemSocketEventsDisplayLabels: IStringIndex;
132
- export interface IGetItemInfo {
133
- id: string;
134
- fields: string[];
135
- }
136
- export interface IReadItemInfo {
137
- id: string;
138
- information: string;
139
- }
140
- export interface IItemUpdate {
141
- id: string;
142
- textureAtlas: string;
143
- texturePath: string;
144
- type: ItemType;
145
- subType: ItemSubType;
146
- name: string;
147
- x: number;
148
- y: number;
149
- scene?: string;
150
- layer: MapLayers;
151
- stackQty: number;
152
- isStackable?: boolean;
153
- }
154
- export interface IItemUpdateAll {
155
- items: IItemUpdate[];
156
- }
157
- export interface IItemsInView {
158
- [id: string]: IItemInViewBasicInfo;
159
- }
160
- export interface IItemInViewBasicInfo {
161
- id: string;
162
- x?: number;
163
- y?: number;
164
- }
165
- export declare const ActionsForInventory: {
166
- Equipment: ItemSocketEvents[];
167
- Consumable: ItemSocketEvents[];
168
- CraftingResource: ItemSocketEvents[];
169
- Tool: ItemSocketEvents[];
170
- Other: ItemSocketEvents[];
171
- Container: ItemSocketEvents[];
172
- };
173
- export declare const ActionsForLoot: {
174
- Equipment: ItemSocketEvents[];
175
- Consumable: ItemSocketEvents[];
176
- CraftingResource: ItemSocketEvents[];
177
- Tool: ItemSocketEvents[];
178
- Other: ItemSocketEvents[];
179
- };
180
- export declare const ActionsForEquipmentSet: {
181
- Equipment: ItemSocketEvents[];
182
- Container: ItemSocketEvents[];
183
- };
184
- export declare const ActionsForMapContainer: {
185
- Equipment: ItemSocketEvents[];
186
- Consumable: ItemSocketEvents[];
187
- CraftingResource: ItemSocketEvents[];
188
- Tool: ItemSocketEvents[];
189
- Other: ItemSocketEvents[];
190
- };
191
- export interface IPayloadProps {
192
- item: IItem | null;
193
- actionType: ItemSocketEvents | string;
194
- }
195
- export interface IEquipItemPayload {
196
- itemId: string;
197
- itemContainerId: string;
198
- }
199
- export interface IUnequipItemPayload {
200
- itemId: string;
201
- }
202
- export interface IEquipmentAndInventoryUpdatePayload {
203
- equipment?: IEquipmentSet;
204
- inventory?: IItemContainer;
205
- openEquipmentSetOnUpdate?: boolean;
206
- openInventoryOnUpdate?: boolean;
207
- }
208
- export declare type Direction = "down" | "up" | "left" | "right" | "down_right" | "down_left" | "up_right" | "up_left";
209
- export interface IRangedAttack {
210
- attackerId: string;
211
- targetId: string;
212
- direction: Direction;
213
- ammoKey?: string;
214
- type?: string;
215
- }
216
- export interface IUseItemPayload {
217
- itemId: string;
218
- }
219
- export declare enum SpellCastingType {
220
- SelfCasting = "self-casting",
221
- RangedCasting = "ranged-casting"
222
- }
223
- export interface ILoadCraftBookPayload {
224
- itemSubType: string;
225
- }
226
- export interface ICraftItemPayload {
227
- itemKey: string;
228
- }
229
- export interface ICraftableItemIngredient {
230
- key: string;
231
- name: string;
232
- qty: number;
233
- texturePath: string;
234
- }
235
- export interface ICraftableItem {
236
- key: string;
237
- name: string;
238
- canCraft: boolean;
239
- texturePath: string;
240
- ingredients: ICraftableItemIngredient[];
241
- }
242
- export {};
1
+ import { ICharacter } from "./character.types";
2
+ import { EntityAttackType } from "./entity.types";
3
+ import { IEquipmentSet } from "./equipment.types";
4
+ import { IItemContainer } from "./itemContainer.types";
5
+ import { MapLayers } from "./maps.types";
6
+ import { IResource } from "./resource.types";
7
+ export interface IItem extends IResource {
8
+ tiledId?: number;
9
+ owner?: ICharacter | string;
10
+ type: ItemType;
11
+ subType: ItemSubType;
12
+ name: string;
13
+ description: string;
14
+ fullDescription: string;
15
+ key: string;
16
+ textureAtlas: string;
17
+ texturePath: string;
18
+ textureKey: string;
19
+ attack?: number;
20
+ defense?: number;
21
+ weight: number;
22
+ rarity: string;
23
+ allowedEquipSlotType: ItemSlotType[];
24
+ isEquipable: boolean;
25
+ isStackable: boolean;
26
+ isTwoHanded: boolean;
27
+ hasUseWith: boolean;
28
+ maxStackSize: number;
29
+ stackQty?: number;
30
+ isUsable: boolean;
31
+ usableEffect?: string;
32
+ isStorable: boolean;
33
+ x?: number;
34
+ y?: number;
35
+ scene?: string;
36
+ layer?: MapLayers;
37
+ isSolid: boolean;
38
+ isItemContainer: boolean;
39
+ itemContainer?: string | IItemContainer;
40
+ generateContainerSlots?: number;
41
+ decayTime?: Date;
42
+ maxRange?: number;
43
+ requiredAmmoKeys?: string[];
44
+ rangeType?: EntityAttackType;
45
+ }
46
+ export declare enum ItemType {
47
+ Weapon = "Weapon",
48
+ Armor = "Armor",
49
+ Accessory = "Accessory",
50
+ Jewelry = "Jewelry",
51
+ Consumable = "Consumable",
52
+ Quest = "Quest",
53
+ Information = "Information",
54
+ Tool = "Tool",
55
+ Container = "Container",
56
+ Other = "Other",
57
+ CraftingResource = "CraftingResource"
58
+ }
59
+ export declare enum ItemRarities {
60
+ Common = "Common",
61
+ Uncommon = "Uncommon",
62
+ Rare = "Rare",
63
+ Epic = "Epic",
64
+ Legendary = "Legendary"
65
+ }
66
+ export declare enum ItemSubType {
67
+ Accessory = "Accessory",
68
+ CraftingResource = "CraftingResource",
69
+ Armor = "Armor",
70
+ Legs = "Legs",
71
+ Axe = "Axe",
72
+ Boot = "Boot",
73
+ Ranged = "Ranged",
74
+ Food = "Food",
75
+ Glove = "Glove",
76
+ Helmet = "Helmet",
77
+ Magic = "Magic",
78
+ Potion = "Potion",
79
+ Shield = "Shield",
80
+ Spear = "Spear",
81
+ Staff = "Staff",
82
+ Sword = "Sword",
83
+ Other = "Other",
84
+ DeadBody = "DeadBody",
85
+ Dagger = "Dagger",
86
+ Mace = "Mace",
87
+ Tool = "Tool",
88
+ Book = "Book"
89
+ }
90
+ export declare enum ItemSlotType {
91
+ Head = "Head",
92
+ Neck = "Neck",
93
+ Torso = "Torso",
94
+ LeftHand = "LeftHand",
95
+ RightHand = "RightHand",
96
+ Waist = "Waist",
97
+ Legs = "Legs",
98
+ Feet = "Feet",
99
+ Ring = "Ring",
100
+ Accessory = "Accessory",
101
+ Inventory = "Inventory"
102
+ }
103
+ export declare enum ItemSocketEvents {
104
+ Update = "Update",
105
+ UpdateAll = "UpdateAll",
106
+ Look = "Look",
107
+ Equip = "Equip",
108
+ Unequip = "Unequip",
109
+ Pickup = "Pickup",
110
+ Drop = "Drop",
111
+ Move = "Move",
112
+ Use = "Use",
113
+ UseWith = "Use with...",
114
+ GetItemInfo = "GetItemInfo",
115
+ ReadItemInfo = "ReadItemInfo",
116
+ ContainerOpen = "ContainerOpen",
117
+ ContainerRead = "ContainerRead",
118
+ ContainerTransfer = "ContainerTransfer",
119
+ EquipmentAndInventoryUpdate = "EquipmentAndInventoryUpdate",
120
+ RangedAttack = "RangedAttack",
121
+ Buy = "Buy",
122
+ Sell = "Sell",
123
+ InventoryOpen = "InventoryOpen",
124
+ LoadCraftBook = "LoadCraftBook",
125
+ CraftableItems = "CraftableItems",
126
+ CraftItem = "CraftItem"
127
+ }
128
+ interface IStringIndex {
129
+ [key: string]: any;
130
+ }
131
+ export declare const ItemSocketEventsDisplayLabels: IStringIndex;
132
+ export interface IGetItemInfo {
133
+ id: string;
134
+ fields: string[];
135
+ }
136
+ export interface IReadItemInfo {
137
+ id: string;
138
+ information: string;
139
+ }
140
+ export interface IItemUpdate {
141
+ id: string;
142
+ textureAtlas: string;
143
+ texturePath: string;
144
+ type: ItemType;
145
+ subType: ItemSubType;
146
+ name: string;
147
+ x: number;
148
+ y: number;
149
+ scene?: string;
150
+ layer: MapLayers;
151
+ stackQty: number;
152
+ isStackable?: boolean;
153
+ }
154
+ export interface IItemUpdateAll {
155
+ items: IItemUpdate[];
156
+ }
157
+ export interface IItemsInView {
158
+ [id: string]: IItemInViewBasicInfo;
159
+ }
160
+ export interface IItemInViewBasicInfo {
161
+ id: string;
162
+ x?: number;
163
+ y?: number;
164
+ }
165
+ export declare const ActionsForInventory: {
166
+ Equipment: ItemSocketEvents[];
167
+ Consumable: ItemSocketEvents[];
168
+ CraftingResource: ItemSocketEvents[];
169
+ Tool: ItemSocketEvents[];
170
+ Other: ItemSocketEvents[];
171
+ Container: ItemSocketEvents[];
172
+ };
173
+ export declare const ActionsForLoot: {
174
+ Equipment: ItemSocketEvents[];
175
+ Consumable: ItemSocketEvents[];
176
+ CraftingResource: ItemSocketEvents[];
177
+ Tool: ItemSocketEvents[];
178
+ Other: ItemSocketEvents[];
179
+ };
180
+ export declare const ActionsForEquipmentSet: {
181
+ Equipment: ItemSocketEvents[];
182
+ Container: ItemSocketEvents[];
183
+ };
184
+ export declare const ActionsForMapContainer: {
185
+ Equipment: ItemSocketEvents[];
186
+ Consumable: ItemSocketEvents[];
187
+ CraftingResource: ItemSocketEvents[];
188
+ Tool: ItemSocketEvents[];
189
+ Other: ItemSocketEvents[];
190
+ };
191
+ export interface IPayloadProps {
192
+ item: IItem | null;
193
+ actionType: ItemSocketEvents | string;
194
+ }
195
+ export interface IEquipItemPayload {
196
+ itemId: string;
197
+ itemContainerId: string;
198
+ }
199
+ export interface IUnequipItemPayload {
200
+ itemId: string;
201
+ }
202
+ export interface IEquipmentAndInventoryUpdatePayload {
203
+ equipment?: IEquipmentSet;
204
+ inventory?: IItemContainer;
205
+ openEquipmentSetOnUpdate?: boolean;
206
+ openInventoryOnUpdate?: boolean;
207
+ }
208
+ export declare type Direction = "down" | "up" | "left" | "right" | "down_right" | "down_left" | "up_right" | "up_left";
209
+ export interface IRangedAttack {
210
+ attackerId: string;
211
+ targetId: string;
212
+ direction: Direction;
213
+ ammoKey?: string;
214
+ type?: string;
215
+ }
216
+ export interface IUseItemPayload {
217
+ itemId: string;
218
+ }
219
+ export declare enum SpellCastingType {
220
+ SelfCasting = "self-casting",
221
+ RangedCasting = "ranged-casting"
222
+ }
223
+ export interface ILoadCraftBookPayload {
224
+ itemSubType: string;
225
+ }
226
+ export interface ICraftItemPayload {
227
+ itemKey: string;
228
+ }
229
+ export interface ICraftableItemIngredient {
230
+ key: string;
231
+ name: string;
232
+ qty: number;
233
+ texturePath: string;
234
+ }
235
+ export interface ICraftableItem {
236
+ key: string;
237
+ name: string;
238
+ canCraft: boolean;
239
+ texturePath: string;
240
+ ingredients: ICraftableItemIngredient[];
241
+ }
242
+ export {};
243
243
  //# sourceMappingURL=item.types.d.ts.map