@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.5.87",
3
+ "version": "0.5.89",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -21,7 +21,12 @@ export const CheckItem: React.FC<ICheckItemProps> = ({
21
21
 
22
22
  return (
23
23
  <div onPointerDown={handleClick}>
24
- <input className="rpgui-checkbox" type="checkbox" checked={checked} />
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 (item.type === ItemType.Consumable || item.type === ItemType.Tool) {
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 || item?.type === ItemType.Tool)
300
+ (item?.type === ItemType.Consumable ||
301
+ item?.type === ItemType.Tool ||
302
+ item?.subType === ItemSubType.Seed)
300
303
  }
301
304
  >
302
305
  <Draggable