@rpg-engine/long-bow 0.1.99 → 0.2.0

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.
@@ -5799,16 +5799,7 @@ var Container$5 = /*#__PURE__*/styled.div.withConfig({
5799
5799
  componentId: "sc-11d9r7x-0"
5800
5800
  })(["z-index:2;position:absolute;top:1rem;left:4rem;font-size:0.5rem;color:white;background-color:black;border-radius:5px;padding:0.5rem;min-width:20px;width:100%;text-align:center;opacity:0.75;"]);
5801
5801
 
5802
- var SlotContainerType;
5803
-
5804
- (function (SlotContainerType) {
5805
- SlotContainerType["INVENTORY"] = "Inventory";
5806
- SlotContainerType["EQUIPMENT_SET"] = "EquipmentSet";
5807
- SlotContainerType["LOOT"] = "Loot";
5808
- SlotContainerType["MAP_CONTAINER"] = "Map-Container";
5809
- })(SlotContainerType || (SlotContainerType = {}));
5810
-
5811
- var generateContextList = function generateContextList(actionsByTypeList) {
5802
+ var generateContextMenuListOptions = function generateContextMenuListOptions(actionsByTypeList) {
5812
5803
  var contextMenu = actionsByTypeList.map(function (action) {
5813
5804
  return {
5814
5805
  id: action,
@@ -5818,7 +5809,7 @@ var generateContextList = function generateContextList(actionsByTypeList) {
5818
5809
  return contextMenu;
5819
5810
  };
5820
5811
 
5821
- var handleNewContextMenu = function handleNewContextMenu(itemType, itemContainerType) {
5812
+ var generateContextMenu = function generateContextMenu(itemType, itemContainerType) {
5822
5813
  var contextActionMenu = [];
5823
5814
 
5824
5815
  if (itemContainerType === ItemContainerType.Inventory) {
@@ -5828,37 +5819,29 @@ var handleNewContextMenu = function handleNewContextMenu(itemType, itemContainer
5828
5819
  case ItemType.Accessory:
5829
5820
  case ItemType.Jewelry:
5830
5821
  case ItemType.Container:
5831
- contextActionMenu = generateContextList(ActionsForInventory.Equipment);
5822
+ contextActionMenu = generateContextMenuListOptions(ActionsForInventory.Equipment);
5832
5823
  break;
5833
5824
 
5834
5825
  case ItemType.Consumable:
5835
- contextActionMenu = generateContextList(ActionsForInventory.Consumable);
5826
+ contextActionMenu = generateContextMenuListOptions(ActionsForInventory.Consumable);
5836
5827
  break;
5837
5828
 
5838
5829
  case ItemType.CraftMaterial:
5839
- contextActionMenu = generateContextList(ActionsForInventory.CraftMaterial);
5830
+ contextActionMenu = generateContextMenuListOptions(ActionsForInventory.CraftMaterial);
5840
5831
  break;
5841
5832
 
5842
5833
  case ItemType.Tool:
5843
- contextActionMenu = generateContextList(ActionsForInventory.Tool);
5834
+ contextActionMenu = generateContextMenuListOptions(ActionsForInventory.Tool);
5844
5835
  break;
5845
5836
 
5846
- case ItemType.Other:
5847
- contextActionMenu = generateContextList(ActionsForInventory.Other);
5837
+ default:
5838
+ contextActionMenu = generateContextMenuListOptions(ActionsForInventory.Other);
5848
5839
  break;
5849
5840
  }
5850
5841
  }
5851
5842
 
5852
5843
  if (itemContainerType === ItemContainerType.Equipment) {
5853
- switch (itemType) {
5854
- case ItemType.Weapon:
5855
- case ItemType.Armor:
5856
- case ItemType.Accessory:
5857
- case ItemType.Jewelry:
5858
- case ItemType.Container:
5859
- contextActionMenu = generateContextList(ActionsForEquipmentSet.Equipment);
5860
- break;
5861
- }
5844
+ contextActionMenu = generateContextMenuListOptions(ActionsForEquipmentSet.Equipment);
5862
5845
  }
5863
5846
 
5864
5847
  if (itemContainerType === ItemContainerType.Loot) {
@@ -5867,23 +5850,23 @@ var handleNewContextMenu = function handleNewContextMenu(itemType, itemContainer
5867
5850
  case ItemType.Armor:
5868
5851
  case ItemType.Accessory:
5869
5852
  case ItemType.Jewelry:
5870
- contextActionMenu = generateContextList(ActionsForLoot.Equipment);
5853
+ contextActionMenu = generateContextMenuListOptions(ActionsForLoot.Equipment);
5871
5854
  break;
5872
5855
 
5873
5856
  case ItemType.Consumable:
5874
- contextActionMenu = generateContextList(ActionsForLoot.Consumable);
5857
+ contextActionMenu = generateContextMenuListOptions(ActionsForLoot.Consumable);
5875
5858
  break;
5876
5859
 
5877
5860
  case ItemType.CraftMaterial:
5878
- contextActionMenu = generateContextList(ActionsForLoot.CraftMaterial);
5861
+ contextActionMenu = generateContextMenuListOptions(ActionsForLoot.CraftMaterial);
5879
5862
  break;
5880
5863
 
5881
5864
  case ItemType.Tool:
5882
- contextActionMenu = generateContextList(ActionsForLoot.Tool);
5865
+ contextActionMenu = generateContextMenuListOptions(ActionsForLoot.Tool);
5883
5866
  break;
5884
5867
 
5885
- case ItemType.Other:
5886
- contextActionMenu = generateContextList(ActionsForLoot.Other);
5868
+ default:
5869
+ contextActionMenu = generateContextMenuListOptions(ActionsForLoot.Other);
5887
5870
  break;
5888
5871
  }
5889
5872
  }
@@ -5894,23 +5877,23 @@ var handleNewContextMenu = function handleNewContextMenu(itemType, itemContainer
5894
5877
  case ItemType.Armor:
5895
5878
  case ItemType.Accessory:
5896
5879
  case ItemType.Jewelry:
5897
- contextActionMenu = generateContextList(ActionsForMapContainer.Equipment);
5880
+ contextActionMenu = generateContextMenuListOptions(ActionsForMapContainer.Equipment);
5898
5881
  break;
5899
5882
 
5900
5883
  case ItemType.Consumable:
5901
- contextActionMenu = generateContextList(ActionsForMapContainer.Consumable);
5884
+ contextActionMenu = generateContextMenuListOptions(ActionsForMapContainer.Consumable);
5902
5885
  break;
5903
5886
 
5904
5887
  case ItemType.CraftMaterial:
5905
- contextActionMenu = generateContextList(ActionsForMapContainer.CraftMaterial);
5888
+ contextActionMenu = generateContextMenuListOptions(ActionsForMapContainer.CraftMaterial);
5906
5889
  break;
5907
5890
 
5908
5891
  case ItemType.Tool:
5909
- contextActionMenu = generateContextList(ActionsForMapContainer.Tool);
5892
+ contextActionMenu = generateContextMenuListOptions(ActionsForMapContainer.Tool);
5910
5893
  break;
5911
5894
 
5912
- case ItemType.Other:
5913
- contextActionMenu = generateContextList(ActionsForMapContainer.Other);
5895
+ default:
5896
+ contextActionMenu = generateContextMenuListOptions(ActionsForMapContainer.Other);
5914
5897
  break;
5915
5898
  }
5916
5899
  }
@@ -5954,7 +5937,7 @@ var ItemSlot = /*#__PURE__*/observer(function (_ref) {
5954
5937
 
5955
5938
  useEffect(function () {
5956
5939
  if (item) {
5957
- setContextActions(handleNewContextMenu(item.type, containerType));
5940
+ setContextActions(generateContextMenu(item.type, containerType));
5958
5941
  }
5959
5942
  }, [item]);
5960
5943
 
@@ -6422,8 +6405,7 @@ var QuestionDialog = function QuestionDialog(_ref) {
6422
6405
  var nextAnswerIndex = onGetAnswers(currentQuestion.answerIds).findIndex(function (answer) {
6423
6406
  return (answer == null ? void 0 : answer.id) === currentAnswer.id + 1;
6424
6407
  });
6425
- var nextAnswerID = currentQuestion.answerIds[nextAnswerIndex]; // console.log(nextAnswerIndex);
6426
-
6408
+ var nextAnswerID = currentQuestion.answerIds[nextAnswerIndex];
6427
6409
  var nextAnswer = onGetAnswers(currentQuestion.answerIds).find(function (answer) {
6428
6410
  return (answer == null ? void 0 : answer.id) === nextAnswerID;
6429
6411
  });