@rpg-engine/long-bow 0.2.0 → 0.2.3
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/components/Equipment/EquipmentSet.d.ts +1 -1
- package/dist/components/Item/Inventory/ItemContainer.d.ts +1 -1
- package/dist/long-bow.cjs.development.js +14 -4
- 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 +14 -4
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Equipment/EquipmentSet.tsx +1 -1
- package/src/components/Item/Inventory/ItemContainer.tsx +3 -3
- package/src/components/Item/Inventory/itemContainerHelper.ts +17 -4
- package/src/mocks/itemContainer.mocks.ts +35 -1
- package/src/stories/EquipmentSet.stories.tsx +1 -1
- package/src/stories/ItemContainer.stories.tsx +1 -1
|
@@ -6,6 +6,6 @@ export interface IItemContainerProps {
|
|
|
6
6
|
onItemClick?: (item: IItem, ItemType: IItem['type'], itemContainerType: ItemContainerType | null) => void;
|
|
7
7
|
onMouseOver?: (e: any, slotIndex: number, item: IItem | null) => void;
|
|
8
8
|
onSelected?: (optionId: string, item: IItem) => void;
|
|
9
|
-
|
|
9
|
+
type: ItemContainerType;
|
|
10
10
|
}
|
|
11
11
|
export declare const ItemContainer: React.FC<IItemContainerProps>;
|
|
@@ -5822,10 +5822,13 @@ var generateContextMenu = function generateContextMenu(itemType, itemContainerTy
|
|
|
5822
5822
|
case shared.ItemType.Armor:
|
|
5823
5823
|
case shared.ItemType.Accessory:
|
|
5824
5824
|
case shared.ItemType.Jewelry:
|
|
5825
|
-
case shared.ItemType.Container:
|
|
5826
5825
|
contextActionMenu = generateContextMenuListOptions(shared.ActionsForInventory.Equipment);
|
|
5827
5826
|
break;
|
|
5828
5827
|
|
|
5828
|
+
case shared.ItemType.Container:
|
|
5829
|
+
contextActionMenu = generateContextMenuListOptions(shared.ActionsForInventory.Container);
|
|
5830
|
+
break;
|
|
5831
|
+
|
|
5829
5832
|
case shared.ItemType.Consumable:
|
|
5830
5833
|
contextActionMenu = generateContextMenuListOptions(shared.ActionsForInventory.Consumable);
|
|
5831
5834
|
break;
|
|
@@ -5845,7 +5848,14 @@ var generateContextMenu = function generateContextMenu(itemType, itemContainerTy
|
|
|
5845
5848
|
}
|
|
5846
5849
|
|
|
5847
5850
|
if (itemContainerType === shared.ItemContainerType.Equipment) {
|
|
5848
|
-
|
|
5851
|
+
switch (itemType) {
|
|
5852
|
+
case shared.ItemType.Container:
|
|
5853
|
+
contextActionMenu = generateContextMenuListOptions(shared.ActionsForEquipmentSet.Container);
|
|
5854
|
+
break;
|
|
5855
|
+
|
|
5856
|
+
default:
|
|
5857
|
+
contextActionMenu = generateContextMenuListOptions(shared.ActionsForEquipmentSet.Equipment);
|
|
5858
|
+
}
|
|
5849
5859
|
}
|
|
5850
5860
|
|
|
5851
5861
|
if (itemContainerType === shared.ItemContainerType.Loot) {
|
|
@@ -6164,7 +6174,7 @@ var ItemContainer = function ItemContainer(_ref) {
|
|
|
6164
6174
|
_onMouseOver = _ref.onMouseOver,
|
|
6165
6175
|
_onSelected = _ref.onSelected,
|
|
6166
6176
|
onItemClick = _ref.onItemClick,
|
|
6167
|
-
|
|
6177
|
+
type = _ref.type;
|
|
6168
6178
|
|
|
6169
6179
|
var onRenderSlots = function onRenderSlots() {
|
|
6170
6180
|
var slots = [];
|
|
@@ -6176,7 +6186,7 @@ var ItemContainer = function ItemContainer(_ref) {
|
|
|
6176
6186
|
key: i,
|
|
6177
6187
|
slotIndex: i,
|
|
6178
6188
|
item: ((_itemContainer$slots = itemContainer.slots) == null ? void 0 : _itemContainer$slots[i]) || null,
|
|
6179
|
-
itemContainerType:
|
|
6189
|
+
itemContainerType: type,
|
|
6180
6190
|
onMouseOver: function onMouseOver(event, slotIndex, item) {
|
|
6181
6191
|
if (_onMouseOver) _onMouseOver(event, slotIndex, item);
|
|
6182
6192
|
},
|