@rpg-engine/long-bow 0.2.99 → 0.3.1
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/components/Equipment/EquipmentSet.d.ts +1 -0
- package/dist/components/Item/Inventory/ItemContainer.d.ts +1 -0
- package/dist/components/Item/Inventory/ItemSlot.d.ts +1 -0
- package/dist/long-bow.cjs.development.js +10 -4
- 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 +10 -4
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CraftBook/CraftBook.tsx +1 -1
- package/src/components/Equipment/EquipmentSet.tsx +3 -0
- package/src/components/Item/Inventory/ItemContainer.tsx +3 -0
- package/src/components/Item/Inventory/ItemSlot.tsx +3 -0
- package/src/mocks/equipmentSet.mocks.ts +20 -9
- package/src/mocks/itemContainer.mocks.ts +16 -2
|
@@ -9,6 +9,7 @@ export interface IEquipmentSetProps {
|
|
|
9
9
|
onItemDragEnd?: (quantity?: number) => void;
|
|
10
10
|
onItemPlaceDrop?: (item: IItem | null, slotIndex: number, itemContainerType: ItemContainerType | null) => void;
|
|
11
11
|
onItemOutsideDrop?: (item: IItem, position: IPosition) => void;
|
|
12
|
+
dragScale?: number;
|
|
12
13
|
checkIfItemCanBeMoved: () => boolean;
|
|
13
14
|
checkIfItemShouldDragEnd?: () => boolean;
|
|
14
15
|
onMouseOver?: (e: any, slotIndex: number, item: IItem | null) => void;
|
|
@@ -9,6 +9,7 @@ export interface IItemContainerProps {
|
|
|
9
9
|
onItemDragEnd?: (quantity?: number) => void;
|
|
10
10
|
onOutsideDrop?: (item: IItem, position: IPosition) => void;
|
|
11
11
|
onItemPlaceDrop?: (item: IItem | null, slotIndex: number, itemContainerType: ItemContainerType | null) => void;
|
|
12
|
+
dragScale?: number;
|
|
12
13
|
checkIfItemCanBeMoved: () => boolean;
|
|
13
14
|
checkIfItemShouldDragEnd?: () => boolean;
|
|
14
15
|
onMouseOver?: (e: any, slotIndex: number, item: IItem | null) => void;
|
|
@@ -14,6 +14,7 @@ interface IProps {
|
|
|
14
14
|
onDragStart: (item: IItem, slotIndex: number, itemContainerType: ItemContainerType | null) => void;
|
|
15
15
|
onDragEnd: (quantity?: number) => void;
|
|
16
16
|
onOutsideDrop?: (item: IItem, position: IPosition) => void;
|
|
17
|
+
dragScale?: number;
|
|
17
18
|
checkIfItemCanBeMoved: () => boolean;
|
|
18
19
|
checkIfItemShouldDragEnd?: () => boolean;
|
|
19
20
|
openQuantitySelector?: (maxQuantity: number, callback: () => void) => void;
|
|
@@ -33135,7 +33135,7 @@ var CraftBook = function CraftBook(_ref) {
|
|
|
33135
33135
|
var getDropdownOptions = function getDropdownOptions() {
|
|
33136
33136
|
var options = [];
|
|
33137
33137
|
Object.keys(shared.ItemSubType).forEach(function (key) {
|
|
33138
|
-
if (key === 'CraftingResource') {
|
|
33138
|
+
if (key === 'CraftingResource' || key === 'DeadBody') {
|
|
33139
33139
|
return; // we can't craft crafting resouces...
|
|
33140
33140
|
}
|
|
33141
33141
|
|
|
@@ -33489,7 +33489,8 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
33489
33489
|
onDrop = _ref.onOutsideDrop,
|
|
33490
33490
|
checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
|
|
33491
33491
|
openQuantitySelector = _ref.openQuantitySelector,
|
|
33492
|
-
checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd
|
|
33492
|
+
checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
|
|
33493
|
+
dragScale = _ref.dragScale;
|
|
33493
33494
|
var _useState = React.useState(false),
|
|
33494
33495
|
isTooltipVisible = _useState[0],
|
|
33495
33496
|
setTooltipVisible = _useState[1];
|
|
@@ -33653,6 +33654,7 @@ var ItemSlot = /*#__PURE__*/mobxReactLite.observer(function (_ref) {
|
|
|
33653
33654
|
}
|
|
33654
33655
|
}, React__default.createElement(Draggable, {
|
|
33655
33656
|
defaultClassName: item ? 'draggable' : 'empty-slot',
|
|
33657
|
+
scale: dragScale,
|
|
33656
33658
|
onStop: function onStop(e, data) {
|
|
33657
33659
|
if (wasDragged && item) {
|
|
33658
33660
|
var _e$target;
|
|
@@ -33772,7 +33774,8 @@ var EquipmentSet = function EquipmentSet(_ref) {
|
|
|
33772
33774
|
onItemPlaceDrop = _ref.onItemPlaceDrop,
|
|
33773
33775
|
onItemOutsideDrop = _ref.onItemOutsideDrop,
|
|
33774
33776
|
checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
|
|
33775
|
-
checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd
|
|
33777
|
+
checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
|
|
33778
|
+
dragScale = _ref.dragScale;
|
|
33776
33779
|
var neck = equipmentSet.neck,
|
|
33777
33780
|
leftHand = equipmentSet.leftHand,
|
|
33778
33781
|
ring = equipmentSet.ring,
|
|
@@ -33817,6 +33820,7 @@ var EquipmentSet = function EquipmentSet(_ref) {
|
|
|
33817
33820
|
onDragEnd: function onDragEnd(quantity) {
|
|
33818
33821
|
if (onItemDragEnd) onItemDragEnd(quantity);
|
|
33819
33822
|
},
|
|
33823
|
+
dragScale: dragScale,
|
|
33820
33824
|
checkIfItemCanBeMoved: checkIfItemCanBeMoved,
|
|
33821
33825
|
checkIfItemShouldDragEnd: checkIfItemShouldDragEnd,
|
|
33822
33826
|
onPlaceDrop: function onPlaceDrop(item, slotIndex, itemContainerType) {
|
|
@@ -34595,7 +34599,8 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
34595
34599
|
_onOutsideDrop = _ref.onOutsideDrop,
|
|
34596
34600
|
checkIfItemCanBeMoved = _ref.checkIfItemCanBeMoved,
|
|
34597
34601
|
initialPosition = _ref.initialPosition,
|
|
34598
|
-
checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd
|
|
34602
|
+
checkIfItemShouldDragEnd = _ref.checkIfItemShouldDragEnd,
|
|
34603
|
+
dragScale = _ref.dragScale;
|
|
34599
34604
|
var _useState = React.useState({
|
|
34600
34605
|
isOpen: false,
|
|
34601
34606
|
maxQuantity: 1,
|
|
@@ -34628,6 +34633,7 @@ var ItemContainer$1 = function ItemContainer(_ref) {
|
|
|
34628
34633
|
onDragEnd: function onDragEnd(quantity) {
|
|
34629
34634
|
if (onItemDragEnd) onItemDragEnd(quantity);
|
|
34630
34635
|
},
|
|
34636
|
+
dragScale: dragScale,
|
|
34631
34637
|
checkIfItemCanBeMoved: checkIfItemCanBeMoved,
|
|
34632
34638
|
checkIfItemShouldDragEnd: checkIfItemShouldDragEnd,
|
|
34633
34639
|
openQuantitySelector: function openQuantitySelector(maxQuantity, callback) {
|