@rpg-engine/long-bow 0.3.95 → 0.3.96

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.
@@ -12650,7 +12650,7 @@ var uiColors = {
12650
12650
  blue: '#597DCE',
12651
12651
  darkBlue: '#30346D',
12652
12652
  brown: '#854C30',
12653
- lightGreen: '#88ed1c',
12653
+ lightGreen: '#66cd1c',
12654
12654
  brownGreen: '#346524'
12655
12655
  };
12656
12656
 
@@ -13256,15 +13256,15 @@ var MobileItemTooltip = function MobileItemTooltip(_ref) {
13256
13256
  var Container$9 = /*#__PURE__*/styled.div.withConfig({
13257
13257
  displayName: "MobileItemTooltip__Container",
13258
13258
  componentId: "sc-ku4p1j-0"
13259
- })(["position:absolute;z-index:100;left:0;top:0;width:100vw;height:100vh;background-color:rgba(0 0 0 / 0.5);display:flex;justify-content:center;align-items:center;gap:0.5rem;transition:opacity 0.08s;animation:fadeIn 0.1s forwards;@keyframes fadeIn{0%{opacity:0;}100%{opacity:0.92;}}@keyframes fadeOut{0%{opacity:0.92;}100%{opacity:0;}}&.fadeOut{animation:fadeOut 0.1s forwards;}@media (max-width:580px){flex-direction:column;}"]);
13259
+ })(["position:absolute;z-index:100;left:0;top:0;width:100vw;height:100vh;background-color:rgba(0 0 0 / 0.5);display:flex;justify-content:center;align-items:center;gap:0.5rem;transition:opacity 0.08s;animation:fadeIn 0.1s forwards;@keyframes fadeIn{0%{opacity:0;}100%{opacity:0.92;}}@keyframes fadeOut{0%{opacity:0.92;}100%{opacity:0;}}&.fadeOut{animation:fadeOut 0.1s forwards;}@media (max-width:640px){flex-direction:column;}"]);
13260
13260
  var OptionsContainer = /*#__PURE__*/styled.div.withConfig({
13261
13261
  displayName: "MobileItemTooltip__OptionsContainer",
13262
13262
  componentId: "sc-ku4p1j-1"
13263
- })(["display:flex;flex-direction:column;gap:0.5rem;flex-wrap:wrap;@media (max-width:580px){flex-direction:row;justify-content:center;}"]);
13263
+ })(["display:flex;flex-direction:column;gap:0.5rem;flex-wrap:wrap;@media (max-width:640px){flex-direction:row;justify-content:center;}"]);
13264
13264
  var Option = /*#__PURE__*/styled.button.withConfig({
13265
13265
  displayName: "MobileItemTooltip__Option",
13266
13266
  componentId: "sc-ku4p1j-2"
13267
- })(["padding:1rem;background-color:#333;color:white;border:none;border-radius:3px;width:8rem;transition:background-color 0.1s;&:hover{background-color:#555;}@media (max-width:580px){padding:1rem 0.5rem;}"]);
13267
+ })(["padding:1rem;background-color:#333;color:white;border:none;border-radius:3px;width:8rem;transition:background-color 0.1s;&:hover{background-color:#555;}@media (max-width:640px){padding:1rem 0.5rem;}"]);
13268
13268
 
