@rpg-engine/long-bow 0.8.110 → 0.8.111
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 +41 -15
- 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 +41 -15
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Item/Inventory/itemContainerHelper.ts +44 -15
|
@@ -27779,19 +27779,30 @@ var generateContextMenu = function generateContextMenu(item, itemContainerType,
|
|
|
27779
27779
|
contextActionMenu = generateContextMenuListOptions(shared.ActionsForLoot.Other);
|
|
27780
27780
|
break;
|
|
27781
27781
|
}
|
|
27782
|
-
// Add "Use" for
|
|
27783
|
-
|
|
27784
|
-
|
|
27785
|
-
|
|
27786
|
-
|
|
27782
|
+
// Add "Use" for usable items in nested containers (same as Inventory)
|
|
27783
|
+
// Check both item type and isUsable flag to handle all usable items
|
|
27784
|
+
if (item.type === shared.ItemType.Consumable || item.isUsable) {
|
|
27785
|
+
var hasUseAction = contextActionMenu.some(function (action) {
|
|
27786
|
+
return action.id === shared.ItemSocketEvents.Use;
|
|
27787
27787
|
});
|
|
27788
|
+
if (!hasUseAction) {
|
|
27789
|
+
contextActionMenu.unshift({
|
|
27790
|
+
id: shared.ItemSocketEvents.Use,
|
|
27791
|
+
text: shared.ItemSocketEventsDisplayLabels[shared.ItemSocketEvents.Use]
|
|
27792
|
+
});
|
|
27793
|
+
}
|
|
27788
27794
|
}
|
|
27789
27795
|
// Add "Use with..." for items that have hasUseWith property
|
|
27790
27796
|
if (item.hasUseWith) {
|
|
27791
|
-
contextActionMenu.
|
|
27792
|
-
id
|
|
27793
|
-
text: shared.ItemSocketEvents.UseWith
|
|
27797
|
+
var hasUseWithAction = contextActionMenu.some(function (action) {
|
|
27798
|
+
return action.id === shared.ItemSocketEvents.UseWith;
|
|
27794
27799
|
});
|
|
27800
|
+
if (!hasUseWithAction) {
|
|
27801
|
+
contextActionMenu.push({
|
|
27802
|
+
id: shared.ItemSocketEvents.UseWith,
|
|
27803
|
+
text: shared.ItemSocketEvents.UseWith
|
|
27804
|
+
});
|
|
27805
|
+
}
|
|
27795
27806
|
}
|
|
27796
27807
|
}
|
|
27797
27808
|
if (itemContainerType === shared.ItemContainerType.MapContainer) {
|
|
@@ -27815,14 +27826,29 @@ var generateContextMenu = function generateContextMenu(item, itemContainerType,
|
|
|
27815
27826
|
contextActionMenu = generateContextMenuListOptions(shared.ActionsForMapContainer.Other);
|
|
27816
27827
|
break;
|
|
27817
27828
|
}
|
|
27818
|
-
|
|
27819
|
-
|
|
27820
|
-
|
|
27821
|
-
|
|
27822
|
-
|
|
27823
|
-
|
|
27824
|
-
|
|
27829
|
+
// Add "Use" for usable items (same logic as Loot containers)
|
|
27830
|
+
if (item.type === shared.ItemType.Consumable || item.isUsable) {
|
|
27831
|
+
var _hasUseAction = contextActionMenu.some(function (action) {
|
|
27832
|
+
return action.id === shared.ItemSocketEvents.Use;
|
|
27833
|
+
});
|
|
27834
|
+
if (!_hasUseAction) {
|
|
27835
|
+
contextActionMenu.unshift({
|
|
27836
|
+
id: shared.ItemSocketEvents.Use,
|
|
27837
|
+
text: shared.ItemSocketEventsDisplayLabels[shared.ItemSocketEvents.Use]
|
|
27838
|
+
});
|
|
27839
|
+
}
|
|
27840
|
+
}
|
|
27841
|
+
// Add "Use with..." for items that have hasUseWith property
|
|
27842
|
+
if (item.hasUseWith) {
|
|
27843
|
+
var _hasUseWithAction = contextActionMenu.some(function (action) {
|
|
27844
|
+
return action.id === shared.ItemSocketEvents.UseWith;
|
|
27825
27845
|
});
|
|
27846
|
+
if (!_hasUseWithAction) {
|
|
27847
|
+
contextActionMenu.push({
|
|
27848
|
+
id: shared.ItemSocketEvents.UseWith,
|
|
27849
|
+
text: shared.ItemSocketEvents.UseWith
|
|
27850
|
+
});
|
|
27851
|
+
}
|
|
27826
27852
|
}
|
|
27827
27853
|
}
|
|
27828
27854
|
if (itemContainerType === shared.ItemContainerType.Depot) {
|