@rpg-engine/long-bow 0.5.87 → 0.5.89
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 +4 -3
- 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 +4 -3
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CheckItem.tsx +6 -1
- package/src/components/Item/Inventory/ItemContainer.tsx +6 -1
- package/src/components/Item/Inventory/ItemSlot.tsx +4 -1
package/package.json
CHANGED
|
@@ -21,7 +21,12 @@ export const CheckItem: React.FC<ICheckItemProps> = ({
|
|
|
21
21
|
|
|
22
22
|
return (
|
|
23
23
|
<div onPointerDown={handleClick}>
|
|
24
|
-
<input
|
|
24
|
+
<input
|
|
25
|
+
className="rpgui-checkbox"
|
|
26
|
+
type="checkbox"
|
|
27
|
+
checked={checked}
|
|
28
|
+
readOnly
|
|
29
|
+
/>
|
|
25
30
|
<label>{label}</label>
|
|
26
31
|
<br />
|
|
27
32
|
</div>
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
IItemContainer,
|
|
5
5
|
IShortcut,
|
|
6
6
|
ItemContainerType,
|
|
7
|
+
ItemSubType,
|
|
7
8
|
ItemType,
|
|
8
9
|
} from '@rpg-engine/shared';
|
|
9
10
|
import React, { useCallback, useRef, useState } from 'react';
|
|
@@ -114,7 +115,11 @@ export const ItemContainer: React.FC<IItemContainerProps> = ({
|
|
|
114
115
|
});
|
|
115
116
|
|
|
116
117
|
const handleSetShortcut = (item: IItem, index: number) => {
|
|
117
|
-
if (
|
|
118
|
+
if (
|
|
119
|
+
item.type === ItemType.Consumable ||
|
|
120
|
+
item.type === ItemType.Tool ||
|
|
121
|
+
item.subType === ItemSubType.Seed
|
|
122
|
+
) {
|
|
118
123
|
setItemShortcut?.(item.key, index);
|
|
119
124
|
}
|
|
120
125
|
};
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
IItemContainer,
|
|
5
5
|
ItemContainerType,
|
|
6
6
|
ItemSlotType,
|
|
7
|
+
ItemSubType,
|
|
7
8
|
ItemType,
|
|
8
9
|
} from '@rpg-engine/shared';
|
|
9
10
|
|
|
@@ -296,7 +297,9 @@ export const ItemSlot: React.FC<IProps> = observer(
|
|
|
296
297
|
}
|
|
297
298
|
isSelectingShortcut={
|
|
298
299
|
isSelectingShortcut &&
|
|
299
|
-
(item?.type === ItemType.Consumable ||
|
|
300
|
+
(item?.type === ItemType.Consumable ||
|
|
301
|
+
item?.type === ItemType.Tool ||
|
|
302
|
+
item?.subType === ItemSubType.Seed)
|
|
300
303
|
}
|
|
301
304
|
>
|
|
302
305
|
<Draggable
|