@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.
@@ -27772,31 +27772,6 @@ var generateContextMenu = function generateContextMenu(item, itemContainerType,
27772
27772
  contextActionMenu = generateContextMenuListOptions(ActionsForLoot.Other);
27773
27773
  break;
27774
27774
  }
27775
- // Add "Use" for usable items in nested containers (same as Inventory)
27776
- // Check both item type and isUsable flag to handle all usable items
27777
- if (item.type === ItemType.Consumable || item.isUsable) {
27778
- var hasUseAction = contextActionMenu.some(function (action) {
27779
- return action.id === ItemSocketEvents.Use;
27780
- });
27781
- if (!hasUseAction) {
27782
- contextActionMenu.unshift({
27783
- id: ItemSocketEvents.Use,
27784
- text: ItemSocketEventsDisplayLabels[ItemSocketEvents.Use]
27785
- });
27786
- }
27787
- }
27788
- // Add "Use with..." for items that have hasUseWith property
27789
- if (item.hasUseWith) {
27790
- var hasUseWithAction = contextActionMenu.some(function (action) {
27791
- return action.id === ItemSocketEvents.UseWith;
27792
- });
27793
- if (!hasUseWithAction) {
27794
- contextActionMenu.push({
27795
- id: ItemSocketEvents.UseWith,
27796
- text: ItemSocketEvents.UseWith
27797
- });
27798
- }
27799
- }
27800
27775
  }
27801
27776
  if (itemContainerType === ItemContainerType.MapContainer) {
27802
27777
  switch (item.type) {
@@ -27819,29 +27794,14 @@ var generateContextMenu = function generateContextMenu(item, itemContainerType,
27819
27794
  contextActionMenu = generateContextMenuListOptions(ActionsForMapContainer.Other);
27820
27795
  break;
27821
27796
  }
27822
- // Add "Use" for usable items (same logic as Loot containers)
27823
- if (item.type === ItemType.Consumable || item.isUsable) {
27824
- var _hasUseAction = contextActionMenu.some(function (action) {
27825
- return action.id === ItemSocketEvents.Use;
27826
- });
27827
- if (!_hasUseAction) {
27828
- contextActionMenu.unshift({
27829
- id: ItemSocketEvents.Use,
27830
- text: ItemSocketEventsDisplayLabels[ItemSocketEvents.Use]
27831
- });
27832
- }
27833
- }
27834
- // Add "Use with..." for items that have hasUseWith property
27835
- if (item.hasUseWith) {
27836
- var _hasUseWithAction = contextActionMenu.some(function (action) {
27837
- return action.id === ItemSocketEvents.UseWith;
27797
+ var _contextActionMenuDontHaveUseWith = !contextActionMenu.find(function (action) {
27798
+ return action.text.toLowerCase().includes('use with');
27799
+ });
27800
+ if (item.hasUseWith && _contextActionMenuDontHaveUseWith) {
27801
+ contextActionMenu.push({
27802
+ id: 'use-with',
27803
+ text: 'Use with...'
27838
27804
  });
27839
- if (!_hasUseWithAction) {
27840
- contextActionMenu.push({
27841
- id: ItemSocketEvents.UseWith,
27842
- text: ItemSocketEvents.UseWith
27843
- });
27844
- }
27845
27805
  }
27846
27806
  }
27847
27807
  if (itemContainerType === ItemContainerType.Depot) {