@rpg-engine/long-bow 0.2.24 → 0.2.25
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/libs/ItemSlotHelper.d.ts +2 -0
- package/dist/long-bow.cjs.development.js +791 -300
- 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 +791 -300
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Item/Inventory/ItemSlot.tsx +22 -3
- package/src/libs/ItemSlotHelper.ts +21 -0
- package/src/mocks/atlas/items/items.json +702 -246
- package/src/mocks/atlas/items/items.png +0 -0
- package/src/mocks/equipmentSet.mocks.ts +19 -14
- package/src/mocks/itemContainer.mocks.ts +226 -3
|
Binary file
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
// IItem,
|
|
4
4
|
ItemSlotType,
|
|
5
5
|
ItemSubType,
|
|
6
|
-
ItemType
|
|
6
|
+
ItemType
|
|
7
7
|
} from '@rpg-engine/shared';
|
|
8
8
|
|
|
9
9
|
export const items: any = {
|
|
@@ -224,25 +224,29 @@ export const items: any = {
|
|
|
224
224
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
225
225
|
},
|
|
226
226
|
accessory: {
|
|
227
|
-
_id: '
|
|
227
|
+
_id: '392acek4j7c8e80d2fs60404',
|
|
228
|
+
hasUseWith: false,
|
|
228
229
|
type: ItemType.Accessory,
|
|
229
|
-
subType: ItemSubType.
|
|
230
|
+
subType: ItemSubType.Ranged,
|
|
230
231
|
textureAtlas: 'items',
|
|
231
232
|
allowedEquipSlotType: [ItemSlotType.Accessory],
|
|
232
|
-
isEquipable:
|
|
233
|
-
isStackable:
|
|
233
|
+
isEquipable: true,
|
|
234
|
+
isStackable: true,
|
|
234
235
|
maxStackSize: 999,
|
|
235
|
-
|
|
236
|
+
stackQty: 275,
|
|
236
237
|
isUsable: false,
|
|
237
238
|
isStorable: true,
|
|
239
|
+
isTwoHanded: false,
|
|
238
240
|
layer: 1,
|
|
239
|
-
isItemContainer:
|
|
241
|
+
isItemContainer: true,
|
|
240
242
|
isSolid: false,
|
|
241
|
-
key: '
|
|
242
|
-
texturePath: '
|
|
243
|
-
textureKey: '
|
|
244
|
-
name: '
|
|
245
|
-
|
|
243
|
+
key: 'stone',
|
|
244
|
+
texturePath: 'ranged-weapons/stone-qty-1.png',
|
|
245
|
+
textureKey: 'stone',
|
|
246
|
+
name: 'stone',
|
|
247
|
+
generateContainerSlots: 10,
|
|
248
|
+
description:
|
|
249
|
+
'You see a stone. It is used with slingshot.',
|
|
246
250
|
attack: 7,
|
|
247
251
|
defense: 3,
|
|
248
252
|
weight: 13,
|
|
@@ -250,7 +254,8 @@ export const items: any = {
|
|
|
250
254
|
x: 320,
|
|
251
255
|
y: 144,
|
|
252
256
|
scene: 'MainScene',
|
|
253
|
-
fullDescription:
|
|
257
|
+
fullDescription:
|
|
258
|
+
'You see a stone. It is used with slingshot',
|
|
254
259
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
255
260
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
256
261
|
},
|
|
@@ -340,6 +345,6 @@ export const equipmentSetMock: IEquipmentSet = {
|
|
|
340
345
|
rightHand: undefined,
|
|
341
346
|
neck: undefined,
|
|
342
347
|
ring: undefined,
|
|
343
|
-
accessory:
|
|
348
|
+
accessory: items.accessory,
|
|
344
349
|
inventory: items.inventory,
|
|
345
350
|
};
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
IItemContainer,
|
|
4
4
|
ItemSlotType,
|
|
5
5
|
ItemSubType,
|
|
6
|
-
ItemType
|
|
6
|
+
ItemType
|
|
7
7
|
} from '@rpg-engine/shared';
|
|
8
8
|
|
|
9
9
|
export const items: IItem[] = [
|
|
@@ -205,7 +205,6 @@ export const items: IItem[] = [
|
|
|
205
205
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
206
206
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
207
207
|
},
|
|
208
|
-
|
|
209
208
|
{
|
|
210
209
|
_id: '392acek4j7c8e8002ff60404',
|
|
211
210
|
hasUseWith: false,
|
|
@@ -241,7 +240,223 @@ export const items: IItem[] = [
|
|
|
241
240
|
'You see a bag. It has made using leather and it has 10 total slots.',
|
|
242
241
|
createdAt: '2022-06-04T03:18:09.335Z',
|
|
243
242
|
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
244
|
-
},
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
_id: '392acek4j7c8e80d2ff60404',
|
|
246
|
+
hasUseWith: false,
|
|
247
|
+
type: ItemType.Accessory,
|
|
248
|
+
subType: ItemSubType.Ranged,
|
|
249
|
+
textureAtlas: 'items',
|
|
250
|
+
allowedEquipSlotType: [ItemSlotType.Accessory],
|
|
251
|
+
isEquipable: true,
|
|
252
|
+
isStackable: true,
|
|
253
|
+
maxStackSize: 999,
|
|
254
|
+
stackQty: 1,
|
|
255
|
+
isUsable: false,
|
|
256
|
+
isStorable: true,
|
|
257
|
+
isTwoHanded: false,
|
|
258
|
+
layer: 1,
|
|
259
|
+
isItemContainer: true,
|
|
260
|
+
isSolid: false,
|
|
261
|
+
key: 'stone',
|
|
262
|
+
texturePath: 'ranged-weapons/stone-qty-1.png',
|
|
263
|
+
textureKey: 'stone',
|
|
264
|
+
name: 'stone',
|
|
265
|
+
generateContainerSlots: 10,
|
|
266
|
+
description:
|
|
267
|
+
'You see a stone. It is used with slingshot.',
|
|
268
|
+
attack: 7,
|
|
269
|
+
defense: 3,
|
|
270
|
+
weight: 13,
|
|
271
|
+
tiledId: 67,
|
|
272
|
+
x: 320,
|
|
273
|
+
y: 144,
|
|
274
|
+
scene: 'MainScene',
|
|
275
|
+
fullDescription:
|
|
276
|
+
'You see a stone. It is used with slingshot',
|
|
277
|
+
createdAt: '2022-06-04T03:18:09.335Z',
|
|
278
|
+
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
_id: '392acek4j7c8e80d2fs60404',
|
|
282
|
+
hasUseWith: false,
|
|
283
|
+
type: ItemType.Accessory,
|
|
284
|
+
subType: ItemSubType.Ranged,
|
|
285
|
+
textureAtlas: 'items',
|
|
286
|
+
allowedEquipSlotType: [ItemSlotType.Accessory],
|
|
287
|
+
isEquipable: true,
|
|
288
|
+
isStackable: true,
|
|
289
|
+
maxStackSize: 999,
|
|
290
|
+
stackQty: 2,
|
|
291
|
+
isUsable: false,
|
|
292
|
+
isStorable: true,
|
|
293
|
+
isTwoHanded: false,
|
|
294
|
+
layer: 1,
|
|
295
|
+
isItemContainer: true,
|
|
296
|
+
isSolid: false,
|
|
297
|
+
key: 'stone',
|
|
298
|
+
texturePath: 'ranged-weapons/stone-qty-1.png',
|
|
299
|
+
textureKey: 'stone',
|
|
300
|
+
name: 'stone',
|
|
301
|
+
generateContainerSlots: 10,
|
|
302
|
+
description:
|
|
303
|
+
'You see a stone. It is used with slingshot.',
|
|
304
|
+
attack: 7,
|
|
305
|
+
defense: 3,
|
|
306
|
+
weight: 13,
|
|
307
|
+
tiledId: 67,
|
|
308
|
+
x: 320,
|
|
309
|
+
y: 144,
|
|
310
|
+
scene: 'MainScene',
|
|
311
|
+
fullDescription:
|
|
312
|
+
'You see a stone. It is used with slingshot',
|
|
313
|
+
createdAt: '2022-06-04T03:18:09.335Z',
|
|
314
|
+
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
_id: '392acek4j7c8e80d2fs60404',
|
|
318
|
+
hasUseWith: false,
|
|
319
|
+
type: ItemType.Accessory,
|
|
320
|
+
subType: ItemSubType.Ranged,
|
|
321
|
+
textureAtlas: 'items',
|
|
322
|
+
allowedEquipSlotType: [ItemSlotType.Accessory],
|
|
323
|
+
isEquipable: true,
|
|
324
|
+
isStackable: true,
|
|
325
|
+
maxStackSize: 999,
|
|
326
|
+
stackQty: 3,
|
|
327
|
+
isUsable: false,
|
|
328
|
+
isStorable: true,
|
|
329
|
+
isTwoHanded: false,
|
|
330
|
+
layer: 1,
|
|
331
|
+
isItemContainer: true,
|
|
332
|
+
isSolid: false,
|
|
333
|
+
key: 'stone',
|
|
334
|
+
texturePath: 'ranged-weapons/stone-qty-1.png',
|
|
335
|
+
textureKey: 'stone',
|
|
336
|
+
name: 'stone',
|
|
337
|
+
generateContainerSlots: 10,
|
|
338
|
+
description:
|
|
339
|
+
'You see a stone. It is used with slingshot.',
|
|
340
|
+
attack: 7,
|
|
341
|
+
defense: 3,
|
|
342
|
+
weight: 13,
|
|
343
|
+
tiledId: 67,
|
|
344
|
+
x: 320,
|
|
345
|
+
y: 144,
|
|
346
|
+
scene: 'MainScene',
|
|
347
|
+
fullDescription:
|
|
348
|
+
'You see a stone. It is used with slingshot',
|
|
349
|
+
createdAt: '2022-06-04T03:18:09.335Z',
|
|
350
|
+
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
_id: '392acek4j7c8e80d2fs60404',
|
|
354
|
+
hasUseWith: false,
|
|
355
|
+
type: ItemType.Accessory,
|
|
356
|
+
subType: ItemSubType.Ranged,
|
|
357
|
+
textureAtlas: 'items',
|
|
358
|
+
allowedEquipSlotType: [ItemSlotType.Accessory],
|
|
359
|
+
isEquipable: true,
|
|
360
|
+
isStackable: true,
|
|
361
|
+
maxStackSize: 999,
|
|
362
|
+
stackQty: 4,
|
|
363
|
+
isUsable: false,
|
|
364
|
+
isStorable: true,
|
|
365
|
+
isTwoHanded: false,
|
|
366
|
+
layer: 1,
|
|
367
|
+
isItemContainer: true,
|
|
368
|
+
isSolid: false,
|
|
369
|
+
key: 'stone',
|
|
370
|
+
texturePath: 'ranged-weapons/stone-qty-1.png',
|
|
371
|
+
textureKey: 'stone',
|
|
372
|
+
name: 'stone',
|
|
373
|
+
generateContainerSlots: 10,
|
|
374
|
+
description:
|
|
375
|
+
'You see a stone. It is used with slingshot.',
|
|
376
|
+
attack: 7,
|
|
377
|
+
defense: 3,
|
|
378
|
+
weight: 13,
|
|
379
|
+
tiledId: 67,
|
|
380
|
+
x: 320,
|
|
381
|
+
y: 144,
|
|
382
|
+
scene: 'MainScene',
|
|
383
|
+
fullDescription:
|
|
384
|
+
'You see a stone. It is used with slingshot',
|
|
385
|
+
createdAt: '2022-06-04T03:18:09.335Z',
|
|
386
|
+
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
_id: '392acek4j7c8e80d2fs60404',
|
|
390
|
+
hasUseWith: false,
|
|
391
|
+
type: ItemType.Accessory,
|
|
392
|
+
subType: ItemSubType.Ranged,
|
|
393
|
+
textureAtlas: 'items',
|
|
394
|
+
allowedEquipSlotType: [ItemSlotType.Accessory],
|
|
395
|
+
isEquipable: true,
|
|
396
|
+
isStackable: true,
|
|
397
|
+
maxStackSize: 999,
|
|
398
|
+
stackQty: 5,
|
|
399
|
+
isUsable: false,
|
|
400
|
+
isStorable: true,
|
|
401
|
+
isTwoHanded: false,
|
|
402
|
+
layer: 1,
|
|
403
|
+
isItemContainer: true,
|
|
404
|
+
isSolid: false,
|
|
405
|
+
key: 'stone',
|
|
406
|
+
texturePath: 'ranged-weapons/stone-qty-1.png',
|
|
407
|
+
textureKey: 'stone',
|
|
408
|
+
name: 'stone',
|
|
409
|
+
generateContainerSlots: 10,
|
|
410
|
+
description:
|
|
411
|
+
'You see a stone. It is used with slingshot.',
|
|
412
|
+
attack: 7,
|
|
413
|
+
defense: 3,
|
|
414
|
+
weight: 13,
|
|
415
|
+
tiledId: 67,
|
|
416
|
+
x: 320,
|
|
417
|
+
y: 144,
|
|
418
|
+
scene: 'MainScene',
|
|
419
|
+
fullDescription:
|
|
420
|
+
'You see a stone. It is used with slingshot',
|
|
421
|
+
createdAt: '2022-06-04T03:18:09.335Z',
|
|
422
|
+
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
_id: '392acek4j7c8e80d2fs60404',
|
|
426
|
+
hasUseWith: false,
|
|
427
|
+
type: ItemType.Other,
|
|
428
|
+
subType: ItemSubType.Other,
|
|
429
|
+
textureAtlas: 'items',
|
|
430
|
+
allowedEquipSlotType: [],
|
|
431
|
+
isEquipable: true,
|
|
432
|
+
isStackable: true,
|
|
433
|
+
maxStackSize: 999,
|
|
434
|
+
stackQty: 1345,
|
|
435
|
+
isUsable: false,
|
|
436
|
+
isStorable: true,
|
|
437
|
+
isTwoHanded: false,
|
|
438
|
+
layer: 1,
|
|
439
|
+
isItemContainer: true,
|
|
440
|
+
isSolid: false,
|
|
441
|
+
key: 'gold-coin',
|
|
442
|
+
texturePath: 'others/gold-coin-qty-1.png',
|
|
443
|
+
textureKey: 'gold-coin',
|
|
444
|
+
name: 'gold-coin',
|
|
445
|
+
generateContainerSlots: 10,
|
|
446
|
+
description:
|
|
447
|
+
'You see a coin.',
|
|
448
|
+
attack: 7,
|
|
449
|
+
defense: 3,
|
|
450
|
+
weight: 13,
|
|
451
|
+
tiledId: 67,
|
|
452
|
+
x: 320,
|
|
453
|
+
y: 144,
|
|
454
|
+
scene: 'MainScene',
|
|
455
|
+
fullDescription:
|
|
456
|
+
'You see a stone. It is used with slingshot',
|
|
457
|
+
createdAt: '2022-06-04T03:18:09.335Z',
|
|
458
|
+
updatedAt: '2022-06-04T18:16:49.056Z',
|
|
459
|
+
}
|
|
245
460
|
];
|
|
246
461
|
|
|
247
462
|
export const itemContainerMock: IItemContainer = {
|
|
@@ -257,6 +472,14 @@ export const itemContainerMock: IItemContainer = {
|
|
|
257
472
|
4: items[4],
|
|
258
473
|
5: items[5],
|
|
259
474
|
6: items[6],
|
|
475
|
+
7: items[7],
|
|
476
|
+
8: items[8],
|
|
477
|
+
9: items[9],
|
|
478
|
+
10: items[10],
|
|
479
|
+
11: items[11],
|
|
480
|
+
12: items[12],
|
|
481
|
+
// 13: items[13],
|
|
482
|
+
// 14: items[14],
|
|
260
483
|
//remaining slots are considered null by default
|
|
261
484
|
},
|
|
262
485
|
allowedItemTypes: [],
|