13269
13269
  var generateContextMenuListOptions = function generateContextMenuListOptions(actionsByTypeList) {
13270
13270
  var contextMenu = actionsByTypeList.map(function (action) {
@@ -13838,6 +13838,15 @@ var ItemInfo = function ItemInfo(_ref) {
13838
13838
  }
13839
13839
  return statistics;
13840
13840
  };
13841
+ var renderEntityEffects = function renderEntityEffects() {
13842
+ if (!item.entityEffects || !item.entityEffectChance) return null;
13843
+ return item.entityEffects.map(function (effect, index) {
13844
+ return React__default.createElement(Statistic, {
13845
+ key: index,
13846
+ "$isSpecial": true
13847
+ }, effect[0].toUpperCase() + effect.slice(1), " (", item.entityEffectChance, "%)");
13848
+ });
13849
+ };
13841
13850
  var renderAvaibleSlots = function renderAvaibleSlots() {
13842
13851
  if (!item.allowedEquipSlotType) return null;
13843
13852
  return item.allowedEquipSlotType.map(function (slotType, index) {
@@ -13861,12 +13870,18 @@ var ItemInfo = function ItemInfo(_ref) {
13861
13870
  item: item
13862
13871
  }, React__default.createElement(Header, null, React__default.createElement("div", null, React__default.createElement(Title$1, null, item.name), item.rarity !== 'Common' && React__default.createElement(Rarity, {
13863
13872
  item: item
13864
- }, item.rarity), React__default.createElement(Type, null, item.subType)), React__default.createElement(AllowedSlots, null, renderAvaibleSlots())), renderStatistics(), item.isTwoHanded && React__default.createElement(Statistic, null, "Two handed"), React__default.createElement(Description, null, item.description), item.maxStackSize && item.maxStackSize !== 1 && React__default.createElement(StackInfo, null, "x", Math.round(((_item$stackQty = item.stackQty) != null ? _item$stackQty : 1) * 100) / 100, "(", item.maxStackSize, ")"), renderMissingStatistic().length > 0 && React__default.createElement(MissingStatistics, null, React__default.createElement(Statistic, null, "Equipped Diff"), itemToCompare && renderMissingStatistic()));
13873
+ }, item.rarity), React__default.createElement(Type, null, item.subType)), React__default.createElement(AllowedSlots, null, renderAvaibleSlots())), item.minRequirements && React__default.createElement(LevelRequirement, null, React__default.createElement("div", null, "Level: ", item.minRequirements.level), React__default.createElement("div", null, item.minRequirements.skill.name[0].toUpperCase() + item.minRequirements.skill.name.slice(1), ": ", item.minRequirements.skill.level)), renderStatistics(), renderEntityEffects(), item.usableEffectDescription && React__default.createElement(Statistic, {
13874
+ "$isSpecial": true
13875
+ }, item.usableEffectDescription), item.equippedBuffDescription && React__default.createElement(Statistic, {
13876
+ "$isSpecial": true
13877
+ }, item.equippedBuffDescription), item.isTwoHanded && React__default.createElement(Statistic, {
13878
+ "$isSpecial": true
13879
+ }, "Two handed"), React__default.createElement(Description, null, item.description), item.maxStackSize && item.maxStackSize !== 1 && React__default.createElement(StackInfo, null, "x", Math.round(((_item$stackQty = item.stackQty) != null ? _item$stackQty : 1) * 100) / 100, "(", item.maxStackSize, ")"), renderMissingStatistic().length > 0 && React__default.createElement(MissingStatistics, null, React__default.createElement(Statistic, null, "Equipped Diff"), itemToCompare && renderMissingStatistic()));
13865
13880
  };
13866
13881
  var Container$b = /*#__PURE__*/styled.div.withConfig({
13867
13882
  displayName: "ItemInfo__Container",
13868
13883
  componentId: "sc-1xm4q8k-0"
13869
- })(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;font-size:", ";border:3px solid ", ";height:max-content;width:15rem;@media (max-width:580px){width:80vw;}"], uiFonts.size.small, function (_ref2) {
13884
+ })(["color:white;background-color:#222;border-radius:5px;padding:0.5rem;font-size:", ";border:3px solid ", ";height:max-content;width:18rem;@media (max-width:640px){width:80vw;}"], uiFonts.size.small, function (_ref2) {
13870
13885
  var _rarityColor;
13871
13886
  var item = _ref2.item;
13872
13887
  return (_rarityColor = rarityColor(item)) != null ? _rarityColor : uiColors.lightGray;
@@ -13886,29 +13901,36 @@ var Type = /*#__PURE__*/styled.div.withConfig({
13886
13901
  displayName: "ItemInfo__Type",
13887
13902
  componentId: "sc-1xm4q8k-3"
13888
13903
  })(["font-size:", ";margin-top:0.2rem;color:", ";"], uiFonts.size.small, uiColors.lightGray);
13904
+ var LevelRequirement = /*#__PURE__*/styled.div.withConfig({
13905
+ displayName: "ItemInfo__LevelRequirement",
13906
+ componentId: "sc-1xm4q8k-4"
13907
+ })(["font-size:", ";margin-top:0.2rem;margin-bottom:1rem;color:", ";"], uiFonts.size.small, uiColors.orange);
13889
13908
  var Statistic = /*#__PURE__*/styled.div.withConfig({
13890
13909
  displayName: "ItemInfo__Statistic",
13891
- componentId: "sc-1xm4q8k-4"
13892
- })(["margin-bottom:0.4rem;width:max-content;.label{display:inline-block;margin-right:0.5rem;color:inherit;}.value{display:inline-block;color:inherit;}&.better,.better{color:", ";}&.worse,.worse{color:", ";}"], uiColors.lightGreen, uiColors.cardinal);
13910
+ componentId: "sc-1xm4q8k-5"
13911
+ })(["margin-bottom:0.4rem;width:100%;color:", ";.label{display:inline-block;margin-right:0.5rem;color:inherit;}.value{display:inline-block;color:inherit;}&.better,.better{color:", ";}&.worse,.worse{color:", ";}"], function (_ref4) {
13912
+ var $isSpecial = _ref4.$isSpecial;
13913
+ return $isSpecial ? uiColors.darkYellow : 'inherit';
13914
+ }, uiColors.lightGreen, uiColors.cardinal);
13893
13915
  var Description = /*#__PURE__*/styled.div.withConfig({
13894
13916
  displayName: "ItemInfo__Description",
13895
- componentId: "sc-1xm4q8k-5"
13917
+ componentId: "sc-1xm4q8k-6"
13896
13918
  })(["margin-top:1.5rem;font-size:", ";color:", ";font-style:italic;"], uiFonts.size.small, uiColors.lightGray);
