@rpg-engine/long-bow 0.2.25 → 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/dist/long-bow.cjs.development.js +8 -23
- 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 +8 -23
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Item/Inventory/ErrorBoundary.tsx +0 -1
- package/src/components/Item/Inventory/ItemSlot.tsx +0 -19
- package/src/components/shared/Ellipsis.tsx +0 -1
- package/src/libs/ItemSlotHelper.ts +16 -12
- package/src/mocks/itemContainer.mocks.ts +6 -6
|
@@ -27287,7 +27287,6 @@ var ErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
|
27287
27287
|
|
|
27288
27288
|
_proto.componentDidCatch = function componentDidCatch(error, errorInfo) {
|
|
27289
27289
|
console.error('Uncaught error:', error, errorInfo);
|
|
27290
|
-
console.log('quelquer cois');
|
|
27291
27290
|
};
|
|
27292
27291
|
|
|
27293
27292
|
_proto.render = function render() {
|
|
@@ -27309,7 +27308,6 @@ var ErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
|
27309
27308
|
var Ellipsis = function Ellipsis(_ref) {
|
|
27310
27309
|
var children = _ref.children,
|
|
27311
27310
|
maxLines = _ref.maxLines;
|
|
27312
|
-
console.log('Ellipsis Component 2');
|
|
27313
27311
|
return React__default.createElement(Container$1, null, React__default.createElement("div", {
|
|
27314
27312
|
className: "ellipsis-" + maxLines + "-lines"
|
|
27315
27313
|
}, children));
|
|
@@ -27852,15 +27850,17 @@ var getItemTextureKeyPath = function getItemTextureKeyPath(itemToRender, atlasJS
|
|
|
27852
27850
|
var stackQty = (_itemToRender$stackQt = itemToRender == null ? void 0 : itemToRender.stackQty) != null ? _itemToRender$stackQt : 0;
|
|
27853
27851
|
var itemTexturePath = itemToRender.texturePath;
|
|
27854
27852
|
|
|
27855
|
-
if (itemToRender
|
|
27856
|
-
var txtExtension = itemToRender.texturePath.split('.')[1];
|
|
27857
|
-
var txtDir = itemToRender.texturePath.split('/')[0];
|
|
27853
|
+
if (itemToRender && stackQty >= 1) {
|
|
27858
27854
|
var idx = stackQty >= 5 ? '5' : stackQty;
|
|
27859
|
-
var
|
|
27855
|
+
var textureBreakPath = itemTexturePath.split('.');
|
|
27856
|
+
var txtPrefix = textureBreakPath[0];
|
|
27857
|
+
var txtExtension = textureBreakPath[1];
|
|
27858
|
+
console.log(txtPrefix + "-qty-" + idx + "." + txtExtension);
|
|
27859
|
+
var newTexturePath = txtPrefix + "-qty-" + idx + "." + txtExtension;
|
|
27860
27860
|
var spriteData = atlasJSON.frames[newTexturePath];
|
|
27861
27861
|
|
|
27862
27862
|
if (spriteData !== undefined) {
|
|
27863
|
-
|
|
27863
|
+
return newTexturePath;
|
|
27864
27864
|
}
|
|
27865
27865
|
}
|
|
27866
27866
|
|
|
@@ -28095,22 +28095,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
28095
28095
|
}
|
|
28096
28096
|
|
|
28097
28097
|
return undefined;
|
|
28098
|
-
};
|
|
28099
|
-
// const stackQty = itemToRender?.stackQty ?? 0;
|
|
28100
|
-
// let itemTexturePath = itemToRender.texturePath;
|
|
28101
|
-
// if (stackQty > 1) {
|
|
28102
|
-
// const txtExtension: string = itemToRender.texturePath.split('.')[1];
|
|
28103
|
-
// const txtDir: string = itemToRender.texturePath.split('/')[0];
|
|
28104
|
-
// const idx = stackQty >= 5 ? '5' : stackQty;
|
|
28105
|
-
// const newTexturePath = `${txtDir}/${itemToRender.textureKey}-qty-${idx}.${txtExtension}`;
|
|
28106
|
-
// const spriteData = atlasJSON.frames[newTexturePath];
|
|
28107
|
-
// if (spriteData !== undefined) {
|
|
28108
|
-
// itemTexturePath = newTexturePath;
|
|
28109
|
-
// }
|
|
28110
|
-
// }
|
|
28111
|
-
// return itemTexturePath;
|
|
28112
|
-
// };
|
|
28113
|
-
|
|
28098
|
+
};
|
|
28114
28099
|
|
|
28115
28100
|
var renderItem = function renderItem(itemToRender) {
|
|
28116
28101
|
var _itemToRender$_id, _itemToRender$stackQt;
|