@rpg-engine/long-bow 0.2.1 → 0.2.4
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/index.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +68 -1
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +68 -2
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Item/Inventory/itemContainerHelper.ts +5 -1
- package/src/index.tsx +2 -0
- package/src/mocks/itemContainer.mocks.ts +35 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpg-engine/long-bow",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@rollup/plugin-image": "^2.1.1",
|
|
86
|
-
"@rpg-engine/shared": "^0.4.
|
|
86
|
+
"@rpg-engine/shared": "^0.4.22",
|
|
87
87
|
"dayjs": "^1.11.2",
|
|
88
88
|
"fs-extra": "^10.1.0",
|
|
89
89
|
"lodash": "^4.17.21",
|
|
@@ -34,11 +34,15 @@ export const generateContextMenu = (
|
|
|
34
34
|
case ItemType.Armor:
|
|
35
35
|
case ItemType.Accessory:
|
|
36
36
|
case ItemType.Jewelry:
|
|
37
|
-
case ItemType.Container:
|
|
38
37
|
contextActionMenu = generateContextMenuListOptions(
|
|
39
38
|
ActionsForInventory.Equipment
|
|
40
39
|
);
|
|
41
40
|
break;
|
|
41
|
+
case ItemType.Container:
|
|
42
|
+
contextActionMenu = generateContextMenuListOptions(
|
|
43
|
+
ActionsForInventory.Container
|
|
44
|
+
);
|
|
45
|
+
break;
|
|
42
46
|
case ItemType.Consumable:
|
|
43
47
|
contextActionMenu = generateContextMenuListOptions(
|
|
44
48
|
ActionsForInventory.Consumable
|
package/src/index.tsx
CHANGED
|
@@ -12,6 +12,7 @@ export * from './components/NPCDialog/NPCDialog';
|
|
|
12
12
|
export * from './components/NPCDialog/QuestionDialog/QuestionDialog';
|
|
13
13
|
export * from './components/ProgressBar';
|
|
14
14
|
export * from './components/PropertySelect/PropertySelect';
|
|
15
|
+
export * from './components/QuestInfo/QuestInfo';
|
|
15
16
|
export * from './components/RadioButton';
|
|
16
17
|
export * from './components/RangeSlider';
|
|
17
18
|
export * from './components/RPGUIContainer';
|
|
@@ -23,3 +24,4 @@ export * from './components/TextArea';
|
|
|
23
24
|
export * from './components/Truncate';
|
|
24
25
|
export * from './components/typography/DynamicText';
|
|
25
26
|
export { useEventListener } from './hooks/useEventListener';
|
|
27
|
+
|
|
@@ -224,6 +224,40 @@ export const items: IItem[] = [
|
|
|
224
224
|
// createdAt: '2022-06-04T03:18:09.335Z',
|
|
225
225
|
// updatedAt: '2022-06-04T18:16:49.056Z',
|
|
226
226
|
// },
|
|
227
|
+
{
|
|
228
|
+
_id: '392acek4j7c8e8002ff60404',
|
|
229
|
+
type: ItemType.Container,
|
|
230
|
+
subType: ItemSubType.Other,
|
|
231
|
+
textureAtlas: 'items',
|
|
232
|
+
allowedEquipSlotType: [ItemSlotType.Inventory],
|
|
233
|
+
isEquipable: false,
|
|
234
|
+
isStackable: true,
|
|
235
|
+
maxStackSize: 999,
|
|
236
|
+
stackQty: 32,
|
|
237
|
+
isUsable: false,
|
|
238
|
+
isStorable: true,
|
|
239
|
+
layer: 1,
|
|
240
|
+
isItemContainer: true,
|
|
241
|
+
isSolid: false,
|
|
242
|
+
key: 'bag',
|
|
243
|
+
texturePath: 'containers/bag.png',
|
|
244
|
+
textureKey: 'bag',
|
|
245
|
+
name: 'Bag',
|
|
246
|
+
generateContainerSlots: 10,
|
|
247
|
+
description:
|
|
248
|
+
'You see a bag. It has made using leather and it has 10 total slots.',
|
|
249
|
+
attack: 7,
|
|
250
|
+
defense: 3,
|
|
251
|
+
weight: 13,
|
|
252
|
+
tiledId: 67,
|
|
253
|
+
x: 320,
|
|
254
|
+
y: 144,
|
|
255
|
+
scene: 'MainScene',
|
|
256
|
+
fullDescription:
|
|
257
|
+
'You see a bag. It has made using leather and it has 10 total slots.',
|
|
258
|
+
createdAt: '2022-06-04T03:18:09.335Z',
|
|
259
|
+
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
260
|
+
},
|
|
227
261
|
];
|
|
228
262
|
|
|
229
263
|
export const itemContainerMock: IItemContainer = {
|
|
@@ -238,7 +272,7 @@ export const itemContainerMock: IItemContainer = {
|
|
|
238
272
|
3: items[3],
|
|
239
273
|
4: items[4],
|
|
240
274
|
5: items[5],
|
|
241
|
-
|
|
275
|
+
6: items[6],
|
|
242
276
|
//remaining slots are considered null by default
|
|
243
277
|
},
|
|
244
278
|
allowedItemTypes: [],
|