@rpg-engine/long-bow 0.8.111 → 0.8.112
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 -47
- 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 -47
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Item/Inventory/itemContainerHelper.ts +5 -50
|
@@ -27779,31 +27779,6 @@ var generateContextMenu = function generateContextMenu(item, itemContainerType,
|
|
|
27779
27779
|
contextActionMenu = generateContextMenuListOptions(shared.ActionsForLoot.Other);
|
|
27780
27780
|
break;
|
|
27781
27781
|
}
|
|
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
|
-
});
|
|
27788
|
-
if (!hasUseAction) {
|
|
27789
|
-
contextActionMenu.unshift({
|
|
27790
|
-
id: shared.ItemSocketEvents.Use,
|
|
27791
|
-
text: shared.ItemSocketEventsDisplayLabels[shared.ItemSocketEvents.Use]
|
|
27792
|
-
});
|
|
27793
|
-
}
|
|
27794
|
-
}
|
|
27795
|
-
// Add "Use with..." for items that have hasUseWith property
|
|
27796
|
-
if (item.hasUseWith) {
|
|
27797
|
-
var hasUseWithAction = contextActionMenu.some(function (action) {
|
|
27798
|
-
return action.id === shared.ItemSocketEvents.UseWith;
|
|
27799
|
-
});
|
|
27800
|
-
if (!hasUseWithAction) {
|
|
27801
|
-
contextActionMenu.push({
|
|
27802
|
-
id: shared.ItemSocketEvents.UseWith,
|
|
27803
|
-
text: shared.ItemSocketEvents.UseWith
|
|
27804
|
-
});
|
|
27805
|
-
}
|
|
27806
|
-
}
|
|
27807
27782
|
}
|
|
27808
27783
|
if (itemContainerType === shared.ItemContainerType.MapContainer) {
|
|
27809
27784
|
switch (item.type) {
|
|
@@ -27826,29 +27801,14 @@ var generateContextMenu = function generateContextMenu(item, itemContainerType,
|
|
|
27826
27801
|
contextActionMenu = generateContextMenuListOptions(shared.ActionsForMapContainer.Other);
|
|
27827
27802
|
break;
|
|
27828
27803
|
}
|
|
27829
|
-
|
|
27830
|
-
|
|
27831
|
-
|
|
27832
|
-
|
|
27833
|
-
|
|
27834
|
-
|
|
27835
|
-
|
|
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;
|
|
27804
|
+
var _contextActionMenuDontHaveUseWith = !contextActionMenu.find(function (action) {
|
|
27805
|
+
return action.text.toLowerCase().includes('use with');
|
|
27806
|
+
});
|
|
27807
|
+
if (item.hasUseWith && _contextActionMenuDontHaveUseWith) {
|
|
27808
|
+
contextActionMenu.push({
|
|
27809
|
+
id: 'use-with',
|
|
27810
|
+
text: 'Use with...'
|
|
27845
27811
|
});
|
|
27846
|
-
if (!_hasUseWithAction) {
|
|
27847
|
-
contextActionMenu.push({
|
|
27848
|
-
id: shared.ItemSocketEvents.UseWith,
|
|
27849
|
-
text: shared.ItemSocketEvents.UseWith
|
|
27850
|
-
});
|
|
27851
|
-
}
|
|
27852
27812
|
}
|
|
27853
27813
|
}
|
|
27854
27814
|
if (itemContainerType === shared.ItemContainerType.Depot) {
|