13897
13919
  var Header = /*#__PURE__*/styled.div.withConfig({
13898
13920
  displayName: "ItemInfo__Header",
13899
- componentId: "sc-1xm4q8k-6"
13921
+ componentId: "sc-1xm4q8k-7"
13900
13922
  })(["display:flex;align-items:center;justify-content:space-between;margin-bottom:0.5rem;"]);
13901
13923
  var AllowedSlots = /*#__PURE__*/styled.div.withConfig({
13902
13924
  displayName: "ItemInfo__AllowedSlots",
13903
- componentId: "sc-1xm4q8k-7"
13925
+ componentId: "sc-1xm4q8k-8"
13904
13926
  })(["display:flex;align-items:center;justify-content:center;gap:0.5rem;margin-left:auto;align-self:flex-start;"]);
13905
13927
  var StackInfo = /*#__PURE__*/styled.div.withConfig({
13906
13928
  displayName: "ItemInfo__StackInfo",
13907
- componentId: "sc-1xm4q8k-8"
13929
+ componentId: "sc-1xm4q8k-9"
13908
13930
  })(["width:100%;text-align:right;font-size:", ";color:", ";margin-top:1rem;"], uiFonts.size.small, uiColors.orange);
13909
13931
  var MissingStatistics = /*#__PURE__*/styled.div.withConfig({
13910
13932
  displayName: "ItemInfo__MissingStatistics",
13911
- componentId: "sc-1xm4q8k-9"
13933
+ componentId: "sc-1xm4q8k-10"
13912
13934
  })(["margin-top:1rem;color:", ";"], uiColors.cardinal);
13913
13935
 
13914
13936
  var itemSlotTypes = ['head', 'neck', 'leftHand', 'rightHand', 'ring', 'legs', 'boot', 'accessory', 'armor', 'inventory'];
@@ -13930,7 +13952,11 @@ var ItemInfoDisplay = function ItemInfoDisplay(_ref) {
13930
13952
  var allowedSlotTypeCamelCase = lodash.camelCase(item.allowedEquipSlotType[0]);
13931
13953
  var itemSubTypeCamelCase = lodash.camelCase(item.subType);
13932
13954
  var slotType = getSlotType(itemSlotTypes, allowedSlotTypeCamelCase, itemSubTypeCamelCase);
13933
- var itemFromEquipment = equipmentSet[slotType];
13955
+ var itemSubTypeFromEquipment = Object.values(equipmentSet).find(function (item) {
13956
+ var _item$subType;
13957
+ return lodash.camelCase((_item$subType = item == null ? void 0 : item.subType) != null ? _item$subType : '') === itemSubTypeCamelCase;
13958
+ });
13959
+ var itemFromEquipment = itemSubTypeFromEquipment ? itemSubTypeFromEquipment : equipmentSet[slotType];
13934
13960
  if (itemFromEquipment && (!item._id || itemFromEquipment._id !== item._id)) {
13935
13961
  return itemFromEquipment;
13936
13962
  }
@@ -13954,7 +13980,7 @@ var ItemInfoDisplay = function ItemInfoDisplay(_ref) {
13954
13980
  var Flex = /*#__PURE__*/styled.div.withConfig({
13955
13981
  displayName: "ItemInfoDisplay__Flex",
13956
13982
  componentId: "sc-1lftdo8-0"
13957
- })(["display:flex;gap:0.5rem;flex-direction:", ";@media (max-width:580px){flex-direction:column-reverse;align-items:center;}"], function (_ref2) {
13983
+ })(["display:flex;gap:0.5rem;flex-direction:", ";align-items:center;@media (max-width:640px){flex-direction:column-reverse;align-items:center;}"], function (_ref2) {
13958
13984
  var $isMobile = _ref2.$isMobile;
13959
13985
  return $isMobile ? 'row-reverse' : 'row';
13960
13986
  });