@rpg-engine/long-bow 0.2.74 → 0.2.77
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 +7 -2
- 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 +7 -2
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/TradingMenu/TradingItemRow.tsx +9 -2
- package/src/components/shared/SpriteFromAtlas.tsx +3 -1
|
@@ -6475,7 +6475,8 @@ var SpriteFromAtlas = function SpriteFromAtlas(_ref) {
|
|
|
6475
6475
|
opacity = _ref$opacity === void 0 ? 1 : _ref$opacity;
|
|
6476
6476
|
//! If an item is not showing, remember that you MUST run yarn atlas:copy everytime you add a new item to the atlas (it will sync our public folder atlas with src/atlas).
|
|
6477
6477
|
//!Due to React's limitations, we cannot import it from the public folder directly!
|
|
6478
|
-
var spriteData = atlasJSON.frames[spriteKey];
|
|
6478
|
+
var spriteData = atlasJSON.frames[spriteKey || 'others/no-image.png'];
|
|
6479
|
+
if (!spriteData) throw new Error("Sprite " + spriteKey + " not found in atlas!");
|
|
6479
6480
|
return React__default.createElement(ErrorBoundary, null, React__default.createElement(Container, {
|
|
6480
6481
|
width: width,
|
|
6481
6482
|
height: height,
|
|
@@ -29134,7 +29135,11 @@ var TradingItemRow = function TradingItemRow(_ref) {
|
|
|
29134
29135
|
return React__default.createElement(ItemWrapper, null, React__default.createElement(ItemIconContainer, null, React__default.createElement(SpriteContainer$1, null, React__default.createElement(SpriteFromAtlas, {
|
|
29135
29136
|
atlasIMG: atlasIMG,
|
|
29136
29137
|
atlasJSON: atlasJSON,
|
|
29137
|
-
spriteKey:
|
|
29138
|
+
spriteKey: shared.getItemTextureKeyPath({
|
|
29139
|
+
key: traderItem.key,
|
|
29140
|
+
stackQty: traderItem.qty || 1,
|
|
29141
|
+
texturePath: traderItem.texturePath
|
|
29142
|
+
}, atlasJSON),
|
|
29138
29143
|
imgScale: 2.5
|
|
29139
29144
|
}))), React__default.createElement(ItemNameContainer, null, React__default.createElement(NameValue, null, React__default.createElement("p", null, React__default.createElement(Ellipsis, {
|
|
29140
29145
|
maxLines: 1,
|