@rpg-engine/long-bow 0.2.26 → 0.2.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.2.26",
3
+ "version": "0.2.27",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -5,13 +5,13 @@ export const getItemTextureKeyPath = (itemToRender: IItem, atlasJSON: any) => {
5
5
  const stackQty = itemToRender?.stackQty ?? 0;
6
6
  const itemTexturePath = itemToRender.texturePath;
7
7
 
8
- if (itemToRender && stackQty > 1) {
8
+ if (itemToRender && stackQty >= 1) {
9
9
  const idx = stackQty >= 5 ? '5' : stackQty;
10
10
 
11
11
  const textureBreakPath = itemTexturePath.split('.');
12
12
  const txtPrefix: string = textureBreakPath[0];
13
13
  const txtExtension: string = textureBreakPath[1];
14
-
14
+ console.log(`${txtPrefix}-qty-${idx}.${txtExtension}`);
15
15
  const newTexturePath = `${txtPrefix}-qty-${idx}.${txtExtension}`;
16
16
  const spriteData = atlasJSON.frames[newTexturePath];
17
17
 
@@ -259,7 +259,7 @@ export const items: IItem[] = [
259
259
  isItemContainer: true,
260
260
  isSolid: false,
261
261
  key: 'stone',
262
- texturePath: 'ranged-weapons/stone-qty-1.png',
262
+ texturePath: 'ranged-weapons/stone.png',
263
263
  textureKey: 'stone',
264
264
  name: 'stone',
265
265
  generateContainerSlots: 10,
@@ -295,7 +295,7 @@ export const items: IItem[] = [
295
295
  isItemContainer: true,
296
296
  isSolid: false,
297
297
  key: 'stone',
298
- texturePath: 'ranged-weapons/stone-qty-1.png',
298
+ texturePath: 'ranged-weapons/stone.png',
299
299
  textureKey: 'stone',
300
300
  name: 'stone',
301
301
  generateContainerSlots: 10,
@@ -331,7 +331,7 @@ export const items: IItem[] = [
331
331
  isItemContainer: true,
332
332
  isSolid: false,
333
333
  key: 'stone',
334
- texturePath: 'ranged-weapons/stone-qty-1.png',
334
+ texturePath: 'ranged-weapons/stone.png',
335
335
  textureKey: 'stone',
336
336
  name: 'stone',
337
337
  generateContainerSlots: 10,
@@ -367,7 +367,7 @@ export const items: IItem[] = [
367
367
  isItemContainer: true,
368
368
  isSolid: false,
369
369
  key: 'stone',
370
- texturePath: 'ranged-weapons/stone-qty-1.png',
370
+ texturePath: 'ranged-weapons/stone.png',
371
371
  textureKey: 'stone',
372
372
  name: 'stone',
373
373
  generateContainerSlots: 10,
@@ -403,7 +403,7 @@ export const items: IItem[] = [
403
403
  isItemContainer: true,
404
404
  isSolid: false,
405
405
  key: 'stone',
406
- texturePath: 'ranged-weapons/stone-qty-1.png',
406
+ texturePath: 'ranged-weapons/stone.png',
407
407
  textureKey: 'stone',
408
408
  name: 'stone',
409
409
  generateContainerSlots: 10,
@@ -439,7 +439,7 @@ export const items: IItem[] = [
439
439
  isItemContainer: true,
440
440
  isSolid: false,
441
441
  key: 'gold-coin',
442
- texturePath: 'others/gold-coin-qty-1.png',
442
+ texturePath: 'others/gold-coin.png',
443
443
  textureKey: 'gold-coin',
444
444
  name: 'gold-coin',
445
445
  generateContainerSlots: 10,